Quote:
Originally Posted by akis_tze
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate) { new vehicle; vehicle = GetPlayerVehicleID(playerid); new money: money = GetPlayerMoney(playerid); if(newstate == PLAYER_STATE_DRIVER && vehicle == 520) { if(money < 20000) { RemovePlayerFromVehicle(playerid); } } return 1; }
|
This won't work. This will only work if the vehicle's ID = 520 *facepalms* it should be like this
Mine:
pawn Код:
new vehicleid;
new vehicle;
vehicleid = GetPlayerVehicleID(playerid);
vehicle = GetVehicleModel(vehicleid);
I can't really explain it but thats the correct way. If you figured it out im sorry for posting this :P. But hey it'll help someone next time they try to search something like this.