18.02.2012, 20:35
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
ok now we have that out the way lets make a couple commands
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>
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;
}
}