KEY_JUMP also works when I press the S key? - 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: KEY_JUMP also works when I press the S key? (
/showthread.php?tid=463864)
KEY_JUMP also works when I press the S key? -
ZeroTheScyther - 14.09.2013
Hey guys, I've got a small problem. I'm working on a engine filescript and I want the engine to start when I press the SHIFT key [Default jump] but it seems like when I enter the vehicle if I press S or SPACE the engine starts ... Someone got any ideea how to fix this?
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((oldkeys & KEY_JUMP) && !(newkeys & KEY_JUMP))
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(IsPlayerConnected(playerid))
{
new VID = GetPlayerVehicleID(playerid);
if(VehicleStarted[VID] == 0)
{
if(Starting[playerid] == 1) return 1;
SendClientMessage(playerid,-1,"Porneste motorul... ");
SetTimerEx("Start",1500,0,"i",playerid);
Starting[playerid] = 1;
}
}
}
}
return 1;
}
Re: KEY_JUMP also works when I press the S key? -
Konstantinos - 14.09.2013
Because KEY_JUMP in vehicle is the brake (S).
Re: KEY_JUMP also works when I press the S key? -
ZeroTheScyther - 14.09.2013
*FACEWALL* I just checked this ... Well ... Problem solved? Not sure, I'll edit if something appears.