20.02.2011, 01:54
Isto deve resolver o seu problema
Espero ter ajudado
pawn Code:
if(strcmp(cmd,"/corrida",true)==0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMembro] == 10||PlayerInfo[playerid][pLider] == 10|| PlayerInfo[playerid][pEmprego] == 14)
{
if(TransportDuty[playerid] == 1||TransportDuty[playerid] == 2){
TransportDuty[playerid] = 0;
format(string, sizeof(string), "* Estб fora de serviзo, ganhou R$%d.", TransportMoney[playerid]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
GivePlayerMoneyEx(playerid, TransportMoney[playerid]);
ConsumingMoney[playerid] = 1,TransportValue[playerid] = 0,TransportMoney[playerid] = 0;
return 1;
}
else
{
if(IsATaxiCar(GetPlayerVehicleID(playerid))){
if(GetPlayerState(playerid) == 2)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USE: /corrida [price]");
return 1;
}
moneys = strval(tmp);
if(moneys < 1 || moneys > 1000) { SendClientMessage(playerid, COLOR_GREY, " Minimo R$ 1, Maximo R$ 1000 !"); return 1; }
TaxiDrivers += 1,TransportDuty[playerid] = 1,TransportValue[playerid] = moneys;
GetPlayerName(playerid,sendername,sizeof(sendername));
format(string, sizeof(string), "Taxista %s estб no trabalho,/servico taxi Corrida: R$%d.", sendername, TransportValue[playerid]);
OOCNews(TEAM_GROVE_COLOR,string);
}
else{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo esta dirigindo !");
return 1;
}
}
if(IsAOniCar(GetPlayerVehicleID(playerid))){
if(GetPlayerState(playerid) == 2)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USE: /corrida [price]");
return 1;
}
moneys = strval(tmp);
if(moneys < 1 || moneys > 999) { SendClientMessage(playerid, COLOR_GREY, " Minimo R$ 1, Maximo R$ 999 !"); return 1; }
BusDrivers += 1,TransportDuty[playerid] = 2,TransportValue[playerid]= moneys;
GetPlayerName(playerid,sendername,sizeof(sendername));
format(string, sizeof(string), "Motorista De Onibus %s estб no trabalho, Corrida: R$%d.", sendername, TransportValue[playerid]);
OOCNews(TEAM_GROVE_COLOR,string);
}
else{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo esta dirigindo !");
return 1;
}
}
}
}
}
return 1;
}
Espero ter ajudado