Jump to content
changerr

Problema com custom vip

Recommended Posts

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

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 [email protected],0; [email protected] < getarraysize(.idc);set [email protected],[email protected]+1){
        for(set [email protected],1; [email protected] <= 10;set [email protected],[email protected]+1){
                if(getequipid([email protected]) == .idc[[email protected]]){
                        unequip [email protected];
                }
        }
}

 

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...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.