Press a key inside a vehicle? - 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: Press a key inside a vehicle? (
/showthread.php?tid=266735)
Press a key inside a vehicle? -
The Woody - 05.07.2011
Why won't this work? it should work..
pawn Код:
if( IsKeyJustDown( KEY_CROUCH, newkeys, oldkeys ) && IsPlayerInAnyVehicle( playerid ) )
{
SendClientMessage( playerid, WHITE, "TEST" );
}
The only thing i could think of would be that you can't use that key or something in a vehicle if thats the case
what keys can i use?
Re: Press a key inside a vehicle? -
Shadoww5 - 05.07.2011
PHP код:
new k1,k2,k3;
GetPlayerKeys(playerid,k1,k2,k3);
if((k1 == 2) && IsPlayerInAnyVehicle(playerid))
{
SendClientMessage( playerid, WHITE, "TEST" );
}
// ....
Re: Press a key inside a vehicle? -
The Woody - 05.07.2011
Quote:
Originally Posted by Shadoww5
PHP код:
new k1,k2,k3;
GetPlayerKeys(playerid,k1,k2,k3);
if((k1 == 2) && IsPlayerInAnyVehicle(playerid))
{
SendClientMessage( playerid, WHITE, "TEST" );
}
// ....
|
So i should use the Value of the key. Hmm okay thanks.
Re: Press a key inside a vehicle? -
Shadoww5 - 05.07.2011
No no, this can be
2 or KEY_CROUCH.
There is no difference.