OnPlayerEnterVehicle problem - 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: OnPlayerEnterVehicle problem (
/showthread.php?tid=313984)
OnPlayerEnterVehicle problem -
Superthijs - 28.01.2012
Hi, when I use OnPlayerEnterVehicle to send a message when this function is called,
the message shows up BEFORE the player has entered the vehicle.
What's the problem?
Re: OnPlayerEnterVehicle problem -
mineralo - 28.01.2012
use all your stuff in OnPlayerStateChange not at onplayerenter vehicle
Re: OnPlayerEnterVehicle problem -
zxc1 - 28.01.2012
pawn Код:
if (newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT)
{
// your message here
}
Re: OnPlayerEnterVehicle problem -
henry jiggy - 28.01.2012
Check the wiki page at onplayerentervehicle.
It's useful for stuff like anti-teamjack etc. because it's called when the player issues the command to enter the vehicle(presses enter near one), not when he enters it.
Re: OnPlayerEnterVehicle problem -
Superthijs - 28.01.2012
Thanks!