SA-MP Forums Archive
SetPVarInt And GetPVarInt?? - 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: SetPVarInt And GetPVarInt?? (/showthread.php?tid=334088)



SetPVarInt And GetPVarInt?? - Admigo - 13.04.2012

Heey all,

Mademan made a code for me for buying weapons at weapon dealers(players).
But when some buys a weapon at a player other players on server who are weapon dealer gets money to.
How can i fix this?
Code fromshow weapon shop:
Код:
SetPVarInt(playerid, "arm1", i);if(IsPlayerConnected(i)==1)
Code for buy weapon(onplayertext):
Код:
new dealerid = GetPVarInt(playerid, "arm1");
GivePlayerMoney(dealerid, 10000);
		  		DeletePVar(playerid, "arm1");
		  		GivePlayerWeapon(playerid,4,1);
		  		GivePlayerMoney(playerid,-10000);
How can i fix this?

Thanks Admigo