OnPlayerKeyStateChange; Question - 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: OnPlayerKeyStateChange; Question (
/showthread.php?tid=87775)
OnPlayerKeyStateChange; Question -
boelie - 22.07.2009
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
Re: OnPlayerKeyStateChange; Question -
MenaceX^ - 22.07.2009
What's the problem exactly?
I also suggest you to check if the player is inside a vehicle.
Re: OnPlayerKeyStateChange; Question -
[top_Shoter] - 22.07.2009
what dose it say when you try to push the KEY_SUBMISSION? anything?
Re: OnPlayerKeyStateChange; Question -
boelie - 22.07.2009
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'