SA-MP Forums Archive
Text draw - 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: Text draw (/showthread.php?tid=413310)



Text draw - sscarface - 04.02.2013

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.


Re: Text draw - Youice - 04.02.2013

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;




Re: Text draw - sscarface - 04.02.2013

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