25.11.2012, 16:31
pawn Код:
CMD:yourcmd(playerid, params[])
{
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;
}