wont get the point
#1

hey guys i have a faction point giving and everywhere is working only here wont give to the taxi driver a faction point after the player quit,exit from his taxi if i put playerid instead of Taxidriver[playerid] it's giving to the player who exit the taxi cab the passanger so it works .. but i want to give the point to the taxi driver, what is wrong ?

Код HTML:
if(TaxiDriver[playerid] != -1)
		{
			new money = floatround(TaxiDist[playerid])/100*FarePrice[TaxiDriver[playerid]];
			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]);

            if(!strmatch(GetIPEx( playerid ), GetIPEx( TaxiDriver[playerid] )))
		    {
      			format(gString, sizeof(gString), "Jucatorul %s transportat la destinatie pentru %s$", GetName(playerid),FormatNumber(money));
				GiveFactionPoint(TaxiDriver[playerid], 5, gString);
			}
		}
yes i have them under player_state_onfoot and on a timer where is callbacking every sec
Reply
#2

i have the same error like you
Reply
#3

Where do you put this? I mean under which callback.
Reply
#4

Give the faction point to the player before doing: TaxiDriver[playerid] = -1; ...
Reply
#5

it works , thx sickattack
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)