25.11.2012, 16:40
Yes,
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmd, "/yourcommand", true) == 0)
{
new choice[32];
if(sscanf(params, "s[32]", choice))
{
SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /yourcmd [name]");
SendClientMessageEx(playerid, COLOR_GREY, "Available names: optinon1, option2");
return 1;
}
if(strcmp(choice, "option1", true) == 0)
{
// Your code
return 1;
}
else if(strcmp(choice, "option2", true) == 0)
{
// Your code
return 1;
}
return 1;
}
return 0;
}