OnPlayerKeyStateChange; Question
#1

Hello,

I'm doing something wrong to make this work here, i just cant figure it out maybe you can ?

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{

	
 	if(newkeys == KEY_SUBMISSION)
 	{
	boat = GetPlayerVehicleID(playerid);//
	if(boat==SFbo)
	{
	MoveObject(open, -1469.41, 501.16, 11.82, 2.00 );//opening the carrierdoor
  SendClientMessage(playerid, 0xFF7B7BAA, "your opening the carrierdoor!.");
	}

}


  
  return 1;
  }
on top of script i have;
new boat;
new SFbo;
new open;
I want to make this vehicle (boat) to be able to open the carrierdoor
Reply
#2

What's the problem exactly?
I also suggest you to check if the player is inside a vehicle.
Reply
#3

what dose it say when you try to push the KEY_SUBMISSION? anything?
Reply
#4

Well.. I want to make that a specific vehicle (named 'boat') can open the carrierdoor by presing the submission button.

The problem is that only the textmessage will show up, Or if i change it a bit it totaly ignores the getvehicle id part.

I also tried it with 'playerstate Passenger' but then it wont recognize the value 'newstate'
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)