30.04.2013, 21:07
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.
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;
}