SA-MP Forums Archive
*** This topic title sucks, "help me" is not descriptive. - 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: *** This topic title sucks, "help me" is not descriptive. (/showthread.php?tid=389946)



*** This topic title sucks, "help me" is not descriptive. - CrazyManiac - 04.11.2012

Why doesn't this works?

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    case KEY_FIRE:
	{
               SendClientMessage(playerid,0xFFFFFFFF,"Hoi!!");
	}
	return 1;
}
I never made any OnPlayerKeyStateChanges, so if my code totally fails, then please fix it.

Greetings, CrazyManiac.


Re: Why? - JaKe Elite - 04.11.2012

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_FIRE)
    {
        SendClientMessage(playerid,0xFFFFFFFF,"Hoi!!");
    }
    return 1;
}



Re: Why? - CrazyManiac - 04.11.2012

Thanks mate, problem solved.


Re: Why? - CrazyManiac - 04.11.2012

BTW: Does anyone know what KEY "F" is, or where i can see all the keys? Because KEY_FIRE is probably ALT.


Re: Why? - DBan - 04.11.2012

https://sampwiki.blast.hk/wiki/GetPlayerKeys


Re: Why? - JaKe Elite - 04.11.2012

SA-MP: GetPlayerKeys


Re: Why? - Drake_Lopez - 04.11.2012

Test the links above, it works!