SA-MP Forums Archive
Help Detect Car In Water For (Derby) - 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)
+--- Thread: Help Detect Car In Water For (Derby) (/showthread.php?tid=445636)



Help Detect Car In Water For (Derby) - HaiderABbas - 22.06.2013

I want something which detects players car falls from the map or falls in water ,


Re: Help Detect Car In Water For (Derby) - SMW - 22.06.2013

when vehicle falls into water its automatically called OnVehicleDeath


Re: Help Detect Car In Water For (Derby) - HaiderABbas - 22.06.2013

and if anyone falls from the derby map ?


Re: Help Detect Car In Water For (Derby) - Vince - 22.06.2013

Create a timer to check their position. If their Z height is below a certain point then you can deduct that they've fallen off the map. Say, if your map is at Z height 100 then you can deduct that they fell off if their Z height is 90 or lower.


Re: Help Detect Car In Water For (Derby) - ivanVU - 22.06.2013

You can check player Z coordinate.

new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);

if(!IsPlayerInRangeOfPoint(playerid, 20.0, x coord, y coord, z coord)) // derby map coord, Z is important!
{
// what to do if player is not in derby map
}


Re: Help Detect Car In Water For (Derby) - HaiderABbas - 22.06.2013

and derby map is not a straight line , it map is up and down , one side another down , its not a road :/ so