Quote:
Originally Posted by lulo356
pawn Код:
//on the top of your script new GiftTimer[MAX_PLAYERS]; new GiftgTimer[MAX_PLAYERS];
pawn Код:
CMD:getgift(playerid, params[]) { if(IsPlayerInRangeOfPoint(playerid, 5.0, 1128.26636, -1450.60254, 14.66266)) { Random = random(3); switch(Random) { case 0: { GivePlayerMoney(playerid, 250000); SendClientMessage(playerid, 0xFF0000FF ,"[GiftBox:] {FFFFFF}You have received 250,000$! Merry christmas!"); } case 1: { SetPlayerScore(playerid, GetPlayerScore(playerid)+1); SendClientMessage(playerid, 0xFF0000FF ,"[GiftBox:] {FFFFFF}You have received 1 levelup! Merry christmas!"); } } } else { SendClientMessage(playerid, -1, "You are not at the christmas tree!"); } GiftTimer[playerid] = 1; GiftgTimer[playerid]= SetTimerEx("Giftg", 1000, false, "d", playerid); return 1; }
pawn Код:
//place it on the buttom of your script forward Giftg(playerid); public Giftg(playerid) { GiftTimer[playerid] = 0; SendClientMessage(playerid,0x42CC33C8, "You have to wait 1 minute to use /getgift again."); return 1; }
|
I have done everything you said. But it won't work :/
I can still use that command whenever i want.