SAM!! Posted June 21, 2018 Share Posted June 21, 2018 السلام عليكم الحين انا بدي هالكلام يشتغل لما اضغط علي زر مثلا addEventHandler("onPlayerDamage",root, function(attacker, weapon, bodypart) if attacker and attacker ~= source and getElementType(attacker) == "player" then if weapon == 0 then killPed(source, attacker, weapon, bodypart) end end end ) وشكرا Link to comment
SAM!! Posted June 21, 2018 Author Share Posted June 21, 2018 1 hour ago, *RayaN-Alharbi. said: set/getElementData مافهمت! Link to comment
#Major . Posted June 21, 2018 Share Posted June 21, 2018 Just now, SAM!! said: مافهمت! انت وش تببي بالضبط؟ Link to comment
SAM!! Posted June 21, 2018 Author Share Posted June 21, 2018 محاولتي client elseif ( source == btn.box ) then playSound("open.wav") guiSetEnabled (btn.box ,false) setTimer(guiSetEnabled, 150000, 1 ,btn.box ,true) triggerServerEvent("onPlayerDamage",getLocalPlayer()) server addEventHandler("onPlayerDamage",root, function(attacker, weapon, bodypart) if attacker and attacker ~= source and getElementType(attacker) == "player" then if weapon == 0 then outputChatBox ("#00FF00=(VIP-System)=#CC0000 : Wait 5 minutes to again.|You take Super Box successfully ",source,255,255,0,true) killPed(source, attacker, weapon, bodypart) end end end ) 2 minutes ago, *RayaN-Alharbi. said: انت وش تببي بالضبط؟ شوف ابي لما اضغط علي زر يخليني لو ضربت احد بالبقس اقتلة فورا ضربة قاضية يعني Link to comment
#Major . Posted June 21, 2018 Share Posted June 21, 2018 elseif ( source == btn.box ) then playSound("open.wav") guiSetEnabled (btn.box ,false) setTimer(guiSetEnabled, 150000, 1 ,btn.box ,true) setElementData(localPlayer,"Damage",true) outputChatBox ("#00FF00=(VIP-System)=#CC0000 : Wait 5 minutes to again.|You take Super Box successfully ",255,255,0,true) addEventHandler("onPlayerDamage",root, function(attacker, weapon, bodypart) if ( getElementData(attacker,"Damage") == true ) then if attacker and attacker ~= source and getElementType(attacker) == "player" then if weapon == 0 then killPed(source, attacker, weapon, bodypart) end end end end ) جرب Link to comment
Rakan# Posted June 21, 2018 Share Posted June 21, 2018 -- server addEventHandler("onPlayerDamage",root, function(attacker, weapon, bodypart) if attacker and attacker ~= source and getElementType(attacker) == "player" and getElementData(attacker,"SPunch") then if weapon == 0 then killPed(source, attacker, weapon, bodypart) end end end ) -- Client addEventHandler("onClientGUIClick",root, function () if source == button1 then local Data = getElementData(localPlayer,"SPunch") if Data and Data == true then setElementData(localPlayer,"SPunch",false) outputChatBox("تم اغلاق خاصية الضربه القاتله") else setElementData(localPlayer,"SPunch",true) outputChatBox("تم فتح خاصية الضربه القاتله") end end end) 1 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now