General player vehicle
#1

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.

Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
        new id = GetVehicleID(vehicleid);
		if(GetPlayerVehicleAccess(playerid, id) < 1)
        {
            ClearAnimations(playerid);
            return 1;
        }
        return 1;
    }
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?
Reply


Messages In This Thread
General player vehicle - by ChristofferHoffmann - 22.02.2012, 20:59
Re: General player vehicle - by Toreno - 22.02.2012, 21:15
Re : General player vehicle - by ChristofferHoffmann - 23.02.2012, 08:09

Forum Jump:


Users browsing this thread: 1 Guest(s)