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;
}
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;
}
!
if(!strcmp.....................)
Originally Posted by grizzlyxXx
It works, am need that all this is on the menu
|
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");