SA-MP Forums Archive
Please help me with that variable - 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: Please help me with that variable (/showthread.php?tid=475055)



Please help me with that variable - Riwerry - 11.11.2013

Hello guys, I can't get my variable, what checking if player already put his weapon to one slot. I tried it like this but it not working.

My code:

pawn Код:
new SlotTaken;
new INI:PouzivatelovSubor2 = INI_Open (PouzivateloveUmiestnenie2 (playerid));
INI_SetTag (PouzivatelovSubor2, "Slot 1");
INI_WriteInt (PouzivatelovSubor2, "Zbran 1", ZbraneInformacie [playerid] [wZbran1]);
INI_WriteInt (PouzivatelovSubor2, "Municia 1", ZbraneInformacie [playerid] [wMunicia1]);
INI_WriteInt (PouzivatelovSubor2, "Zbran 2", ZbraneInformacie [playerid] [wZbran2]);
INI_WriteInt (PouzivatelovSubor2, "Municia 2", ZbraneInformacie [playerid] [wMunicia2]);
INI_WriteInt (PouzivatelovSubor2, "Zbran 3", ZbraneInformacie [playerid] [wZbran3]);
INI_WriteInt (PouzivatelovSubor2, "Municia 3", ZbraneInformacie [playerid] [wMunicia3]);
INI_WriteInt (PouzivatelovSubor2, "Zbran 4", ZbraneInformacie [playerid] [wZbran4]);
INI_WriteInt (PouzivatelovSubor2, "Municia 4", ZbraneInformacie [playerid][wMunicia4]);
INI_WriteInt (PouzivatelovSubor2, "Zbran 5", ZbraneInformacie [playerid] [wZbran5]);
INI_WriteInt (PouzivatelovSubor2, "Municia 5", ZbraneInformacie [playerid] [wMunicia5]);
INI_WriteInt (PouzivatelovSubor2, "Zbran 6", ZbraneInformacie [playerid] [wZbran6]);
INI_WriteInt (PouzivatelovSubor2, "Municia 6", ZbraneInformacie [playerid] [wMunicia6]);
INI_WriteInt (PouzivatelovSubor2, "Zbran 7", ZbraneInformacie [playerid] [wZbran7]);
INI_WriteInt (PouzivatelovSubor2, "Municia 7", ZbraneInformacie [playerid] [wMunicia7]);
INI_WriteInt (PouzivatelovSubor2, "Zbran 8", ZbraneInformacie [playerid] [wZbran8]);
INI_WriteInt (PouzivatelovSubor2, "Municia 8", ZbraneInformacie [playerid] [wMunicia8]);
INI_WriteInt (PouzivatelovSubor2, "Zbran 9", ZbraneInformacie [playerid] [wZbran9]);
INI_WriteInt (PouzivatelovSubor2, "Municia 9", ZbraneInformacie [playerid] [wMunicia9]);
INI_WriteInt (PouzivatelovSubor2, "Zbran 10", ZbraneInformacie [playerid] [wZbran10]);
INI_WriteInt (PouzivatelovSubor2, "Municia 10", ZbraneInformacie [playerid] [wMunicia10]);
INI_WriteInt (PouzivatelovSubor2, "Zbran 11", ZbraneInformacie [playerid] [wZbran11]);
INI_WriteInt (PouzivatelovSubor2, "Municia 11", ZbraneInformacie [playerid] [wMunicia11]);
INI_WriteInt (PouzivatelovSubor2, "Zbran 12", ZbraneInformacie [playerid] [wZbran12]);
INI_WriteInt (PouzivatelovSubor2, "Municia 12", ZbraneInformacie [playerid] [wMunicia12]);
INI_Close (PouzivatelovSubor2);
ResetPlayerWeapons (playerid);
SlotTaken = 1;
else
if (SlotTaken == 1)
SendClientMessage(playerid, 0xFFFFFF, "This slot is occupied");



Re: Please help me with that variable - Riwerry - 11.11.2013

Tried to use it with SlotTaken MAX_PLAYERS, but didnt work.