Advertisement
Guest User

Perchas

a guest
Dec 9th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.95 KB | None | 0 0
  1.  
  2. --outputChatBox("#00ff00[Z-E]#FFFFFF Script de dropeo activado, usa /drop para utilizarlo", getRootElement(),255, 255, 255, true)
  3.  
  4.  
  5.  
  6. addCommandHandler("drop", function(thePlayer)
  7.  
  8.  
  9. x, y, z = getElementPosition(thePlayer)
  10. arma = getPedWeapon (thePlayer)
  11. municion = getPedTotalAmmo(thePlayer)
  12. nombre = getWeaponNameFromID (arma)
  13. if arma > 1 then
  14.             takeWeapon(thePlayer, arma)
  15.             takeWeaponAmmo (thePlayer, arma, municion )
  16.             pickup = createPickup(x, y+2, z, 2, arma, 0,  municion)
  17.             outputChatBox("#00ff00[Z-E]#FFFFFF Has soltado el arma "..nombre, thePlayer, 255, 255, 255, true)
  18.             else
  19.     end
  20. addEventHandler("onPickupUse", pickup, function (thePlayer)
  21.  
  22. arma = getPedWeapon (thePlayer)
  23. municion = getPedTotalAmmo(thePlayer,arma,municion)
  24.  
  25. dar = giveWeapon (thePlayer, arma, municion)
  26. destruir = destroyElement(source)
  27. limpiar()
  28.  
  29. end)
  30. end)
  31.  
  32. function limpiar ()
  33.  
  34. destroyElement(pickup)
  35.  
  36. end
  37. setTimer(limpiar,30000,0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement