if(TransportCost[playerid] > 0 && TransportDriver[playerid] < 999) { if(IsPlayerConnected(TransportDriver[playerid])) { new string[64]; TransportMoney[TransportDriver[playerid]] += TransportCost[playerid]; TransportTime[TransportDriver[playerid]] = 0; TransportCost[TransportDriver[playerid]] = 0; format(string, sizeof(string), "~w~Passenger left~n~~g~Earned $%d",TransportCost[playerid]); GameTextForPlayer(TransportDriver[playerid], string, 5000, 1);
if(TransportCost[playerid] > 0 && TransportDriver[playerid] < 999) { if(IsPlayerConnected(TransportDriver[playerid])) { TransportMoney[TransportDriver[playerid]] += TransportCost[playerid]; TransportTime[TransportDriver[playerid]] = 0; TransportCost[TransportDriver[playerid]] = 0; format(string, sizeof(string), "~w~The ride cost~n~~r~$%d",TransportCost[playerid]); GameTextForPlayer(playerid, string, 5000, 1); format(string, sizeof(string), "~w~Passenger left the taxi~n~~g~Earned $%d",TransportCost[playerid]); GameTextForPlayer(TransportDriver[playerid], string, 5000, 1); GivePlayerCash(playerid, -TransportCost[playerid]); TransportCost[playerid] = 0; TransportTime[playerid] = 0; TransportDriver[playerid] = 999; } } TelePos[playerid][0] = 0.0; TelePos[playerid][1] = 0.0; } if(newstate == PLAYER_STATE_PASSENGER) // TAXI & BUSSES { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); new vehicleid = GetPlayerVehicleID(playerid); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == 2 && TransportDuty[i] > 0) { if(GetPlayerCash(playerid) < TransportValue[i]) { format(string, sizeof(string), "* You need $%d to enter.", TransportValue[i]); SendClientMessage(playerid, COLOR_WHITE, string); RemovePlayerFromVehicle(playerid); } else { if(TransportDuty[i] == 1) { format(string, sizeof(string), "* You paid $%d to the Taxi Driver.", TransportValue[i]); SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), "* Passenger %s has entered your Taxi.", name); SendClientMessage(i, COLOR_WHITE, string); TransportTime[i] = 1; TransportTime[playerid] = 1; TransportCost[playerid] = TransportValue[i]; TransportCost[i] = TransportValue[i]; TransportDriver[playerid] = i; } else if(TransportDuty[i] == 2) { format(string, sizeof(string), "* You paid $%d to the Bus Driver.", TransportValue[i]); SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), "* Passenger %s has entered your Bus.", name); SendClientMessage(i, COLOR_WHITE, string); } GivePlayerCash(playerid, - TransportValue[i]); TransportMoney[i] += TransportValue[i]; } } } } }
Originally Posted by Intent
bump
|