19.10.2016, 03:12
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 ?
yes i have them under player_state_onfoot and on a timer where is callbacking every sec
Код 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); } }