changerr Posted June 8, 2020 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 11 Reputation: 3 Joined: 07/18/15 Last Seen: June 27, 2020 Share Posted June 8, 2020 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; } Quote Link to comment Share on other sites More sharing options...
rickzera Posted June 9, 2020 Group: Members Topic Count: 25 Topics Per Day: 0.01 Content Count: 51 Reputation: 3 Joined: 08/01/12 Last Seen: 6 hours ago Share Posted June 9, 2020 change getgmlevel for getgroupid Quote Link to comment Share on other sites More sharing options...
Emistry Posted June 13, 2020 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: 10 hours ago Share Posted June 13, 2020 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; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.