How to set TIMER for a command?
#1

Hello, I have got this command:
pawn Код:
CMD:parkourprize(playerid, params[]) {
    if(IsPlayerInRangeOfPoint(playerid, 3, -136.100921, 2145.677246, 292.571868)) {
    SetPlayerPos(playerid, 1756.725952, -1770.319335, 17.227943);
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerHealth(playerid, 100);
    StopAudioStreamForPlayer(playerid);
    new giveplayerid;
    new value = random(4);
    if(value == 0)
    {
    PlayerInfo[giveplayerid][pCash] += 10000;
    SendClientMessage(playerid, COLOR_YELLOW, "Congratulations, you won 10,000$!");
    }
    else if(value == 1)
    {
    PlayerInfo[giveplayerid][pCrack] += 50;
    SendClientMessage(playerid, COLOR_YELLOW, "Congratulations, you won 50 grams of crack!");
    }
    else if(value == 2)
    {
    PlayerInfo[giveplayerid][pMats] += 10000;
    SendClientMessage(playerid, COLOR_YELLOW, "Congratulations, you won 10,000 materials!");
    }
    else if(value == 3)
    {
    PlayerInfo[giveplayerid][pPot] += 100;
    SendClientMessage(playerid, COLOR_YELLOW, "Congratulations, you won 100 grams of pot!");
    }
    return 1;
    }
}
I want that players will be able to use this command once a hour/paycheck... could you please assist me ?
Reply


Messages In This Thread
How to set TIMER for a command? - by davidstyle1125 - 27.12.2014, 08:49
Re: How to set TIMER for a command? - by Eyce - 27.12.2014, 09:03

Forum Jump:


Users browsing this thread: 1 Guest(s)