[Ajuda] Comando /tarifa
#10

Tente ai.
pawn Код:
if(strcmp(cmd, "/tarifa", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {      
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
           
            SendClientMessage(playerid, COLOR_MECANICOS, "Comando: /tarifa [preзo]");
            return 1;
        }
        new farprice;
        farprice = strval(tmp);
        if(farprice < 1 || farprice > 20)
        {
           
            SendClientMessage(playerid, COLOR_ERRO, ""ERRO" Tens que definir um preзo entre 1€ a 20€.");
            return 1;
        }
        if(PlayerInfo[playerid][Job] == 13 || DynamicFactions[PlayerInfo[playerid][Faction]][fType] == 11)//PlayerInfo[playerid][Job] == 13 ||
        {
           
            if(CopOnDuty[playerid] != 1 && GoeOnDuty[playerid] != 1 && GNROnDuty[playerid] != 1) return SendClientMessage(playerid, COLOR_ERRO, ""ERRO" Nгo estбs de serviзo!");
            new vehicleid = GetPlayerVehicleID(playerid);
            if(GetVehicleModel(vehicleid) != 420 && GetVehicleModel(vehicleid) != 438) return SendClientMessage(playerid, COLOR_ERRO, ""ERRO" Nгo estбs num Tбxi!");
            TaxiFarPrice[playerid]= farprice;
            format(string, sizeof(string), "[Sindicato dos Tбxis:] %s estб de serviзo no seu Tбxi por %d€. Ligue jб 555!",GetPlayerNameEx(playerid), farprice);
            SendClientMessageToAll(COLOR_YELLOW, string);
        }
        else
        {
           
            SendClientMessage(playerid, COLOR_ERRO, ""ERRO" Nгo йs Taxista!");
        }
        return 1;
    }
}
caso funcione foi por que vocк usou de forma errada o else.
Reply


Messages In This Thread
Comando /tarifa - by MorreJaa - 18.12.2014, 01:36
Re: Comando /tarifa - by zGuigui2068 - 18.12.2014, 01:38
Re: Comando /tarifa - by Learning - 18.12.2014, 01:42
Re: Comando /tarifa - by MorreJaa - 18.12.2014, 01:44
Re: Comando /tarifa - by MorreJaa - 18.12.2014, 01:52
Re: Comando /tarifa - by Learning - 18.12.2014, 02:12
Re: Comando /tarifa - by MorreJaa - 18.12.2014, 02:35
Re: Comando /tarifa - by Learning - 18.12.2014, 02:39
Re: Comando /tarifa - by MorreJaa - 18.12.2014, 02:42
Re: Comando /tarifa - by WendeLKILL - 18.12.2014, 02:50

Forum Jump:


Users browsing this thread: 1 Guest(s)