[AJUDA] Simples erro
#1

pawn Код:
if(strcmp(cmd, "/pintar", true) == 0)
    {
    new cmd[128], idx;
    cmd = strtok(cmdtext, idx);
    if(IsPlayerInAnyVehicle(playerid))
    {
    new string[128], tmp[64];
    tmp = strtok(cmdtext, idx);
    new tmp2 = strval(tmp);
    ChangeVehicleColor(GetPlayerVehicleID(playerid),tmp2,tmp2);
    format(string, sizeof(string),"Tu mudaste as cores do teu carro para: %i",tmp2);
    SendClientMessage(playerid, 0xF60000AA, string);
    }
    else return SendClientMessage(playerid, 0xF60000AA, "Erro: Tu nгo estбs em nenhum veнculo!");
    return 1;
    }
Tб dando undefined symbol cmd, mas jб tem a new e tudo mais aн. Peguei esse code do SlashPT daqui: https://sampforum.blast.hk/showthread.php?tid=165017

Ajuda ai!
Reply
#2

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[256], idx;
    cmd = strtok(cmdtext, idx);
    if(strcmp(cmd, "/pintar", true) == 0)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            new string[128], tmp[64];
            tmp = strtok(cmdtext, idx);
            new tmp2 = strval(tmp);
            ChangeVehicleColor(GetPlayerVehicleID(playerid),tmp2,tmp2);
            format(string, sizeof(string),"Tu mudaste as cores do teu carro para: %i",tmp2);
            SendClientMessage(playerid, 0xF60000AA, string);
        }
        else
        {
            SendClientMessage(playerid, 0xF60000AA, "Erro: Tu nгo estбs em nenhum veнculo!");
        }
            return 1;
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)