Command timer - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Command timer (
/showthread.php?tid=400312)
Command timer -
FL3GM4 - 17.12.2012
how to make, that player can use command every 1 minute
command:
Код:
CMD:report(playerid, params[])
{
new rp[128], string[128];
if(sscanf(params, "s[128]", rp))return Koristi(playerid, "/report [Tekst]");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pAdmin] >= 1)
{
format(string, sizeof(string), "|R| %s (%d): %s",PlayerName(playerid), playerid, rp);
SendClientMessage(i, COLOR_ORANGE, string);
}
}
format(string, sizeof(string), "Vas report je poslan: %s", rp);
SendClientMessage(playerid, COLOR_YELLOW, string);
return 1;
}
i want that player can send report to administrators every 1 minute
Re: Command timer -
Ironboy - 17.12.2012
pawn Код:
CMD:report(playerid, params[])
{
if(GetPVarInt(playerid,"ABUSE")>GetTickCount())return SendMessageToPlayer(playerid,0xFF0000FF,"You must wait 1 minute before reporting to the admins.");
SetPVarInt(playerid,"ABUSE",GetTickCount()+60000);
new rp[128], string[128];
if(sscanf(params, "s[128]", rp))return Koristi(playerid, "/report [Tekst]");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pAdmin] >= 1)
{
format(string, sizeof(string), "|R| %s (%d): %s",PlayerName(playerid), playerid, rp);
SendClientMessage(i, COLOR_ORANGE, string);
}
}
format(string, sizeof(string), "Vas report je poslan: %s", rp);
SendClientMessage(playerid, COLOR_YELLOW, string);
return 1;
}
Re: Command timer -
LarzI - 17.12.2012
EDIT: Ninja'd