No Menu.
#1

Hello everyone i need your help now........ im creating a faction for a command but when i type a /cmds they are not giving to me the menu why?

PHP код:
CMD:cmds(playeridparams[])
{
    if(
Commands[playerid]==&& Menu[playerid] == 1)
    {
    
TextDrawShowForPlayer(playeridTextdraw66);
    
TextDrawShowForPlayer(playeridTextdraw67);
    
TextDrawShowForPlayer(playeridTextdraw68);
    
TextDrawShowForPlayer(playeridTextdraw69);
    
TextDrawShowForPlayer(playeridTextdraw70);
    
TextDrawShowForPlayer(playeridTextdraw71);
    
TextDrawShowForPlayer(playeridTextdraw72);
    
TextDrawShowForPlayer(playeridTextdraw73);
    
TextDrawShowForPlayer(playeridTextdraw74);
    
TextDrawShowForPlayer(playeridTextdraw75);
    
TextDrawShowForPlayer(playeridTextdraw76);
    
TextDrawShowForPlayer(playeridTextdraw77);
    
TextDrawShowForPlayer(playeridTextdraw78);
    
TextDrawShowForPlayer(playeridTextdraw79);
    
TextDrawShowForPlayer(playeridTextdraw80);
    
TextDrawShowForPlayer(playeridTextdraw81);
    
TextDrawShowForPlayer(playeridTextdraw82);
    
TextDrawShowForPlayer(playeridTextdraw83);
    
TextDrawShowForPlayer(playeridTextdraw84);
    
TextDrawShowForPlayer(playeridTextdraw85);
    
TextDrawShowForPlayer(playeridTextdraw86);
    
TextDrawShowForPlayer(playeridTextdraw87);
    
TextDrawShowForPlayer(playeridTextdraw88);
    
TextDrawShowForPlayer(playeridTextdraw89);
    
TextDrawShowForPlayer(playeridTextdraw90);
    
TextDrawShowForPlayer(playeridTextdraw91);
    
TextDrawShowForPlayer(playeridTextdraw92);
    
TextDrawShowForPlayer(playeridTextdraw93);
    
TextDrawShowForPlayer(playeridTextdraw94);
    
TextDrawShowForPlayer(playeridTextdraw95);
    
TextDrawShowForPlayer(playeridTextdraw96);
    
TextDrawShowForPlayer(playeridTextdraw97);
    
TextDrawShowForPlayer(playeridTextdraw98);
    
TextDrawShowForPlayer(playeridTextdraw99);
    
TextDrawShowForPlayer(playeridTextdraw100);
    
TextDrawShowForPlayer(playeridTextdraw101);
    
TextDrawShowForPlayer(playeridTextdraw102);
    
TextDrawShowForPlayer(playeridTextdraw103);
    
TextDrawShowForPlayer(playeridTextdraw104);
    
TextDrawShowForPlayer(playeridTextdraw105);
    
TextDrawShowForPlayer(playeridTextdraw106);
    return 
1;
    }
    return 
1;

Is there any wrong of my code?

PHP код:
if(Menu[playerid] == 1)
        {
            if(
Commands[playerid]==1)
            {
               if(
strval(text)==1)
               {
                  
SendClientMessage(playerid, -1"{00FFFF}Coming Soon");
               }
            }
            return 
1;
        }
   }
   return 
1;

Reply
#2

Any one?
Reply
#3

pawn Код:
if(Commands[playerid]==1 && Menu[playerid] == 1)
Should that Menu[playerid] == 1 be Menu[playerid] == 0? So it shows textdraws?
Reply
#4

I did what u said but when i type /cmds they are not show to me the textdraws why?
Reply
#5

To start of, where are you setting "Commands[playerid] == 1" to 1?

I've edited the code a bit, take a look if this is working for you
pawn Код:
CMD:cmds(playerid, params[])
{
    if(Commands[playerid]==1 && Menu[playerid] == 0)
    {
      Menu[playerid] = 1;
      TextDrawShowForPlayer(playerid, Textdraw66);
      TextDrawShowForPlayer(playerid, Textdraw67);
      TextDrawShowForPlayer(playerid, Textdraw68);
      TextDrawShowForPlayer(playerid, Textdraw69);
      TextDrawShowForPlayer(playerid, Textdraw70);
      TextDrawShowForPlayer(playerid, Textdraw71);
      TextDrawShowForPlayer(playerid, Textdraw72);
      TextDrawShowForPlayer(playerid, Textdraw73);
      TextDrawShowForPlayer(playerid, Textdraw74);
      TextDrawShowForPlayer(playerid, Textdraw75);
      TextDrawShowForPlayer(playerid, Textdraw76);
      TextDrawShowForPlayer(playerid, Textdraw77);
      TextDrawShowForPlayer(playerid, Textdraw78);
      TextDrawShowForPlayer(playerid, Textdraw79);
      TextDrawShowForPlayer(playerid, Textdraw80);
      TextDrawShowForPlayer(playerid, Textdraw81);
      TextDrawShowForPlayer(playerid, Textdraw82);
      TextDrawShowForPlayer(playerid, Textdraw83);
      TextDrawShowForPlayer(playerid, Textdraw84);
      TextDrawShowForPlayer(playerid, Textdraw85);
      TextDrawShowForPlayer(playerid, Textdraw86);
      TextDrawShowForPlayer(playerid, Textdraw87);
      TextDrawShowForPlayer(playerid, Textdraw88);
      TextDrawShowForPlayer(playerid, Textdraw89);
      TextDrawShowForPlayer(playerid, Textdraw90);
      TextDrawShowForPlayer(playerid, Textdraw91);
      TextDrawShowForPlayer(playerid, Textdraw92);
      TextDrawShowForPlayer(playerid, Textdraw93);
      TextDrawShowForPlayer(playerid, Textdraw94);
      TextDrawShowForPlayer(playerid, Textdraw95);
      TextDrawShowForPlayer(playerid, Textdraw96);
      TextDrawShowForPlayer(playerid, Textdraw97);
      TextDrawShowForPlayer(playerid, Textdraw98);
      TextDrawShowForPlayer(playerid, Textdraw99);
      TextDrawShowForPlayer(playerid, Textdraw100);
      TextDrawShowForPlayer(playerid, Textdraw101);
      TextDrawShowForPlayer(playerid, Textdraw102);
      TextDrawShowForPlayer(playerid, Textdraw103);
      TextDrawShowForPlayer(playerid, Textdraw104);
      TextDrawShowForPlayer(playerid, Textdraw105);
      TextDrawShowForPlayer(playerid, Textdraw106);
    }
    return 1;
}

if(Menu[playerid] == 1)
        {
            if(Commands[playerid]==1)
            {
               if(strval(text)==1)
               {
                  SendClientMessage(playerid, -1, "{00FFFF}Coming Soon");
                  Menu[playerid] = 0;
               }
            }
            return 1;
        }
   }
   return 1;
}
Reply
#6

I did but when i type /cmds its still not work! they are not given to me the textdrawss
Reply
#7

Quote:
Originally Posted by Man43
Посмотреть сообщение
I did but when i type /cmds its still not work! they are not given to me the textdrawss
maybe your textdraw aren't in correct codes i mean those u created for this cmd
Reply
#8

Quote:
Originally Posted by thegamer355
Посмотреть сообщение
To start of, where are you setting "Commands[playerid] == 1" to 1?
Mind answering this one?

As i think you're never settime "Commands[playerid]" to 1, while it needs it to open the textdraws.

Tell us where it's for, and where you set it to 0, or to 1
Reply
#9

i can't, 1 of the 2 things isn't set correctly.

And as the 2nd one has been fixed already, it must be the first one, no other option

You could try the following:

pawn Код:
CMD:cmds(playerid, params[])
{
    if(Commands[playerid] != 0 && Menu[playerid] == 0)
    {
      Menu[playerid] = 1;
      TextDrawShowForPlayer(playerid, Textdraw66);
      TextDrawShowForPlayer(playerid, Textdraw67);
      TextDrawShowForPlayer(playerid, Textdraw68);
      TextDrawShowForPlayer(playerid, Textdraw69);
      TextDrawShowForPlayer(playerid, Textdraw70);
      TextDrawShowForPlayer(playerid, Textdraw71);
      TextDrawShowForPlayer(playerid, Textdraw72);
      TextDrawShowForPlayer(playerid, Textdraw73);
      TextDrawShowForPlayer(playerid, Textdraw74);
      TextDrawShowForPlayer(playerid, Textdraw75);
      TextDrawShowForPlayer(playerid, Textdraw76);
      TextDrawShowForPlayer(playerid, Textdraw77);
      TextDrawShowForPlayer(playerid, Textdraw78);
      TextDrawShowForPlayer(playerid, Textdraw79);
      TextDrawShowForPlayer(playerid, Textdraw80);
      TextDrawShowForPlayer(playerid, Textdraw81);
      TextDrawShowForPlayer(playerid, Textdraw82);
      TextDrawShowForPlayer(playerid, Textdraw83);
      TextDrawShowForPlayer(playerid, Textdraw84);
      TextDrawShowForPlayer(playerid, Textdraw85);
      TextDrawShowForPlayer(playerid, Textdraw86);
      TextDrawShowForPlayer(playerid, Textdraw87);
      TextDrawShowForPlayer(playerid, Textdraw88);
      TextDrawShowForPlayer(playerid, Textdraw89);
      TextDrawShowForPlayer(playerid, Textdraw90);
      TextDrawShowForPlayer(playerid, Textdraw91);
      TextDrawShowForPlayer(playerid, Textdraw92);
      TextDrawShowForPlayer(playerid, Textdraw93);
      TextDrawShowForPlayer(playerid, Textdraw94);
      TextDrawShowForPlayer(playerid, Textdraw95);
      TextDrawShowForPlayer(playerid, Textdraw96);
      TextDrawShowForPlayer(playerid, Textdraw97);
      TextDrawShowForPlayer(playerid, Textdraw98);
      TextDrawShowForPlayer(playerid, Textdraw99);
      TextDrawShowForPlayer(playerid, Textdraw100);
      TextDrawShowForPlayer(playerid, Textdraw101);
      TextDrawShowForPlayer(playerid, Textdraw102);
      TextDrawShowForPlayer(playerid, Textdraw103);
      TextDrawShowForPlayer(playerid, Textdraw104);
      TextDrawShowForPlayer(playerid, Textdraw105);
      TextDrawShowForPlayer(playerid, Textdraw106);
    }
    return 1;
}
Reply
#10

Quote:
Originally Posted by thegamer355
Посмотреть сообщение
i can't, 1 of the 2 things isn't set correctly.

And as the 2nd one has been fixed already, it must be the first one, no other option

You could try the following:

pawn Код:
CMD:cmds(playerid, params[])
{
    if(Commands[playerid] != 0 && Menu[playerid] == 0)
    {
      Menu[playerid] = 1;
      TextDrawShowForPlayer(playerid, Textdraw66);
      TextDrawShowForPlayer(playerid, Textdraw67);
      TextDrawShowForPlayer(playerid, Textdraw68);
      TextDrawShowForPlayer(playerid, Textdraw69);
      TextDrawShowForPlayer(playerid, Textdraw70);
      TextDrawShowForPlayer(playerid, Textdraw71);
      TextDrawShowForPlayer(playerid, Textdraw72);
      TextDrawShowForPlayer(playerid, Textdraw73);
      TextDrawShowForPlayer(playerid, Textdraw74);
      TextDrawShowForPlayer(playerid, Textdraw75);
      TextDrawShowForPlayer(playerid, Textdraw76);
      TextDrawShowForPlayer(playerid, Textdraw77);
      TextDrawShowForPlayer(playerid, Textdraw78);
      TextDrawShowForPlayer(playerid, Textdraw79);
      TextDrawShowForPlayer(playerid, Textdraw80);
      TextDrawShowForPlayer(playerid, Textdraw81);
      TextDrawShowForPlayer(playerid, Textdraw82);
      TextDrawShowForPlayer(playerid, Textdraw83);
      TextDrawShowForPlayer(playerid, Textdraw84);
      TextDrawShowForPlayer(playerid, Textdraw85);
      TextDrawShowForPlayer(playerid, Textdraw86);
      TextDrawShowForPlayer(playerid, Textdraw87);
      TextDrawShowForPlayer(playerid, Textdraw88);
      TextDrawShowForPlayer(playerid, Textdraw89);
      TextDrawShowForPlayer(playerid, Textdraw90);
      TextDrawShowForPlayer(playerid, Textdraw91);
      TextDrawShowForPlayer(playerid, Textdraw92);
      TextDrawShowForPlayer(playerid, Textdraw93);
      TextDrawShowForPlayer(playerid, Textdraw94);
      TextDrawShowForPlayer(playerid, Textdraw95);
      TextDrawShowForPlayer(playerid, Textdraw96);
      TextDrawShowForPlayer(playerid, Textdraw97);
      TextDrawShowForPlayer(playerid, Textdraw98);
      TextDrawShowForPlayer(playerid, Textdraw99);
      TextDrawShowForPlayer(playerid, Textdraw100);
      TextDrawShowForPlayer(playerid, Textdraw101);
      TextDrawShowForPlayer(playerid, Textdraw102);
      TextDrawShowForPlayer(playerid, Textdraw103);
      TextDrawShowForPlayer(playerid, Textdraw104);
      TextDrawShowForPlayer(playerid, Textdraw105);
      TextDrawShowForPlayer(playerid, Textdraw106);
    }
    return 1;
}
When i use your code they are not show to me the textdraws but I'm trying to Remove {} and then try again When i joining the server again They Show to me the Textdraws but when i press 1 .. 2 they are not sent to me any message Why?

My Code:
PHP код:
CMD:cmds(playeridparams[])
{
      if(
Commands[playerid] != && Menu[playerid] != 0)
      
Menu[playerid] = 1;
      
TextDrawShowForPlayer(playeridTextdraw66);
      
TextDrawShowForPlayer(playeridTextdraw67);
      
TextDrawShowForPlayer(playeridTextdraw68);
      
TextDrawShowForPlayer(playeridTextdraw69);
      
TextDrawShowForPlayer(playeridTextdraw70);
      
TextDrawShowForPlayer(playeridTextdraw71);
      
TextDrawShowForPlayer(playeridTextdraw72);
      
TextDrawShowForPlayer(playeridTextdraw73);
      
TextDrawShowForPlayer(playeridTextdraw74);
      
TextDrawShowForPlayer(playeridTextdraw75);
      
TextDrawShowForPlayer(playeridTextdraw76);
      
TextDrawShowForPlayer(playeridTextdraw77);
      
TextDrawShowForPlayer(playeridTextdraw78);
      
TextDrawShowForPlayer(playeridTextdraw79);
      
TextDrawShowForPlayer(playeridTextdraw80);
      
TextDrawShowForPlayer(playeridTextdraw81);
      
TextDrawShowForPlayer(playeridTextdraw82);
      
TextDrawShowForPlayer(playeridTextdraw83);
      
TextDrawShowForPlayer(playeridTextdraw84);
      
TextDrawShowForPlayer(playeridTextdraw85);
      
TextDrawShowForPlayer(playeridTextdraw86);
      
TextDrawShowForPlayer(playeridTextdraw87);
      
TextDrawShowForPlayer(playeridTextdraw88);
      
TextDrawShowForPlayer(playeridTextdraw89);
      
TextDrawShowForPlayer(playeridTextdraw90);
      
TextDrawShowForPlayer(playeridTextdraw91);
      
TextDrawShowForPlayer(playeridTextdraw92);
      
TextDrawShowForPlayer(playeridTextdraw93);
      
TextDrawShowForPlayer(playeridTextdraw94);
      
TextDrawShowForPlayer(playeridTextdraw95);
      
TextDrawShowForPlayer(playeridTextdraw96);
      
TextDrawShowForPlayer(playeridTextdraw97);
      
TextDrawShowForPlayer(playeridTextdraw98);
      
TextDrawShowForPlayer(playeridTextdraw99);
      
TextDrawShowForPlayer(playeridTextdraw100);
      
TextDrawShowForPlayer(playeridTextdraw101);
      
TextDrawShowForPlayer(playeridTextdraw102);
      
TextDrawShowForPlayer(playeridTextdraw103);
      
TextDrawShowForPlayer(playeridTextdraw104);
      
TextDrawShowForPlayer(playeridTextdraw105);
      
TextDrawShowForPlayer(playeridTextdraw106);
      return 
1;

//OnPlayerText
PHP код:
if(Menu[playerid] == 1)
        {
            if(
Commands[playerid]==1)
            {
               if(
strval(text)==1)
               {
                  
SendClientMessage(playerid, -1"{00FFFF}Coming Soon");
                  
Menu[playerid] = 1;
               }
               if(
strval(text)==2)
               {
                  
SendClientMessage(playerid, -1"{00FFFF}Working on it");
               }
            }
            return 
0;
        }
   }
  return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)