Taxi Fare
#7

Where is this located?
for(new i = 0; i < MAX_VEHICLES; i++)
{
if(IsATaxi(i))
{
new driver = GetVehicleDriver(i);
if(driver != INVALID_PLAYER_ID)
{
if(TaxiDuty{driver} && TaxiStart{driver} && CountVehiclePlayers(i) > 0)
{
new string[128];
format(string, sizeof(string), "~y~TAXI FARE: $%d", TaxiMade[driver]);
GameTextForPlayer(driver, string, 1, 6);
for(new p = 0; p < MAX_PLAYERS; p++)
{
if(IsPlayerConnected(p) && PlayerInCar(p) && GetPlayerState(p) != PLAYER_STATE_DRIVER && GetPlayerVehicleID(p) == GetPlayerVehicleID(driver))
{
format(string, sizeof(string), "~y~TAXI FARE: $%d", TaxiMoney[p]);
GameTextForPlayer(p, string, 1, 6);
TaxiMoney[p] += TaxiFare{driver};
TaxiMade[driver] += TaxiFare{driver};
}
}
}
}
}
}

If this is located on OnPlayerUpdate then it will go super-fast..

If I've helped you with something please feel free to REP me, or at-least say "Thanks!"
- Abagail
Reply


Messages In This Thread
Taxi Fare - by FaZeRs - 07.03.2014, 13:44
Re: Taxi Fare - by FaZeRs - 07.03.2014, 19:01
Re: Taxi Fare - by Anzipane - 07.03.2014, 20:27
Re: Taxi Fare - by FaZeRs - 07.03.2014, 20:45
Re: Taxi Fare - by FaZeRs - 08.03.2014, 20:58
Re: Taxi Fare - by FaZeRs - 09.03.2014, 15:00
Re: Taxi Fare - by Abagail - 09.03.2014, 15:06
Re: Taxi Fare - by FaZeRs - 09.03.2014, 15:12

Forum Jump:


Users browsing this thread: 1 Guest(s)