05.12.2011, 17:42
Quote:
Isn't gettime supposed to have 3 parameters? gettime(&hour, &minute, &second);?
I'm surprised that even compiles... https://sampwiki.blast.hk/wiki/Gettime |

OT:
pawn Код:
if(strcmp(cmd, "/askadmin", true) == 0 || strcmp(cmd, "/ahelp", true) == 0)
{
if(!strlen(cmdtext[8])) return SendClientMessage(playerid, 0xFF0000AA, "Use /ahelp [message]");
new str[128];
if((gettime()-LastReport[playerid]) < 30)
{
format(str, 128, "You have to wait %d seconds before you can send a new help message!", (30-(gettime()-LastReport[playerid])));
SendClientMessage(playerid, 0xFF0000AA, str); return 1;
}
format(str, 128, "[ASKADMIN] Sender ID: %d. Message: %s", playerid, cmdtext[8]);
//Loop not needed, it was also making a part of code unreachable
AdministratorMessage(COLOR_ADMINCMD, str, 1); //You saved the message in "str" but you were sending "string"
SendClientMessage(playerid, 0x00FF00AA, "Help sent to online admins!");
LastReport[playerid] = gettime();
return 1;
}