Jump to content

Problema com custom vip


Recommended Posts


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   3
  • Joined:  07/18/15
  • Last Seen:  

Bom galera, tenho esse script que bloqueia contas grouplvl 0 equipar itens. Ele funciona tudo mas da um erro de infinity loop em contas com grouplvl 0, em contas acima de 0 não gera esse erro.

Script:
 

-	script	CustomVip	-1,{
OnPCLoginEvent:
        if(!getgmlevel()){
                for(set .i,0; .i < getarraysize(.idc);set .i,.i+1){
                        for(set .x,1; .x <= 10;set .x,.x+1){
                                if(getequipid(.x) == .idc[.i]){
                                        unequip .x;
                                }
                        }
                }
        }
end;
OnInit:
        setarray .idc[0],30267,30268,30269,30285,30286,30287,30282,30283,30284,30276,30277,30278,30264,30265,30266,30273,30274,30275,30270,30271,30272,30279,30280,30281,30289,30302,30316,30261,30262,30263,30310,30311,30312,30295,30296,30297,30305,30293,30290,30303,30299,30291,30300,30298,30292,30308,30309,30294,30063,30064,30065,30066,30067,30068,30301,30304,30288,30306,30307,30317,30314,30315,30313,30318,30319,30320,30321,30322,30323,30197,30198,30199,30200;
        for(set .i,0; .i < getarraysize(.idc);set .i,.i+1){
                setitemscript(.idc[.i],"{ if(!getgmlevel()) nude; }",1);
        }
end;
}

 

Screenshot_1.png

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  51
  • Reputation:   3
  • Joined:  08/01/12
  • Last Seen:  

change getgmlevel for getgroupid

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

you should change those 

for(set .i,0; .i < getarraysize(.idc);set .i,.i+1){
        for(set .x,1; .x <= 10;set .x,.x+1){
                if(getequipid(.x) == .idc[.i]){
                        unequip .x;
                }
        }
}

into

for(set .@i,0; .@i < getarraysize(.idc);set .@i,.@i+1){
        for(set .@x,1; .@x <= 10;set .@x,.@x+1){
                if(getequipid(.@x) == .idc[.@i]){
                        unequip .@x;
                }
        }
}

 

anyway, i think you could try something like this, which should work too.

OnPCLoginEvent:
	if (!getgmlevel()) {
		if (isequippedcnt(30267,30268,30269,30285,30286,30287,30282,30283,30284,30276,30277,30278,30264,30265,30266,30273,30274,30275,30270,30271,30272,30279,30280,30281,30289,30302,30316,30261,30262,30263,30310,30311,30312,30295,30296,30297,30305,30293,30290,30303,30299,30291,30300,30298,30292,30308,30309,30294,30063,30064,30065,30066,30067,30068,30301,30304,30288,30306,30307,30317,30314,30315,30313,30318,30319,30320,30321,30322,30323,30197,30198,30199,30200) > 0) {
			nude;
		}
	}
	end;

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...