Advertisement
Guest User

removefrag.lua

a guest
Jun 16th, 2014
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.67 KB | None | 0 0
  1. local moneyRed = 2000000 -- Preรงo cobrado para remover o frag e red skull
  2. local moneyBlack = 4000000 -- Preรงo cobrado para remover o frag e black skull
  3. local moneySkullNone = 100000 -- Preรงo cobrado para remover o frag
  4.  
  5. function onSay(cid, words, param, channel)
  6. local pid = getPlayerGUID(cid)
  7.  
  8. if getCreatureSkullType(cid) == 4 then
  9. if doPlayerRemoveMoney(cid, moneyRed) then
  10.  
  11. doCreatureSetSkullType(cid, 0)
  12. doPlayerSendTextMessage(cid, 19, 'His frags and red skull were removed for '.. moneyRed ..' golds. You will be logged off in 5 seconds.')
  13. doSendMagicEffect(getPlayerPosition(cid), 14)
  14. doRemoveConditions(cid, CONDITION_INFIGHT)
  15. doRemoveCreature(cid)
  16. db.executeQuery("UPDATE players SET skulltime = 0 WHERE id = ".. pid ..";")
  17. db.executeQuery("UPDATE killers SET unjustified = 0 WHERE id IN (SELECT kill_id FROM player_killers WHERE player_id = " .. pid .. ");")
  18. else
  19.  
  20. doPlayerSendTextMessage(cid, 19, 'You don\'t have enough money, it takes '.. moneyRed ..' golds')
  21. doSendMagicEffect(getPlayerPosition(cid), 2)
  22. end
  23. return TRUE
  24. end
  25.  
  26. if getCreatureSkullType(cid) == 5 then
  27. if doPlayerRemoveMoney(cid, moneyBlack) then
  28.  
  29. doCreatureSetSkullType(cid, 0)
  30. doPlayerSendTextMessage(cid, 19, 'His frags and black skull were removed for '.. moneyBlack ..' golds. You will be logged off in 5 seconds.')
  31. doSendMagicEffect(getPlayerPosition(cid), 14)
  32. doRemoveConditions(cid, CONDITION_INFIGHT)
  33. doRemoveCreature(cid)
  34. db.executeQuery("UPDATE players SET skulltime = 0 WHERE id = ".. pid ..";")
  35. db.executeQuery("UPDATE killers SET unjustified = 0 WHERE id IN (SELECT kill_id FROM player_killers WHERE player_id = " .. pid .. ");")
  36. else
  37.  
  38. doPlayerSendTextMessage(cid, 19, 'You don\'t have enough money, it takes '.. moneyBlack ..' golds')
  39. doSendMagicEffect(getPlayerPosition(cid), 2)
  40. end
  41. return TRUE
  42. end
  43.  
  44. if getCreatureSkullType(cid) <= 3 then
  45. if doPlayerRemoveMoney(cid, moneySkullNone) then
  46.  
  47. doCreatureSetSkullType(cid, 0)
  48. doPlayerSendTextMessage(cid, 19, 'His frags were removed for '.. moneySkullNone ..' golds. You will be logged off in 5 seconds.')
  49. doSendMagicEffect(getPlayerPosition(cid), 14)
  50. doRemoveConditions(cid, CONDITION_INFIGHT)
  51. doRemoveCreature(cid)
  52. db.executeQuery("UPDATE players SET skulltime = 0 WHERE id = ".. pid ..";")
  53. db.executeQuery("UPDATE killers SET unjustified = 0 WHERE id IN (SELECT kill_id FROM player_killers WHERE player_id = " .. pid .. ");")
  54. else
  55.  
  56. doPlayerSendTextMessage(cid, 19, 'You don\'t have enough money, it takes '.. moneySkullNone ..' golds')
  57. doSendMagicEffect(getPlayerPosition(cid), 2)
  58. end
  59. return TRUE
  60. end
  61. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement