30.04.2012, 20:57
Why doesn't this work?
You don't need ShowPlayerDashboard or HidePlayerDashboard to diagnose this problem, all they do is show/hide textdraws.
The problem is, once you hit Y (KEY_YES), you can't hit N until you hit escape and cancel the mouse selection.
pawn Code:
if ( PRESSED ( KEY_YES ) ) // Initiate the Dashboard!
{
if( accViewing [ playerid ] == 0 ) // They're not looking at anything else!
{
ShowPlayerDashboard ( playerid ), accViewing [ playerid ] = 1;
SelectTextDraw( playerid, 0xC90411FF );
}
else return false;
}
if ( PRESSED ( KEY_NO ) ) // Hide the Dashboard!
{
if( accViewing [ playerid ] == 1 ) // They have the dashboard open already!
{
HidePlayerDashboard ( playerid ), accViewing [ playerid ] = 0;
CancelSelectTextDraw ( playerid );
}
}
The problem is, once you hit Y (KEY_YES), you can't hit N until you hit escape and cancel the mouse selection.