18.05.2016, 15:58
Hello guys my friend gave me this CMD
But this CMD can be used like 100's of times together so i want that each player can only be able to do /getgift once they are active for 2 hour like i mean after every 2 hours they can /getgift and if they forget to collect the gift then they can use /getgift after 4 hours 2 times!
PHP код:
CMD:getgift(playerid)
{
if(!IsPlayerConnected(playerid))
return SendClientMessage(playerid, -1, "You must be logged in to do this.");
GetObjectPos(giftboxobject, giftPos[0], giftPos[1], giftPos[2]);
if(IsPlayerInRangeOfPoint(playerid, 5.0, giftPos[0], giftPos[1], giftPos[2]) && giftboxcreated == 1)
{
RandomGift(playerid);
}
return 1;
}