Keep player in vehicle
#1

Hi,
I need to keep a player in the vehicle, so that he can't leave it. Is there anyway to do this?
I don't have a clue how to manage this so any help would be welcome...
Reply
#2

pawn Код:
new LastCar[MAX_PLAYERS];
public OnPlayerEnterVehicle(playerid, vehicleid)
{
    LastCar[playerid] = vehicleid;
    return 1;
}
public OnPlayerStateChange(playerid,newstate,oldstate)
{
if(newstate == 0 && oldstate == 2)
{
    PutPlayerInVehicle(playerid, vehicleid, 0);
}
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)