Quote:
Originally Posted by OPremium
Sorry, but you are wrong. If no parameters are passed to gettime, it will return the current Unix-Timestamp
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; }
|
Ooh... Never knew that! D:
Now I do; I always wondered why the parameters that it requested (in Notepad++ and Pawno) had defaults!