Problem with death in a CarDeathmatch
#1

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

Код:
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);
}
Reply
#3

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


Forum Jump:


Users browsing this thread: 1 Guest(s)