06.12.2009, 23:30
Код:
if(strcmp(cmd,"/fare",true)==0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pMember] == 10||PlayerInfo[playerid][pLeader] == 10|| PlayerInfo[playerid][pJob] == 14) { if(TransportDuty[playerid] > 0) { if(TransportDuty[playerid] == 1) { TaxiDrivers -= 1; } else if(TransportDuty[playerid] == 2) { BusDrivers -= 1; } TransportDuty[playerid] = 0; format(string, sizeof(string), "* You are now Off Duty and earned $%d.", TransportMoney[playerid]); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); GivePlayerMoney(playerid, TransportMoney[playerid]); ConsumingMoney[playerid] = 1; TransportValue[playerid] = 0; TransportMoney[playerid] = 0; return 1; } new Veh = GetPlayerVehicleID(playerid); if(Veh == 82 || Veh == 84 || Veh == 85 || Veh == 94) { if(GetPlayerState(playerid) == 2) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fare [price]"); return 1; } moneys = strval(tmp); if(moneys < 1 || moneys > 999) { SendClientMessage(playerid, COLOR_GREY, " Fare price must be between $1 and $999 !"); return 1; } TaxiDrivers += 1; TransportDuty[playerid] = 1; TransportValue[playerid] = moneys; GetPlayerName(playerid,sendername,sizeof(sendername)); format(string, sizeof(string), "Taxi Driver %s is On Duty, fare: $%d.", sendername, TransportValue[playerid]); OOCNews(TEAM_GROVE_COLOR,string); }