'G' key define - 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: 'G' key define (
/showthread.php?tid=467328)
'G' key define -
Lidor124 - 02.10.2013
16 is F - enter to vehicle as driver
What is the key define for G - enter the vehicle as passanger?
on this line
https://sampwiki.blast.hk/wiki/Keys key 'G' is undefined :/
Код:
if ((newkeys & 16) && !(oldkeys & 16))
{
if(C4RobStatus[playerid] == 1)
{
new Float:slx, Float:sly, Float:slz;
GetPlayerPos(playerid, slx, sly, slz);
CreateExplosion(slx, sly, slz, 0, 50);
RemovePlayerAttachedObject(playerid, 8);
C4RobStatus[playerid] = 0;
SendClientMessage(playerid, COLOR_LIGHTRED, "Due of your attempt to open the vehicle's door and enter as passenger the C4 fell from your hands and its explosived.");
return 1;
}
}
AW: 'G' key define -
BigETI - 02.10.2013
https://sampwiki.blast.hk/wiki/Keys
According to SA:MP wiki it's undefined, however "GROUP_CONTROL_FWD" can be used in gametexts, textdraws, chat, 3D text, and etc.
Quote:
GROUP_CONTROL_FWD cannot be detected in SA-MP, as it used internally to enter vehicles as passenger. However, the gametext definition still exists.
|
Re: 'G' key define -
Lidor124 - 02.10.2013
Its is available for OnPlayerKeyStateChange public? please say it does
AW: 'G' key define -
BigETI - 02.10.2013
No, sorry. But you can do something inside
OnPlayerStateChange().
Re: 'G' key define -
Lidor124 - 02.10.2013
You gave me an idea - check if the player is passanger and then make my code without the 'newkeys' under public OnPlayerStateChange
Thanks! +REP