3 minute delays between certain commands?
#1

its using DCMD

How can i put 3 minute delays between commands?



In OnPlayerCommandText:
pawn Код:
dcmd(wank, 4, cmdtext);

Code to the command
pawn Код:
dcmd_wank(playerid, params[])
{
    new id;
    if(gTeam[playerid] == TEAM_COP || gTeam[playerid] == TEAM_ARMY || gTeam[playerid] == TEAM_CIA) return SendClientMessage(playerid, -1, "Cops, CIA, and Army cannot wank!");
    if(sscanf(params, "u",id)
    {
        SendClientMessage(playerid, -1, "You wanked in public on nobody.. wanted level increased");
        SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) + 1);
    }
    else
    {
    new name[24], string[128];
    GetPlayerName(id, name, sizeof name);
    format(string, sizeof string, "You wanked on %s, wanted level increased!", name);
    SendClientMessage(playerid, -1, string);
    SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) + 3);
    }
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)