PDA

View Full Version : Player dies when jumps in water with a vehicle


ZeroTheScyther
21/02/2014, 08:55 PM
So my problem is like this, when a player jumps in the water with a vehicle and HE EXITS IT (Just if he exits the vehicle... if he's still in then everything's fine) everyone on the server dies like SetPlayerHealth(playerid, 0);
I don't really know what could cause this because I don't have any SetPlayerHealth that kills you in my GM...

Dignity
21/02/2014, 08:58 PM
Do you have any vehicle functions? i.e. http://wiki.sa-mp.com/wiki/OnPlayerExitVehicle or anything similar. If so, please paste them here.

ZeroTheScyther
21/02/2014, 09:08 PM
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}

I guess the problem it's at OnPlayerKeyStateChange.

Dignity
21/02/2014, 09:10 PM
Can you send me the full function please?

If that isn't it, please PM me your Skype so I can help you over Teamviewer.

iZN
21/02/2014, 09:28 PM
Please check OnVehicleDeath callback.

Emmet_
21/02/2014, 09:29 PM
Show your "OnPlayerStateChange" callback... the problem could most likely be occurred in a state check (oldstate == PLAYER_STATE_DRIVER).

ZeroTheScyther
22/02/2014, 12:18 AM
Show your "OnPlayerStateChange" callback... the problem could most likely be occurred in a state check (oldstate == PLAYER_STATE_DRIVER).

Please check OnVehicleDeath callback.

Thank you guys but iZN was right. OnVehicleDeath was the problem. Thank you Mionee for helping me fixing it.