[Tutorial] [SC] Simple Commands 1
#1

Hello it's ya boy Jay here for a simple command tut

ZCMDS i cant help you and this is a simple command promote not a ruff ryder style

ok lets start with
pawn Код:
#include <a_samp>
ok now we have that out the way lets make a couple commands

pawn Код:
public OnPlayerText(playerid, text[]) //if you use this we will need to add a cmd[256] to make it right
{
        new cmd[256];
    if (strcmp(cmd, "/player1", true)==0)
    {
    return 1;
    }
}
pawn Код:
public OnPlayerText(playerid, text[]) //Ok now if your using a different name for the same command and you need to save space
{
        new cmd[256];
    if (strcmp(cmd, "/player1", true)==0 || strcmp(cmd, "/player2", true)==0)
    {
    return 1;
    }
}
pawn Код:
public OnPlayerText(playerid, text[]) //Ok now your trying to add [ON/OFF] or [1/2/3/4/5] or something
{
        new cmd[256];
    if (strcmp(cmd, "/player1", true)==0 || strcmp(cmd, "/player2", true)==0)
    {
        if (strcmp(cmd, "1", true)==0)//if
        {
        }
        else if (strcmp(cmd, "2", true)==0)//else if
        {
        }
    return 1;
    }
}
Reply


Messages In This Thread
[SC] Simple Commands 1 - by mikeeee - 18.02.2012, 20:35
Re: [SC] Simple Commands 1 - by [XST]O_x - 18.02.2012, 20:58
Re: [SC] Simple Commands 1 - by Vince - 18.02.2012, 21:36
Re: [SC] Simple Commands 1 - by emokidx - 19.02.2012, 03:18
Re: [SC] Simple Commands 1 - by Mr.Fames - 19.02.2012, 14:16
Re: [SC] Simple Commands 1 - by mikeeee - 20.02.2012, 17:31

Forum Jump:


Users browsing this thread: 2 Guest(s)