Jump to content

Hrayed

Members
  • Posts

    6
  • Joined

  • Last visited

Hrayed's Achievements

Vic

Vic (3/54)

0

Reputation

  1. Hrayed

    help

    Thanks for help.
  2. Hrayed

    help

    Fixed everything now, just the repawn time left. Can you teach me how to make the pickup never appear again after someone take it?
  3. Hrayed

    help

    Works, but when I type /dropweapon 10 I lose 10 ammo, and when I pick up them again I win 50 ammo; and when I type /dropweapon it drop 50 ammo but I don't lose anything. Also I don't want that the dropped weapon spawn again after when someone take it.
  4. Hrayed

    help

    Thanks Kenix, works now. But the problem is that I can't take it back after when it is dropped. Also if you might help me changing the command to /dropweapon [amount of ammo]
  5. Hrayed

    help

    Errors: dropweapon.lua:2: Bad argument @ 'getElementPosition' dropweapon.lua:3: Bad argument @ 'getPedWeapon'
  6. Hrayed

    help

    Guy I need help with script of drop ammo I'd like to make it /dropweapon and it drops 50 ammo of the current weapon Client: function createPickup (player) local px, py, pz = getElementPosition ( player ) local currentweapon = getPlayerWeapon ( player ) if (currentweapon) then drop = createPickup ( px, py, pz, 2, currentweapon, 3000, 50) end end addCommandHandler ( "dropweapon", createPickup) server: function onPickupHitFunc ( thePlayer ) if getPickupType ( drop ) == 2 then local ammo = getPickupAmmo ( drop ) if ammo < 50 then local weapon = getPickupWeapon ( drop ) giveWeaponAmmo ( thePlayer, weapon, 50 ) outputChatBox ( "You just picked up a " .. getWeaponNameFromID(weapon) .. " with " .. ammo .. " ammo", thePlayer ) end end end addEventHandler ( "onPickupHit", getRootElement(), onPickupHitFunc ) Need help
×
×
  • Create New...