Help me in this - 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: Help me in this (
/showthread.php?tid=610291)
Help me in this -
Krauser123 - 22.06.2016
Well first of all I'm a new scripter i'm still learning i took a Filterscript and I'm editing it.
This is the script :
http://pastebin.com/T5WZ0H5q
if you can check the last lines
for example
PHP код:
if(listitem == 0) // MP5
{
if(PlayerInfo[playerid][ptokens] >= 5)
{
SendClientMessage(playerid, COLOR_GREY,"* Recieved your GUN, HAVE FUN ! ");
PlayerInfo[playerid][ptokens] -= 5;
GivePlayerWeapon(playerid, 29, 200);
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File, "VIP Tokens");
INI_WriteInt(File,"Tokens:", PlayerInfo[playerid][ptokens]);
INI_Close(File);
}
else
{
SendClientMessage(playerid, COLOR_GREY,"* You cannot afford this!");
}
It says that everything is correct when i compile it but when i'm ingame and try to take an MP5 nothing happens the Tokens doesn't change and i don't take the MP5 it says only you cannot afford this and only for MP5 for other weapons nothing..
Re: Help me in this -
Luis- - 22.06.2016
Do you have 5 tokens in the first place?