[SOLVED] OnPlayerStateChange - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [SOLVED] OnPlayerStateChange (
/showthread.php?tid=129288)
[SOLVED] OnPlayerStateChange -
VonLeeuwen - 21.02.2010
Hello all,
Whenever you enter a roadtrain (vehiclemodel 515), you should get a message.. I dont get any
How come?
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == 5)
{
new VehID = GetPlayerVehicleID(playerid);
new VehM = GetVehicleModel(VehID);
if(VehM == 515)
{
SendClientMessage(playerid,0xFF0000AA, "Message");
}
}
return 1;
}
Thanks.
Re: [UNSOLVED] OnPlayerStateChange -
Rizard - 21.02.2010
Instead of newstate == 5 try 2
Re: [UNSOLVED] OnPlayerStateChange -
GaGlets(R) - 21.02.2010
It will send message if you will be in right state !
================================================
0 Empty (while initializing) - "PLAYER_STATE_NONE"
1 Player is on foot - "PLAYER_STATE_ONFOOT"
2 Player is driver of a vehicle - "PLAYER_STATE_DRIVER"
3 Player is passenger of a vehicle - "PLAYER_STATE_PASSENGER"
7 Player is wasted or on class selection - "PLAYER_STATE_WASTED"
8 Player is spawned - "PLAYER_STATE_SPAWNED"
9 Player is spectating - "PLAYER_STATE_SPECTATING"
================================================== =======
Re: [UNSOLVED] OnPlayerStateChange -
VonLeeuwen - 21.02.2010
4 Player exits a vehicle
5 Player enters a vehicle as driver
6 Player enters a vehicle as passenger
Will try soon
thanks!
Re: [UNSOLVED] OnPlayerStateChange -
Torran - 21.02.2010
Use 2 not 5
Re: [UNSOLVED] OnPlayerStateChange -
VonLeeuwen - 21.02.2010
Solved Thanks
Re: [UNSOLVED] OnPlayerStateChange -
Rizard - 21.02.2010
Quote:
Originally Posted by Torran
Use 2 not 5
|
good it's solved but look 3 posts up