17.10.2009, 13:51
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;
}