How do i make more slots in the inventory please help
#1

pawn Код:
if(!strcmp(cmdtext, "/putgun", true)) // By Wizzy
    {
        if(IsPlayerConnected(playerid))
        {
            if(gPlayerLogged[playerid] == 0)
            {
                SendClientMessage(playerid, COLOR_GREY, "  You need to login first !");
                return 1;
            }
            if(PlayerInfo[playerid][pInvWeapon] != 0 || PlayerInfo[playerid][pInvAmmo] != 0)
            {
                SendClientMessage(playerid, COLOR_GREY, "  You have placed something at your inventory already !");
                return 1;
            }

            new gunID = GetPlayerWeapon(playerid);
            new gunAmmo = GetPlayerAmmo(playerid);

            if(gunID != 0 && gunAmmo != 0)
            {
                ReduceTime[playerid] = 5;
                SetTimerEx("ReduceTimer", 3000, false, "i", playerid);
                PlayerInfo[playerid][pInvWeapon] = gunID;
                PlayerInfo[playerid][pInvAmmo] = gunAmmo;
                ResetPlayerAdminWeaponEx(playerid, gunID);
                GetPlayerName(playerid, sendername, sizeof(sendername));
                new gunname[100];
                GetWeaponName(gunID, gunname, sizeof(gunname));
                format(string, sizeof(string), "  %s Lean his hands to his backpack, unzipping it and puts a %s in it.", sendername, gunname);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                return 1;
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "  You don't have a gun to put in ! ");
                return 1;
            }
        }
        return 1;
    }
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)