/ahelp shows nothing
#9

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!
Reply


Messages In This Thread
/ahelp shows nothing - by FabianoC - 05.12.2011, 15:56
Re: /ahelp shows nothing - by Speed - 05.12.2011, 16:08
Re: /ahelp shows nothing - by FabianoC - 05.12.2011, 16:14
Re: /ahelp shows nothing - by Speed - 05.12.2011, 16:22
Re: /ahelp shows nothing - by Ash. - 05.12.2011, 16:32
Re: /ahelp shows nothing - by FabianoC - 05.12.2011, 17:27
Re: /ahelp shows nothing - by Ash. - 05.12.2011, 17:40
Respuesta: /ahelp shows nothing - by OPremium - 05.12.2011, 17:42
Re: Respuesta: /ahelp shows nothing - by Ash. - 05.12.2011, 17:48

Forum Jump:


Users browsing this thread: 1 Guest(s)