Need help with weapon pickup.
#1

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;
}
Reply
#2

https://sampwiki.blast.hk/wiki/PickupTypes
Reply
#3

ive already tried changing that so that doesnt help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)