04.04.2013, 12:39
use OnPlayerStateChange..
Although, I'm not quite sure what you are doing with the TransportCost[i]. Is it the transport cost for the player? or the taxi driver?
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_PASSENGER) {
if(GetPlayerMoney(playerid) < TransportCost[playerid]) RemovePlayerFromVehicle(playerid);
}
return 1;
}