Quote:
Originally Posted by Vince
Dini ...
Come on, man! Don\'t use old super slow methods.
pawn Code:
CMD:topgangs(playerid,params[]) {
new string[1000], Slot1 = -1, Slot2 = -1, Slot3 = -1, Slot4 = -1,Slot5 = -1; new Kills = -9999; for(new x=0; x<2000; x++) if(dini_Exists(gFileId(x))) if(dini_Int(gFileId(x),"Kills") >= Kills) { Kills = dini_Int(gFileId(x),"Kills"); Slot1 = x; } Kills = -9999; for(new x=0; x<2000; x++) if(dini_Exists(gFileId(x)) && x != Slot1) if(dini_Int(gFileId(x),"Kills") >= Kills) { Kills = dini_Int(gFileId(x),"Kills"); Slot2 = x; } Kills = -9999; for(new x=0; x<2000; x++) if(dini_Exists(gFileId(x)) && x != Slot1 && x != Slot2) if(dini_Int(gFileId(x),"Kills") >= Kills) { Kills = dini_Int(gFileId(x),"Kills"); Slot3 = x; } Kills = -9999; for(new x=0; x<2000; x++) if(dini_Exists(gFileId(x)) && x != Slot1 && x != Slot2 && x != Slot3) if(dini_Int(gFileId(x),"Kills") >= Kills) { Kills = dini_Int(gFileId(x),"Kills"); Slot4 = x; } Kills = -9999; for(new x=0; x<2000; x++) if(dini_Exists(gFileId(x)) && x != Slot1 && x != Slot2 && x != Slot3 && x != Slot4) if(dini_Int(gFileId(x),"Kills") >= Kills) { Kills = dini_Int(gFileId(x),"Kills"); Slot5 = x; }
A.K.A. lagging the server by opening a file 20,000 times.
|
Well Yeah man i had to do with Dini cuz when i use y_ini there are some mismatches in files , Well Thanks for informing i might update it to yini in future.
Well I Have A Symbol to stop the Lag , First The System Checks If Dini Exists, And Already You Can Edit The Money And Score So That There can be less creations of gangs.