07.03.2017, 16:24
Quote:
why dont you use tick count for these? Basically just check if player can use gift when he uses command.
pawn Код:
|
Quote:
Sure:
Код:
forward GiftTaimer(playerid); public GiftTaimer(playerid) { if(PlayerInfo[playerid][pGiftTime] > 0) PlayerInfo[playerid][pGiftTime] --; else SetPVarInt(playerid,"Claimyourpresent",1); return 1; } public OnPlayerConnect(playerid) { SetTimerEx("GiftTaimer",1000,true,"i",playerid); return 1; } |
also in /gift cmd, i will use like,
Код:
if(GetPVarInt(playerid, "Claimyourpresent") != 1) return SCM(COLOR_RED, "You cant use /gift yet.");
Thanks
