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



is correctly? - StR_MaRy - 03.11.2016

hey guys i have a sistem at faction taxi and it gives you a +1 faction point if you had a passanger but i want to make to give you that +1 faction point only if you drived him more than 1km or something like that

Код HTML:
if(TaxiDriver[playerid] != -1)
		{
		    new money = floatround(TaxiDist[playerid])/100*FarePrice[TaxiDriver[playerid]];

            if(TaxiDist[playerid]/20000)
            {
                format(gString, sizeof(gString), "Jucatorul %s transportat la destinatie pentru %s$", GetName(playerid),FormatNumber(money));
				GiveFactionPoint(TaxiDriver[playerid], 5, gString);
            }

			format(gString, sizeof(gString), "~w~The ride cost~n~~r~$%s",FormatNumber(money));
			GameTextForPlayer(playerid, gString, 5000, 1);
			format(gString, sizeof(gString), "~w~Passenger left the taxi~n~~g~Earned $%s",FormatNumber(money));
			GameTextForPlayer(TaxiDriver[playerid], gString, 5000, 1);
			GivePlayerCash(playerid, -money);
			DriverMoney[TaxiDriver[playerid]] += money;
			TaxiDriver[playerid] = -1;
			TaxiDist[playerid] = 0.0;
			for(new i = 0; i <= 3; i++) PlayerTextDrawHide(playerid, TaxiTD[i][playerid]);
		}
this here is the code where i did something is not working , some ideas?

Код HTML:
if(TaxiDist[playerid]/20000)
            {
                format(gString, sizeof(gString), "Jucatorul %s transportat la destinatie pentru %s$", GetName(playerid),FormatNumber(money));
				GiveFactionPoint(TaxiDriver[playerid], 5, gString);
            }