SA-MP Forums Archive
Player dies when jumps in water with a vehicle - 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: Player dies when jumps in water with a vehicle (/showthread.php?tid=496379)



Player dies when jumps in water with a vehicle - ZeroTheScyther - 21.02.2014

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...


Re: Player dies when jumps in water with a vehicle - Dignity - 21.02.2014

Do you have any vehicle functions? i.e. https://sampwiki.blast.hk/wiki/OnPlayerExitVehicle or anything similar. If so, please paste them here.


Re: Player dies when jumps in water with a vehicle - ZeroTheScyther - 21.02.2014

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    return 1;
}
I guess the problem it's at OnPlayerKeyStateChange.


Re: Player dies when jumps in water with a vehicle - Dignity - 21.02.2014

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.


Re: Player dies when jumps in water with a vehicle - iZN - 21.02.2014

Please check OnVehicleDeath callback.


Re: Player dies when jumps in water with a vehicle - Emmet_ - 21.02.2014

Show your "OnPlayerStateChange" callback... the problem could most likely be occurred in a state check (oldstate == PLAYER_STATE_DRIVER).


Re: Player dies when jumps in water with a vehicle - ZeroTheScyther - 22.02.2014

Quote:
Originally Posted by Emmet_
Посмотреть сообщение
Show your "OnPlayerStateChange" callback... the problem could most likely be occurred in a state check (oldstate == PLAYER_STATE_DRIVER).
Quote:
Originally Posted by iZN
Посмотреть сообщение
Please check OnVehicleDeath callback.
Thank you guys but iZN was right. OnVehicleDeath was the problem. Thank you Mionee for helping me fixing it.