Small help
#1

Hello, i have this command to drop the player weapons.

I wanna make just to drop ONLY the current weapon he's holding, how i can fix it?

pawn Код:
CMD:d(playerid, params[])
{
    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 Float:X = x + (random(3) - random(3));
        new Float:Y = y + (random(3) - random(3));
        if(playerweapons[i][1] != 0 && model != -1)
        {
            if(times > DropLimit) times = DropLimit;
            for(new a=0; a<times; a++)
            {
                new pickupid = CreatePickup(model, 3, X, Y, z);
                SetTimerEx("DeletePickup", DeleteTime*1000, false, "d", pickupid);
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
Small help - by Face9000 - 17.10.2012, 19:29
Re : Small help - by lelemaster - 17.10.2012, 20:50
Re: Small help - by Face9000 - 18.10.2012, 09:28
Re: Small help - by Roel - 18.10.2012, 09:32
Re : Small help - by lelemaster - 18.10.2012, 11:12
Re: Re : Small help - by Roel - 18.10.2012, 11:17
Re : Small help - by lelemaster - 18.10.2012, 11:20

Forum Jump:


Users browsing this thread: 1 Guest(s)