[SOLVED] OnPlayerStateChange
#1

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

Instead of newstate == 5 try 2

Reply
#3

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"
================================================== =======
Reply
#4

4 Player exits a vehicle
5 Player enters a vehicle as driver
6 Player enters a vehicle as passenger

Will try soon thanks!
Reply
#5

Use 2 not 5
Reply
#6

Solved Thanks
Reply
#7

Quote:
Originally Posted by Torran
Use 2 not 5
good it's solved but look 3 posts up
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)