[AJUDA] /pintar bugando comandos que nгo existem.
#1

Pessoal, estou com um bug no comando /pintar [cor1] [cor2]. Ele estб bugando comandos que nгo existem tipo, eu digito qualquer comando que nгo existe da estб mensagem 'Somente mecвnicos podem usar'. Estou achando que й alguma chave, mas nгo estou conseguindo arrumar. Serб que alguйm me ajuda?

pawn Код:
if(strcmp(cmd, "/pintar", true) == 0) {
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    format(file, sizeof(arquivo), "%s.ini", name);
    if(dini_Int(file, "ProfissaoX") == Mecanico) {
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, Vermelho, "vocк nгo estб no veнculo.");
    new tmp[80], idx;
    cmd = strtok(cmdtext, idx);
    new cor1, cor2;
    new veiculo;
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp)) {
    SendClientMessage(playerid, Vermelho, "/pintar [cor1] [cor2]");
    return 1;
    }
    cor1 = strval(tmp);
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp)) {
    SendClientMessage(playerid, Vermelho, "/pintar [cor1] [cor1]");
    return 1;
    }
    cor2 = strval(tmp);
    veiculo = GetPlayerVehicleID(playerid);
    ChangeVehicleColor(veiculo,cor1,cor2);
    SendClientMessage(playerid, Amarelo, "Veнculo pintado.");
    } else {
    SendClientMessage(playerid, Vermelho, "Somente mecвnicos podem usar");
    }
    return 1;
    }
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)