Advertisement
OneTallor

Untitled

Jun 28th, 2016
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.58 KB | None | 0 0
  1.  
  2. local nyomozas = {}
  3.  
  4. function Nyomozas(thePlayer, commandName, targetPlayer)
  5. local csapat = getPlayerTeam ( thePlayer )
  6. local csapatnev = getTeamName( csapat )
  7. local admin = tonumber(exports.global:getPlayerAdminLevel(thePlayer))
  8. local hitman = getElementData(player,"hitman") or 0
  9. if (csapat) or admin > 0 or (hitman~=0) then
  10. if csapatnev == "Rendőrség" or admin > 0 then
  11. if not (targetPlayer) then
  12. outputChatBox("#ffffff[#6CAC6FSosa #ffffff- #FFA700Használat#ffffff]: /" .. commandName .. " [ID/Név]", thePlayer, 255, 0, 0,true)
  13. else
  14. local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
  15.  
  16. if targetPlayer then
  17. if not nyomozas[ thePlayer ] or nyomozas[ thePlayer ] == nil then
  18. outputChatBox("#ffffff[#6CAC6FSosa #ffffff- #FFA700Nyomozas#ffffff] Elkezdtél nyomozni egy személyt!",thePlayer, 255, 0, 0,true)
  19. nyomozas[ thePlayer ] = targetPlayer
  20. triggerClientEvent (thePlayer,"Nyomozas", thePlayer, targetPlayer)
  21. else
  22. outputChatBox("#ffffff[#6CAC6FSosa #ffffff- #FFA700Nyomozas#ffffff] Te már nyomoztál valakit! Nyomozás #D75656kikapcsolásához #ffffffírd be a '#53bfdc/nyomozaski#ffffff' parancsot!", thePlayer,255, 0, 0,true)
  23. end
  24. end
  25. end
  26. else
  27. outputChatBox("#ffffff[#6CAC6FSosa #ffffff- #FFA700Nyomozas#ffffff] Nem vagy tagja a '#53bfdc".. csapatnev .."#ffffff' tagja!",thePlayer, 255, 0, 0,true)
  28. end
  29. end
  30. end
  31.  
  32. addCommandHandler("nyomozas",Nyomozas)
  33. addCommandHandler("Nyomozas",Nyomozas)
  34. function NyomozasKi(thePlayer, parancs)
  35. if nyomozas[ thePlayer ] or nyomozas[ thePlayer ] ~= nil then
  36. outputChatBox("#ffffff[#6CAC6FSosa #ffffff- #FFA700Nyomozas#ffffff] Nyomozás kikapcsolva!",thePlayer, 255, 0, 0,true)
  37. nyomozas[ thePlayer ] = nil
  38. triggerClientEvent (thePlayer, "NyomozasKi", thePlayer)
  39. else
  40. outputChatBox("#ffffff[#6CAC6FSosa #ffffff- #FFA700Nyomozas#ffffff] Nem nyomoztál le még senkit!", thePlayer, 255, 0, 0,true)
  41. end
  42. end
  43. addCommandHandler("NyomozasKi",NyomozasKi)
  44. addCommandHandler("nyomozaski",NyomozasKi)
  45.  
  46. function onPlayerWasted ( ammo, attacker, weapon, bodypart )
  47. for key, value in ipairs(getElementsByType("player")) do
  48. if nyomozas[ value ] or nyomozas[ value ] ~= nil then
  49. if nyomozas[ value ] == source then
  50. outputChatBox("#ffffff[#6CAC6FSosa #ffffff- #FFA700Nyomozas#ffffff]: A jel megszűnt... (( Meghalt ))", value, 255, 0, 0,true)
  51. triggerClientEvent(value, "NyomozasKi", value)
  52. nyomozas[ value ] = nil
  53. end
  54. end
  55. end
  56. end
  57. addEventHandler ( "onPlayerWasted", getRootElement(), onPlayerWasted )
  58.  
  59. function quitPlayer ( quitType )
  60. for key, value in ipairs(getElementsByType("player")) do
  61. if nyomozas[ value ] or nyomozas[ value ] ~= nil then
  62. if nyomozas[ value ] == source then
  63. outputChatBox("#ffffff[#6CAC6FSosa #ffffff- #FFA700Nyomozas#ffffff]: A jel megszűnt... (( Kilépés: " .. quitType .. " ))", value, 255, 0, 0,true)
  64. triggerClientEvent(value, "NyomozasKi", value)
  65. nyomozas[ value ] = nil
  66. end
  67. end
  68. end
  69. end
  70. addEventHandler ( "onPlayerQuit", getRootElement(), quitPlayer )
  71.  
  72.  
  73.  
  74.  
  75.  
  76. C---------------------------
  77. local lenyomozblip = nil
  78.  
  79. function Nyomozas(jatekos)
  80. if lenyomozblip == nil then
  81. lenyomozblip = createBlipAttachedTo( jatekos, 0, 2, 255, 0, 0 )
  82. end
  83. end
  84. addEvent("Nyomozas",true)
  85. addEventHandler("Nyomozas",getRootElement(),Nyomozas)
  86.  
  87. function NyomozasKi()
  88. if lenyomozblip ~= nil then
  89. destroyElement(lenyomozblip)
  90. lenyomozblip = nil
  91. end
  92. end
  93. addEvent("NyomozasKi",true)
  94. addEventHandler("NyomozasKi",getRootElement(),NyomozasKi)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement