22.02.2012, 20:59
Hello there, I'm working on fixing a vehicle system that makes sure that only players who have the keys can enter, and those you give out the key. So in order to do that, I've already made a small code.
The problem is that this code does what I want, it makes sure no one can enter - unless they are allowed to. But sadly I was only meant to make sure they couldn't enter the drivers seat. So they should be able to press G and enter, but not steal/enter the vehicle itself without being having the keys. How would I that?
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { new id = GetVehicleID(vehicleid); if(GetPlayerVehicleAccess(playerid, id) < 1) { ClearAnimations(playerid); return 1; } return 1; }