14.03.2010, 19:39
so with this code It starts the game text on the passengers screen but the numbers dont change and it dose not take the money from the passenger and give it to the driver ...?
if(newstate==PLAYER_STATE_PASSENGER)
{
new VID=GetPlayerVehicleID(playerid);
if(GetVehicleModel(VID) == 420)
{
SetTimerEx("FareAmmount",1000,1,"i",playerid);
}
}
public FareAmmount(playerid)
{
if(gTeam[playerid] == TEAM_TAXI) reason i have this is so the taxi driver gets paied but hes not
{
new fare = TaxiFare[playerid];
new ammount = fare*2;
totaltaxiamount[playerid] += ammount;
new string[64];
GivePlayerMoney(playerid, -fare);
format(string,64,"%d/sec~n~%d",fare,totaltaxiamount[playerid]);
GameTextForPlayer(playerid,string,999,4);
return 1;
}
return 1;
}
if(newstate==PLAYER_STATE_PASSENGER)
{
new VID=GetPlayerVehicleID(playerid);
if(GetVehicleModel(VID) == 420)
{
SetTimerEx("FareAmmount",1000,1,"i",playerid);
}
}
public FareAmmount(playerid)
{
if(gTeam[playerid] == TEAM_TAXI) reason i have this is so the taxi driver gets paied but hes not
{
new fare = TaxiFare[playerid];
new ammount = fare*2;
totaltaxiamount[playerid] += ammount;
new string[64];
GivePlayerMoney(playerid, -fare);
format(string,64,"%d/sec~n~%d",fare,totaltaxiamount[playerid]);
GameTextForPlayer(playerid,string,999,4);
return 1;
}
return 1;
}