18.12.2010, 16:02
pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
if (newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT)
{
new veh = GetVehicleModel(GetPlayerVehicleID(playerid));
if (veh == hydra)
{
new m = GetPlayerMoney(playerid), cost = 20000;
if (m < cost) RemovePlayerFromVehicle(playerid);
else if(m > cost) GivePlayerMoney(playerid,-cost);
}
return 0;
}
return 1;
}