[HELP] Left-Right keys.
#1

Hi guys,

I have a little code but it has some little problem too.. Normally we are using ''NumPad'' for this script but some of my players are using laptops so they can not use it..

I just wanna change that script to normal 'Right and Left' keyboard arrows.. But it doenst work. I gonna lose my mind =) Can anyone help me ?

This is normal 'numpad' code.. I changed ''if(newkeys == KEY_ANALOG_LEFT)'' to if(newkeys == KEY_LEFT)'' bu its not working how can i fix it.. what do i need to do..

Код:
	if(PlayerInfo[playerid][PlayerBuyingSkin] == 1)
	{
	    if(newkeys == KEY_ANALOG_LEFT)
	    {
	        if(GetPlayerSkin(playerid) == 235)
	        {
                SetPlayerSkin(playerid, 202);
			}
	        else if(GetPlayerSkin(playerid) == 202)
	        {
                SetPlayerSkin(playerid, 135);
			}..............
Thanks.
Reply
#2

Quote:
Originally Posted by SA-MP Wiki
OnPlayerKeyStateChange will be called each time a key state is changed. It will never be called for up, down, left and right.
https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
https://sampwiki.blast.hk/wiki/GetPlayerKeys
Reply
#3

Quote:
Originally Posted by Thedya
Посмотреть сообщение
but some of my players are using laptops so they can not use it..
Gibberish. The single player uses those keys for the bounce mission. I believe that laptops that don't have a numpad use the O, K, L and ; keys for that. To be on the safe side, just print out the gametext definition for those keys in a client message.
  • ~k~~VEHICLE_TURRETUP~
  • ~k~~VEHICLE_TURRETDOWN~
  • ~k~~VEHICLE_TURRETLEFT~
  • ~k~~VEHICLE_TURRETRIGHT~
Reply
#4

O K L and ; do not work ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)