SA-MP Forums Archive
Taxi - 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: Taxi (/showthread.php?tid=594874)



Taxi - Ugaustin - 24.11.2015

hi I got transport taxi, distance everything. it just dosent add when Im going with the taxi.. like "5.60Km = 50$" .. it just appears "0.00Km = 0$" .. why please help..


Re: Taxi - ATGOggy - 25.11.2015

We need your code to do anything.


Re: Taxi - N0FeaR - 25.11.2015

Put your code here and i will be able to help you.


Re: Taxi - Ugaustin - 25.11.2015

PHP код:
if(TransportDriver[i] < 999)
                            {
                                if(
IsPlayerConnected(TransportDriver[i]) && ( PlayerInfo TransportDriver[i] ] [ pMember ] == 10 || PlayerInfo TransportDriver[i] ] [ pLeader ] == 10 ) )
                                {
                                    new 
moneys floatround ( ( TransportDistanceMeters TransportDriver ] ] - TransportDistanceMeters ] ) * TransportValue TransportDriver ] ] );
                                    
format(stringsizeof(string), "~r~%.2f KM~w~: ~g~$%s",floatdiv TransportDistanceMeters TransportDriver ] ] - TransportDistanceMeters ], 1000 ), FormatMoney moneys ) );
                                    
GameTextForPlayer(istring15006);
                                    
printf("adddd");
                                }
                            } 



Re: Taxi - Ugaustin - 26.11.2015

anyone??


Re: Taxi - ATGOggy - 26.11.2015

Tell how these variables work.


Re: Taxi - Ugaustin - 26.11.2015

I want so to add distance at each 1km.. and it remains blocked..


new Float:TransportValue[MAX_PLAYERS];

/fare:

TransportValue[playerid] = floatdiv(moneys,1000); TransportDistanceMeters [playerid] = 0;


Re: Taxi - Ugaustin - 27.11.2015

bump


Re: Taxi - ATGOggy - 28.11.2015

Give some more code about those variables.


Re: Taxi - Sew_Sumi - 28.11.2015

What I think ATGOggy is saying, is that the formula, and the way you are getting those values, may be the cause of it.

Maybe you may want to try some debug print statements to see what it is pulling out.