IsPlayerInCar? is there such thing?
#1

hello, im trieng to make something for area51 so when people get on an Hydra, Hunter, Tank it will give them boundries so they cant take the cars to lv or ls or etc..
like this
SetPlayerWorldBounds(playerid, 583.8938, -338.6584, 2428.998, 1576.513);

and then after they get off the car there boundries will reset to normal.. but how do i make it so when th ere in the hydra,tank,rhino so it gives them the boundries and when get get out it resets the boundries?
Reply
#2

public OnPlayerEnterVehicle(playerid,vehicleid)
public OnPlayerStateChange(playerid,newstate,oldstate)
Reply
#3

if(IsPlayerInAnyVehicle(playerid))
{
new model = GetVehicleModel(GetPlayerVehicleID(playerid));
if(model == 520 || model == tankid || model == rhinoID)
{
//the rest of your code
}
}
Reply
#4

Quote:
Originally Posted by =>Sandra<=
if(IsPlayerInAnyVehicle(playerid))
{
new model = GetVehicleModel(GetPlayerVehileID(playerid));
if(model == 520 || model == tankid || model == rhinoID)
{
//the rest of your code
}
}
thanks
Reply
#5

No problem, by the way, i missed a 'c' in GetPlayerVehicleID
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)