Derby System
#1

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?
Reply
#2

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."):
	}
Reply
#3

i should try it. Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)