IsPlayerInCar? is there such thing? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: IsPlayerInCar? is there such thing? (
/showthread.php?tid=69784)
IsPlayerInCar? is there such thing? -
XeoN_13 - 21.03.2009
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?
Re: IsPlayerInCar? is there such thing? -
x-cutter - 21.03.2009
public OnPlayerEnterVehicle(playerid,vehicleid)
public OnPlayerStateChange(playerid,newstate,oldstate)
Re: IsPlayerInCar? is there such thing? -
Sandra18[NL] - 21.03.2009
if(IsPlayerInAnyVehicle(playerid))
{
new model = GetVehicleModel(GetPlayerVehicleID(playerid));
if(model == 520 || model == tankid || model == rhinoID)
{
//the rest of your code
}
}
Re: IsPlayerInCar? is there such thing? -
XeoN_13 - 21.03.2009
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
Re: IsPlayerInCar? is there such thing? -
Sandra18[NL] - 21.03.2009
No problem, by the way, i missed a 'c' in GetPlayerVehi
cleID