Press n to close this box
#1

hello guys i haven made a textdraw for my server and i want that when a please press n in keyboad the textdraw hide/destroy please tell me how i can do that.
Reply
#2

PHP код:
#define PRESSED(%0) \
        
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0))) 
PHP код:
 new bool:showingTD    [MAX_PLAYERS] = {false, ...}; 
PHP код:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    if(
PRESSED(KEY_NO)) { 
        if(
showingTD[playerid] == true) { 
            
//hide textdraw 
            
showingTD[playerid] = false
        }     
    }    
    
/* 
    if(PRESSED(KEY_NO)) { 
        //hide textdraw 
    } 
    */  

P.S: Do not forget to set showingTD[playerid] = true; when you show your texdraw(s).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)