Jump to content

Help


Ahmed Ly

Recommended Posts

client

GUIEditor = { 
    label = {}, 
} 
GUIEditor.label[1] = guiCreateLabel(288, 306, 158, 45, "Head_Shot + 5", false) 
local font_0 = guiCreateFont("Dragon.ttf",13) 
guiSetFont(GUIEditor.label[1], font_0) 
guiLabelSetColor(GUIEditor.label[1], 24, 49, 230) 
guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) 
  
    guiSetVisible(GUIEditor.label[1],false) 
  
  
 function head() 
     playSound("HeadShot.mp3") 
    guiSetVisible(GUIEditor.label[1],true) 
  setTimer(closewin, 3000, 1) 
end 
  
addEvent("text", true) 
addEventHandler("text", getRootElement(), head) 
  
function closewin() 
        guiSetVisible(GUIEditor.label[1],false) 
end 

server

addEventHandler("onPlayerWasted",root,  
function  ( _,attacker )  
  if (attacker and attacker ~= source and isElement(attacker)) and bodypart  == 9 ) then   
  exports["topbarchat"]:sendClientMessage ( "[server-Dragon] Head Shot",attacker, 0, 255, 0 )  
  triggerClientEvent(attacker,"text",attacker)  
                end 
      end 
) 

Link to comment
addEventHandler("onPlayerWasted", root 
function(attacker, weapon, ammo, bodypart) 
   if (attacker and attacker ~= source and isElement(attacker) and bodypart == 9) then 
       exports["topbarchat"]:sendClientMessage("[server-Dragon]  Head Shot", attacker, 0, 255, 0) 
       triggerClientEvent(attacker , "text", attacker) 
    end 
end) 

Link to comment
addEventHandler("onPlayerWasted", root 
function(attacker, weapon, ammo, bodypart) 
   if (attacker and attacker ~= source and isElement(attacker) and bodypart == 9) then 
       exports["topbarchat"]:sendClientMessage("[server-Dragon]  Head Shot", attacker, 0, 255, 0) 
       triggerClientEvent(attacker , "text", attacker) 
    end 
end) 

not work

:?:

Link to comment
addEventHandler("onPlayerWasted", root, 
function(attacker, weapon, ammo, bodypart) 
    if (attacker and attacker ~= source and isElement(attacker) and getElementType(attacker) == "player" and bodypart == 9 )then 
        exports["topbarchat"]:sendClientMessage("[server-Dragon] Head shot", attacker, 0, 255, 0) 
        triggerClientEvent(attacker, "text", attacker) 
    end 
end) 

Link to comment

try this

  
addEventHandler("onPlayerDamage", root, 
function(attacker, attackerweapon, bodypart) 
     if bodypart == 9 then 
      killPlayer ( source ) 
         exports["topbarchat"]:sendClientMessage("[server Dragon] Head shot", attacker, 0, 255, 0) 
         triggerClientEvent(attacker, "text", attacker) 
     end 
end) 
  

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...