[Help] Zcmd
#3

Quote:
Originally Posted by scout322
Посмотреть сообщение
Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) SendClientMessage(playerid, COLOR_NEWS, "Error: That command does not exist. Refer to /help for server commands.");
    return 1;
}
This should be

pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success)
        return SendClientMessage(playerid, COLOR_NEWS, "Error: That command does not exist. Refer to /help for server commands."), 0;

    return 1;
}
You want to stop exection of function when command doesn't exist and return 0 because it doesn't exist.
Reply


Messages In This Thread
[Help] Zcmd - by INKISICION - 25.01.2015, 01:29
Re: [Help] Zcmd - by scout322 - 25.01.2015, 01:31
Re: [Help] Zcmd - by WopsS - 25.01.2015, 01:32
Re: [Help] Zcmd - by scout322 - 25.01.2015, 01:33
Re: [Help] Zcmd - by WopsS - 25.01.2015, 01:43
Re: [Help] Zcmd - by INKISICION - 25.01.2015, 01:59

Forum Jump:


Users browsing this thread: 2 Guest(s)