Command problem rep+
#1

Код:
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?
Reply
#2

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
Reply
#3

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...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)