SA-MP Forums Archive
[QUESTION] about DINI - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [QUESTION] about DINI (/showthread.php?tid=384915)



[QUESTION] about DINI - Amine_Mejrhirrou - 13.10.2012

So i'm using Dini but i understood that eache time we use if
Код:
(dini_Int(file, "example")== 1)
the server need to earche the player name => open the file => check if example is on 1=> close the file
so my question is know if we set a kind of variable (idk if it's the correct name) and use it , it will be better
for example in onplayerconnect
Код:
(dini_Int(file, "example")== 1){blabla[playerid] = 1;}
en we can use in onplayerspawn
Код:
if(blabla[ playerid ] == 1) GivePlayerWeapon(playerid,X,X);
my question is if this is better than using (dini_Int(file, "example")== 1) every time


Re : [QUESTION] about DINI - Amine_Mejrhirrou - 14.10.2012

not to spam or somthing but i still need an answer


Re: [QUESTION] about DINI - RedRocket - 14.10.2012

Dini quite often gives me errors, so i don't trust it. For me, i think the best option would be this:

Код:
if(blabla[ playerid ] == 1) GivePlayerWeapon(playerid,X,X);



Re : [QUESTION] about DINI - Amine_Mejrhirrou - 14.10.2012

but that function will take too much time ! open + search + check + close
seting a variable should at connection be faster ?