01.06.2010, 13:48
Hello. I did just fall out after the death of weapons, but something with them is not so, because when a player dies after the show instead of a weapon like a minigun pickup is based on a 2 miniguns etc.
Here's the code:
Please help
Here's the code:
Код:
new Float:x, Float:y, Float:z, weaponid[13], ammo[13], pickid; GetPlayerPos(playerid, x, y, z); pickid = CreateDynamicPickup(1550, 2, x, y, z, -1); DropPickUp[pickid][MoneyPick] = true; SetTimerEx("DestroyDropPickup", 10000, false, "d", pickid); for(new slot; slot < 13; slot++) { GetPlayerWeaponDataEx(playerid, slot, weaponid[slot], ammo[slot]); if(weaponid[slot] != 0 && ammo[slot] != 0) { new Float:wX = x+(random(3)-random(3)); new Float:wY = y+(random(3)-random(3)); pickid = CreateDynamicPickup(DropWeapon[weaponid[slot]], 2, wX, wY, z, -1); DropPickUp[pickid][WeapID] = weaponid[slot]; DropPickUp[pickid][Amunicja] = ammo[slot]; SetTimerEx("DestroyDropPickup", 10000, false, "d", pickid); } }