Text draw
#1

i have a problem on textdraw when i do /rules textdraw open and same time i do /help so both they help textdraw open too and also rules and i want if player do /rules and then do /help so automatic rules textdraw closed and help textdraw show. if u dnt understand i will post a picture and tell me if u dnt understand, sory for bad english.
Reply
#2

try adding variables,
like: (just an example, not a working code!)
PHP код:
CMD:help(playeridparams[])
{
    if(
IsPlayerUsingRulesTD[playerid] == true)//if he is using /rules
    
{
        
TextDrawHideForPlayer(playeridTextdraw);
        
IsPlayerUsingRulesTD[playerid] = false;
        
//your code
    
}
    else {
//else if not using it
    
        //your code
    
}
    return 
1;
}

CMD:rules(playeridparams[])
{
    if(
IsPlayerUsingRulesTD[playerid] == true)//if he is using /rules
    
{
        
TextDrawHideForPlayer(playeridTextdraw);
        
IsPlayerUsingRulesTD[playerid] = false;
        
//your code
    
}
    else {
//else if not using it
        
TextDrawShowForPlayer(playeridTextdraw);
        
IsPlayerUsingRulesTD[playerid] = true;
        
//your code
    
}
    return 
1;

Reply
#3

but i have alot textdraw so i need go to cmds and put this code, another way?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)