Player dies when jumps in water with a vehicle
#1

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

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

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

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

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.
Reply
#5

Please check OnVehicleDeath callback.
Reply
#6

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)