SA-MP Forums Archive
Need help with weapon pickup. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need help with weapon pickup. (/showthread.php?tid=244599)



Need help with weapon pickup. - TheYoungCapone - 27.03.2011

I have problems with this when player dies it drops weapons but when another player picks them up they respawn.
How to make it so when they are picked up they disappear.
Код:
public DropPlayerWeapons(playerid)
{
    new playerweapons[13][2];
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid, x, y, z);

	for(new i=0;i<13;i++){
        GetPlayerWeaponData(playerid, i, playerweapons[i][0], playerweapons[i][1]);
        new model=GetWeaponModel(playerweapons[i][0]);
        new times=floatround(playerweapons[i][1]/10.0001);
        new string[256];
        format(string, sizeof(string), "%d", times);
        times=strval(string);
        new Float:X=x+(random(3)-random(3));
        new Float:Y=y+(random(3)-random(3));
        if(playerweapons[i][1]!=0)
                {
                    if(times>DropLimit) times=DropLimit;
                	for(new a=0;a<times;a++)
                        {
                            if(model!=-1)
                                {
                                        new pickupid=CreatePickup(model, 2, X, Y, z);
                                        SetTimerEx("DeletePickup", DeleteTime*1000, false, "d", pickupid);
                                }
                        }
                }
        }
 	return 1;
}



Re: Need help with weapon pickup. - Lewwy - 27.03.2011

https://sampwiki.blast.hk/wiki/PickupTypes


Re: Need help with weapon pickup. - TheYoungCapone - 27.03.2011

ive already tried changing that so that doesnt help