29.04.2012, 12:01
its using DCMD
How can i put 3 minute delays between commands?
In OnPlayerCommandText:
Code to the command
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;
}