SA-MP Forums Archive
Problem with death in a CarDeathmatch - 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: Problem with death in a CarDeathmatch (/showthread.php?tid=371835)



Problem with death in a CarDeathmatch - Timmeyable - 24.08.2012

Hi guys,

i have a big problem. I scripted a car deathmatch.
There you should be killed if you exit the vehicle.
I set a timer who queries if a player is not in a vehicle.
This player should be killed. But the kill buggs. The player
doesnt respawn. Look here:

[ame="http://www.youtube.com/watch?v=MXvctnqiqDo"]http://www.youtube.com/watch?v=MXvctnqiqDo[/ame]

The timer:

if(!IsPlayerInAnyVehicle(i))
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(i,X,Y,Z);
SetPlayerPos(i, X, Y, Z);
CreateExplosion(X,Y,Z, 1, 10.0);
SetPlayerHealth(i, 0);
}

I hope you understand what i mean Sry for this bad english.

Tim


Re: Problem with death in a CarDeathmatch - Shetch - 24.08.2012

Код:
new float:hp;
GetPlayerHealth(playerid, hp);
if(!IsPlayerInAnyVehicle(i) && hp != 0)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(i,X,Y,Z);
SetPlayerPos(i, X, Y, Z);
CreateExplosion(X,Y,Z, 1, 10.0);
SetPlayerHealth(i, 0);
}



AW: Problem with death in a CarDeathmatch - Timmeyable - 24.08.2012

Hmh, same result. I also test it with variables but it doesnt work too ...