27.11.2013, 22:25
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/comando", true) == 0)
{
new opcion[10];
new idx;
opcion = strtok(cmdtext, idx);
if(!strlen(opcion))
{
SendClientMessage(playerid, -1, "Escribe: /comando (1-5) ");
return true;
}
if(strcmp(opcion, "1", true) == 0)
{
//TU FUNCION
}
if(strcmp(opcion, "2", true) == 0)
{
//TU FUNCION
}
if(strcmp(opcion, "3", true) == 0)
{
//TU FUNCION
}
if(strcmp(opcion, "4", true) == 0)
{
//TU FUNCION
}
if(strcmp(opcion, "5", true) == 0)
{
//TU FUNCION
}
}
return false;
}