27.09.2018, 14:53
Now you are deleting only the very last weapon
do the same with deletion part
PHP код:
function create_player_drops(playerid)
{
new Float: x, Float: y, Float: z, p_weapon, p_ammo, getspace;
// Health
GetPlayerPos(playerid, x, y, z);
pickup_Health = CreatePickup(1240, 3, x, y+1, z, -1); // 1240 health pickup
for (new i = 0; i < 12; i++){
// weapon pickups
GetPlayerWeaponData(playerid, i, p_weapon, p_ammo);
if(p_weapon > 0)
{
pickup_Weapon[getspace] = CreatePickup(WeaponObject(p_weapon), 3, x+getspace, y, z, -1);
getspace++;
}
}
SetTimerEx("DestroyPlayerDrops", 10000, false, "i", playerid);
return 1;
}