Derby System - 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: Derby System (
/showthread.php?tid=468040)
Derby System -
JaKe Elite - 06.10.2013
Hello,
I'm thinking about creating derby system in my server.
However, I don't know how could i detect if Player has been fall off the map in derby.
How could i create derby?
------
About the detecting part, Is it OnVehicleDestroy?
Re: Derby System -
[SF]OutLawZ - 06.10.2013
Well there's a few things you should do in the process.
Firstly you should check if the player exited their vehicle. Then check if their vehicle is destroyed (Detect Vehicle Health)
https://sampwiki.blast.hk/wiki/GetVehicleHealth
Then check if the player fell down in range, I'd do it something like this,
Код:
#define D_MinHeight 15 // Derby Hight?
new bool:D_HeightCheck,
Float:D_MinHeight;
// Inside your function
new Float:D_X, Float:D_Y, Float:D_Z;
if(D_HeightCheck)
{
GetPlayerPos(i, D_X, D_Y, D_Z);
if (D_Z < D_MinHeight) SendClientMessage(playerid, -1, "You lost the derby! Reason: Fell out of range."):
}
Re: Derby System -
JaKe Elite - 06.10.2013
i should try it. Thanks