Pls Help Me :(
#1

How to do that this feature is on the menu?

pawn Код:
if(!strcmp(cmdtext, "/inv", true) || !strcmp(cmdtext, "/inventory", true))
  {
    if(IsPlayerConnected(playerid))
    {
      if(gPlayerLogged[playerid] == 0)
      {
        SendClientMessage(playerid, COLOR_GREY, "  You need to login first ! ");
        return 1;
      }
      new gunname[100];
      GetWeaponName(PlayerInfo[playerid][pInvWeapon], gunname, sizeof(gunname));
      SendClientMessage(playerid, COLOR_LIGHT_BLUE, "__________ Inventory __________");
      if(PlayerInfo[playerid][pInvWeapon] != 0 && PlayerInfo[playerid][pInvAmmo] != 0)
      {
        format(string, sizeof(string), "Weapon: %s, Ammo: %d", gunname, PlayerInfo[playerid][pInvAmmo]);
        SendClientMessage(playerid, COLOR_WHITE, string);
            }
            else
            {
              SendClientMessage(playerid, COLOR_WHITE, " Inventory is empty.");
            }
      SendClientMessage(playerid, COLOR_LIGHT_BLUE, "_______________________________");
      SendClientMessage(playerid, COLOR_WHITE, "HINT: /takegun /putgun");
    }
    return 1;
  }
Reply
#2

pawn Код:
if(strcmp(cmdtext, "/inv", true) || strcmp(cmdtext, "/inventory", true)) // By Ozas
  {
    if(IsPlayerConnected(playerid))
    {
      if(gPlayerLogged[playerid] == 0)
      {
        SendClientMessage(playerid, COLOR_GREY, "  You need to login first ! ");
        return 1;
      }
      new gunname[100];
      GetWeaponName(PlayerInfo[playerid][pInvWeapon], gunname, sizeof(gunname));
      SendClientMessage(playerid, COLOR_LIGHT_BLUE, "__________ Inventory __________");
      if(PlayerInfo[playerid][pInvWeapon] != 0 && PlayerInfo[playerid][pInvAmmo] != 0)
      {
        format(string, sizeof(string), "Weapon: %s, Ammo: %d", gunname, PlayerInfo[playerid][pInvAmmo]);
        SendClientMessage(playerid, COLOR_WHITE, string);
            }
            else
            {
              SendClientMessage(playerid, COLOR_WHITE, " Inventory is empty.");
            }
      SendClientMessage(playerid, COLOR_LIGHT_BLUE, "_______________________________");
      SendClientMessage(playerid, COLOR_WHITE, "HINT: /takegun /putgun");
    }
    return 1;
  }
Reply
#3

I do not see what you have done? I do not see what you have done? I want to do this feature on the menu
Reply
#4

Just removed that
pawn Код:
!
from the code .. It was previously like this

pawn Код:
if(!strcmp.....................)
Reply
#5

It works, am need that all this is on the menu
Reply
#6

Quote:
Originally Posted by grizzlyxXx
It works, am need that all this is on the menu
So do you mean that the code is now working ?
Reply
#7

I think he wants something with menus. Try to explain a bit better please.
Reply
#8


Oh , so you want a menu to be shown when somebody types this command ?
Reply
#9

I want to make this feature less than it is now and on the [MENU]
Reply
#10

such

pawn Код:
Inventor = CreateMenu("Inventor", 1, 50.0, 180.0, 200.0, 200.0);
      AddMenuItem(Inventor, 0, "Weapon: %s, Ammo: %d", gunname, PlayerInfo[playerid][pInvAmmo]);
     AddMenuItem(Inventor, 0, "Weapon: %s, Ammo: %d", gunname, PlayerInfo[playerid][pInvAmmo]);
     AddMenuItem(Inventor, 0, "Weapon: %s, Ammo: %d", gunname, PlayerInfo[playerid][pInvAmmo]);
      AddMenuItem(Inventor, 0, "Weapon: %s, Ammo: %d", gunname, PlayerInfo[playerid][pInvAmmo]);
        AddMenuItem(Inventor, 0, "Weapon: %s, Ammo: %d", gunname, PlayerInfo[playerid][pInvAmmo]);
        AddMenuItem(Inventor, 0, "-~r~Iseiti");
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)