OnVehicleDeath
#2

Quote:
Originally Posted by Romz
View Post
Hello,
When a cheater attempts to make a respawn for vehicles (falsely call callback OnVehicleDeath), we can catch a cheater but can not prevent a respawn. I think that this is a global problem at the moment and we can not do anything about it.
I suggest adding for OnVehicleDeath the ability to prevent respawn if the value 0 is returned.

Code:
public OnVehicleDeath(vehicleid, killerid)
{
	new Float:health;
	GetVehicleHealth(vehicleid, health);
	if(health >= 250.0)
	{
		return 0; // we prevent respawn
	}
	return 1;
}
@Kalcor, please do not ignore this proposal, it is very important.
I'm just wondering, what is a vehicle's health value after it enters water? OnVehicleDeath is called when a vehicle enters water, but I'm not sure if the health value is less than 250.0?
Reply


Messages In This Thread
OnVehicleDeath - by Romz - 05.12.2017, 07:12
Re: OnVehicleDeath - by BeckzyBoi - 05.12.2017, 07:23
Re: OnVehicleDeath - by Romz - 05.12.2017, 07:26
Re: OnVehicleDeath - by BeckzyBoi - 05.12.2017, 07:29
Re: OnVehicleDeath - by Romz - 05.12.2017, 07:30
Re: OnVehicleDeath - by BeckzyBoi - 05.12.2017, 07:33
Re: OnVehicleDeath - by Romz - 05.12.2017, 07:35
Re: OnVehicleDeath - by Romz - 05.12.2017, 07:54
Re: OnVehicleDeath - by Jelly23 - 05.12.2017, 08:01
Re: OnVehicleDeath - by Romz - 05.12.2017, 08:59
Re: OnVehicleDeath - by Locky_ - 05.12.2017, 10:02
Re: OnVehicleDeath - by Romz - 05.12.2017, 10:07
Re: OnVehicleDeath - by Locky_ - 05.12.2017, 10:10
Re: OnVehicleDeath - by Romz - 05.12.2017, 10:31
Re: OnVehicleDeath - by stabker - 05.12.2017, 10:40

Forum Jump:


Users browsing this thread: 4 Guest(s)