18.12.2014, 02:50
Tente ai.
caso funcione foi por que vocк usou de forma errada o else.
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;
}
}