/dropgun problem
#8

Quote:
Originally Posted by Bobman
Посмотреть сообщение
Well, I'm trying to make it like when I type /dropgun it'd remove my weapon + spawn an object on the ground which are pickupable. This happens when I use my script to /dropgun. It spawns objects on the ground of all my weapons but only removes one. I'm trying to create it like when you use /dropgun it removes your gun and ONLY spawns one object on the ground. http://i.imgur.com/qsTr3.png
On the weapon drop command you are defining it to drop all the guns
pawn Код:
GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]); the i is the slot for example. slot 2 is for pistols.
I would do it like this.

pawn Код:
command(dropgun, playerid, params[])
{
    new GunID = GetPlayerWeapon(playerid);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    RemovePlayerWeapon(playerid, GunID);
    RemovePickups(playerid);
    new Float:x, Float:y, Float:z, dropped;
    GetPlayerPos(playerid,x,y,z);
    for(new i=0; i<13; i++)
    {
        new weapon, ammo;
        weapon = GetPlayerWeapon(playerid);
                 ammo = GetPlayerAmmo(playerid);
        if((ammo > 0 || weapon == 1) && weapon != 0)
        {
            new model = GetModel(weapon);
            if(model != -1)
            {
                WeaponData[playerid][i][0] = weapon;
                WeaponData[playerid][i][1] = ammo;
                dropped++;
            }
        }
    }
Reply


Messages In This Thread
/dropgun problem - by Bobman - 02.01.2013, 20:57
Re: /dropgun problem - by aslan890 - 02.01.2013, 21:02
Re : /dropgun problem - by [HRD]Mar1 - 02.01.2013, 21:02
Re: /dropgun problem - by Bobman - 02.01.2013, 21:05
Re : /dropgun problem - by [HRD]Mar1 - 02.01.2013, 21:09
Re: Re : /dropgun problem - by Bobman - 02.01.2013, 21:14
Re : Re: Re : /dropgun problem - by [HRD]Mar1 - 02.01.2013, 21:18
Re: Re : /dropgun problem - by jueix - 02.01.2013, 21:20
Re: Re : Re: Re : /dropgun problem - by Bobman - 02.01.2013, 21:24
Re: Re : Re: Re : /dropgun problem - by jueix - 02.01.2013, 21:26

Forum Jump:


Users browsing this thread: 2 Guest(s)