SA-MP Forums Archive
Command problem rep+ - 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: Command problem rep+ (/showthread.php?tid=594884)



Command problem rep+ - Mijata - 24.11.2015

Код:
CMD:gift(playerid, params[])
{
	if(GotMoney[playerid] == true)
	return SendClientMessage(playerid, -1, "You already take your gift.");
   	GivePlayerScore(playerid, 50);
	GivePlayerMoney(playerid, 50000);
 	SendClientMessage(playerid, -1, "HAPPY HOLIDAYS");
    GotMoney[playerid] = true;
    return 1;
}
player can use again command after reconnect, how to fix it?


Re: Command problem rep+ - ATGOggy - 25.11.2015

You'll have to use y_ini or mysql for this.
I use y_ini. Here's a good tutorial: https://sampforum.blast.hk/showthread.php?tid=273088


Re: Command problem rep+ - Sew_Sumi - 25.11.2015

Quote:
Originally Posted by Mijata
Посмотреть сообщение
player can use again command after reconnect, how to fix it?
Because the fact that they picked up a giftbox, isn't being transferred to the account info, and thus, it's not storing.

Quote:
Originally Posted by ATGOggy
Посмотреть сообщение
You'll have to use y_ini or mysql for this.
I use y_ini. Here's a good tutorial: https://sampforum.blast.hk/showthread.php?tid=273088
That's plain out bullshit, he could simply use plain files for this...


The reality is that the source of his problem is that he's not writing the fact that the person got the giftbox, to their account files, and thus on disconnect the script no longer recognizes that they picked up one.


You could at least have spent a bit of time explaining the issue and the reason for it, rather than simply sending him off to another thread...