SA-MP Forums Archive
Roleplay - Taxi fare? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Roleplay - Taxi fare? (/showthread.php?tid=136189)



Roleplay - Taxi fare? - Torran - 23.03.2010

Hello,

Im trying, Oh belive me im trying, To make a roleplay script from scratch,
And erm, I was wondering how i would do this, When a taxi driver sets there fare,
And a player gets in there vehicle, For every 5 seconds that has past, It increases the total price,
By the taxis fire, So like if my fare was $3, For every 5 seconds im in the taxi it would go up $3
And then when i exit the taxi, It pays the taxi driver the total amount, How would i do this?


Re: Roleplay - Taxi fare? - Steven82 - 23.03.2010

I am also trying to figure this out 2..xD hopefully some one can help us!!!


Re: Roleplay - Taxi fare? - Torran - 24.03.2010

Anyone :P


Re: Roleplay - Taxi fare? - Niixie - 24.03.2010

I guess, make a timer and when that timer runs out. + amoment of money to the moment thats already set?


Re: Roleplay - Taxi fare? - Torran - 24.03.2010

Thats what im asking :P i dont know how to increase it by whatever the fare is AND then when they exit the taxi make them pay it


Re: Roleplay - Taxi fare? - Rzzr - 24.03.2010

Every 5 seconds do something like PlayerInfo[playerid][Taxifare] += 5;

And OnPlayerExitVehicle check if they left a taxi with a driver and then use GivePlayerMoney(playerid, GetPlayerMoney(playerid) - PlayerInfo[playerid][Taxifare]);


Re: Roleplay - Taxi fare? - VirSpectorX - 24.03.2010

I want to help, but it will be confusing cuz i have to get DCMD script first, and i am too "LAZY" to do it.


Re: Roleplay - Taxi fare? - intsustyle - 04.05.2012

This is an old topic but.. Anyone could help on this :P?