[Include] a_commands - Now commands get executed if '@' is at the first! [Not '/']
#14

pawn Код:
#define Acmd_Char '@'
 
public OnPlayerText(playerid, text[])
{
        if(text[0] == Acmd_Char)
        {
                CallLocalFunction("OnPlayerACommandText", "ds", playerid, text[1]);
                return 0;
        }
        return 1;
}
pawn Код:
public OnPlayerACommandText(playerid, cmdtext[])
{
    if(strcmp("help", cmdtext, true, 4) == 0)
    {
        SendClientMessage(playerid, -1, "This is the @help command. Ask the players for help.");
        return 1;
    }
    return 0;
}
beats changing the first letter for every command!
Reply


Messages In This Thread
a_commands - Now commands get executed if '@' is at the first! [Not '/'] - by ACI - 20.04.2013, 16:25
Re: a_commands - Now commands get executed if '@' is at the first! [Not '/'] - by TheArcher - 20.04.2013, 17:03
Re: a_commands - Now commands get executed if '@' is at the first! [Not '/'] - by MP2 - 20.04.2013, 17:53
Re: a_commands - Now commands get executed if '@' is at the first! [Not '/'] - by ACI - 21.04.2013, 03:31
Re: a_commands - Now commands get executed if '@' is at the first! [Not '/'] - by Scenario - 21.04.2013, 04:14
Re: a_commands - Now commands get executed if '@' is at the first! [Not '/'] - by ACI - 21.04.2013, 04:27
Re: a_commands - Now commands get executed if '@' is at the first! [Not '/'] - by Scenario - 21.04.2013, 06:16
Re: a_commands - Now commands get executed if '@' is at the first! [Not '/'] - by ACI - 21.04.2013, 06:45
Re: a_commands - Now commands get executed if '@' is at the first! [Not '/'] - by JaKe Elite - 21.04.2013, 07:09
Re: a_commands - Now commands get executed if '@' is at the first! [Not '/'] - by TheArcher - 21.04.2013, 11:45
Re: a_commands - Now commands get executed if '@' is at the first! [Not '/'] - by LeeXian99 - 21.04.2013, 11:47
Re: a_commands - Now commands get executed if '@' is at the first! [Not '/'] - by sKgaL - 21.04.2013, 12:20
Re: a_commands - Now commands get executed if '@' is at the first! [Not '/'] - by Jochemd - 21.04.2013, 14:01
Re: a_commands - Now commands get executed if '@' is at the first! [Not '/'] - by Kar - 21.04.2013, 19:07

Forum Jump:


Users browsing this thread: 2 Guest(s)