18.05.2016, 18:00
Quote:
Basically
Код:
new TimeCMD[MAX_PLAYERS]; CMD:getgift(playerid) { if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, -1, "You must be logged in to do this."); if(TimeCMD[playerid] > gettime()) return SendClientMessage(playerid, -1, "You used this command."); TimeCMD[playerid] = 2 * 60 * 60 + gettime(); 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; } |