/dropgun problem
#1

Код:
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;
	    GetPlayerWeaponData(playerid, i, weapon, ammo);
	    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++;
			}
	    }
	}
So. I've got a filterscript that drops my weapons when I die. However, I'm creating a command /dropgun so I could drop my gun on the ground like on player death but it seems to drop all of my guns on the ground when I type /dropgun. However it only removes my gun that were in use and spawns objects from all of my guns. Any idea?

Thanks
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: 3 Guest(s)