Ayuda
#4

Quote:
Originally Posted by the_chaoz
Посмотреть сообщение
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[256], idx;
    cmd = strtok(cmdtext, idx);
    if(!strcmp(cmd, "/color")){
        new tmp[256];
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)){
            SendClientMessage(playerid, COLOR_BLANCO, "Uso: /color <color>");
            return SendClientMessage(playerid, COLOR_AMARILLO, "Colores: azul rojo amarillo");
        }
        if(GetPlayerMoney(playerid) < 1)return SendClientMessage(playerid, COLOR_BLANCO, "Error: No tienes el dinero suficiente para usar este comando.");
        GivePlayerMoney(playerid, -1);      
        if(!strcmp(tmp, "rojo"))return SetPlayerColor(playerid, COLOR_ROJO);
        else if(!strcmp(tmp, "azul"))return SetPlayerColor(playerid, COLOR_AZUL);
        else if(!strcmp(tmp, "amarillo"))return SetPlayerColor(playerid, COLOR_AMARILLO);
        return SendClientMessage(playerid, COLOR_ROJO, "Error: ese color no existe.");
    }
}
Si ha eso me refiero, pero el comando no funciona.
Reply


Messages In This Thread
Ayuda - by (SERGIO) - 31.07.2011, 23:13
Respuesta: Ayuda - by DJGhost - 31.07.2011, 23:45
Respuesta: Ayuda - by TheChaoz - 01.08.2011, 00:03
Re: Respuesta: Ayuda - by (SERGIO) - 01.08.2011, 01:28
Respuesta: Ayuda - by TheChaoz - 01.08.2011, 02:14
Re: Ayuda - by (SERGIO) - 01.08.2011, 02:46
Respuesta: Ayuda - by D3IMON - 01.08.2011, 03:00

Forum Jump:


Users browsing this thread: 1 Guest(s)