SA-MP Forums Archive
KeyStateChange & TextDraw Selection - 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: KeyStateChange & TextDraw Selection (/showthread.php?tid=434065)



KeyStateChange & TextDraw Selection - 2KY - 30.04.2013

Does OnPlayerKeyStateChange get called when TextDraw selection is active?

I've got the following code (which is called after textdraw selection is activated) and none of the prints are being called, and I'm using the same method as I always have done.

pawn Код:
public OnPlayerKeyStateChange ( playerid, newkeys, oldkeys )
{
    if( PRESSED( KEY_SPRINT ) )
    {  
        print ( "key" );
        if( plViewingSkinSelect [ playerid ] == 1 )
        {
            print ( "variable" );
            pInfo [ playerid ] [ Skin ] = GetPlayerSkin ( playerid );
            plViewingSkinSelect [ playerid ] = 0;
           
            TogglePlayerControllable ( playerid, true );
           
            SetSpawnInfo ( playerid, 255, pInfo [ playerid ] [ Skin ], pInfo [ playerid ] [ LastPos ] [ 0 ], pInfo [ playerid ] [ LastPos ] [ 1 ], pInfo [ playerid ] [ LastPos ] [ 2 ], pInfo [ playerid ] [ LastPos ] [ 3 ], 0,0, 0,0, 0,0 );
            SpawnPlayer ( playerid );
           
            SetPlayerInterior ( playerid, pInfo [ playerid ] [ LastInt ] );
            SetPlayerVirtualWorld ( playerid, pInfo [ playerid ] [ LastVW ] );
           
            CancelSelectTextDraw ( playerid );
        }
    }
    return true;
}



Re: KeyStateChange & TextDraw Selection - 2KY - 30.04.2013

Quote:
Originally Posted by ******
Посмотреть сообщение
Have you tried testing it in an otherwise empty mode? AFAIK clickable text draws take control of the client so you aren't doing things with your player.
I have, and came to the same result. Just figured I'd create a topic and see if anyone ran into the same problem; Thanks.


Re: KeyStateChange & TextDraw Selection - Pottus - 30.04.2013

Keystate's do not change while textdraws are selectable.