'G' key define
#1

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;
		}
	}
Reply
#2

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.

Reply
#3

Its is available for OnPlayerKeyStateChange public? please say it does
Reply
#4

No, sorry. But you can do something inside OnPlayerStateChange().
Reply
#5

You gave me an idea - check if the player is passanger and then make my code without the 'newkeys' under public OnPlayerStateChange
Thanks! +REP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)