Ahmed Ly Posted February 24, 2016 Share Posted February 24, 2016 السلام عليكم وين خطا في هدا اكود ؟؟؟؟ كلنت GUIEditor_Image = {} function trolled() GUIEditor_Image[1] = guiCreateStaticImage(93,439,44,35,"heart.png",false) sound = playSound("Heartbeat.mp3", false) setSoundVolume(sound, 1) setTimer(closewin, 3000, 1) end addEvent("dienoob", true) addEventHandler("dienoob", getRootElement(), trolled) function closewin() guiSetVisible(GUIEditor_Image[1], false) end function wasted (killer, weapon, bodypart) if killer ~= source then guiSetVisible(GUIEditor_Image[1], false) end end addEventHandler("onClientPlayerWasted", getRootElement(), wasted) سيرفر addEventHandler ( "onPlayerWasted", root, function ( _, attacker ) if ( attacker and attacker ~= source and isElement ( attacker ) ) then setElementHealth ( attacker, getElementHealth ( attacker ) + 35 ) triggerClientEvent(attacker,"dienoob",attacker) outputChatBox ( "[--", attacker, 0, 255, 0, true ) end end ) يقولي خطا في Debug في سطر هدا triggerClientEvent(attacker,"dienoob",attacker) Link to comment
YourMind Posted February 24, 2016 Share Posted February 24, 2016 --server addEventHandler ( "onPlayerWasted", root, function ( _, attacker ) if ( attacker ~= false and attacker ~= source ) then setElementHealth ( attacker, getElementHealth ( attacker ) + 35 ) triggerClientEvent(source,"dienoob",source) outputChatBox ( "[--", attacker, 0, 255, 0, true ) end end ) --client image = guiCreateStaticImage(93,439,44,35,"heart.png",false) guiSetVisible (image,false) function trolled() guiSetVisible (image,true) sound = playSound("Heartbeat.mp3", false) setSoundVolume(sound, 1) setTimer(closewin, 3000, 1) end addEvent("dienoob", true) addEventHandler("dienoob", getRootElement(), trolled) function closewin() guiSetVisible(image, false) end Link to comment
Me[Z]oO Posted February 24, 2016 Share Posted February 24, 2016 --server addEventHandler ( "onPlayerWasted", root, function ( _, attacker ) if ( attacker ~= false and attacker ~= source ) then setElementHealth ( attacker, getElementHealth ( attacker ) + 35 ) triggerClientEvent(source,"dienoob",source) outputChatBox ( "[--", attacker, 0, 255, 0, true ) end end ) --client image = guiCreateStaticImage(93,439,44,35,"heart.png",false) guiSetVisible (image,false) function trolled() guiSetVisible (image,true) sound = playSound("Heartbeat.mp3", false) setSoundVolume(sound, 1) setTimer(closewin, 3000, 1) end addEvent("dienoob", true) addEventHandler("dienoob", getRootElement(), trolled) function closewin() guiSetVisible(image, false) end انت هيك عملت التريقر للي رح يموت الي هو السورس وهو يبيه للـ بيقتله جرب triggerClientEvent(attacker,"dienoob") Link to comment
YourMind Posted February 24, 2016 Share Posted February 24, 2016 هو مش محدد عايز ايه (بالظبط Link to comment
Me[Z]oO Posted February 24, 2016 Share Posted February 24, 2016 هو مش محدد عايز ايه (بالظبط يب بس هو يببي التريقر للـ اتاكر attacker Link to comment
Ahmed Ly Posted February 24, 2016 Author Share Posted February 24, 2016 هو مش محدد عايز ايه (بالظبط اني نبيه لم يقتل لاعب يزيد دمه لي قتله +تطلع له صوره و اغنيه انشاء الله فهمت بسس Link to comment
Me[Z]oO Posted February 24, 2016 Share Posted February 24, 2016 هو مش محدد عايز ايه (بالظبط اني نبيه لم يقتل لاعب يزيد دمه لي قتله +تطلع له صوره و اغنيه انشاء الله فهمت بسس triggerClientEvent(attacker,"dienoob") جرب ~ Link to comment
KariiiM Posted February 24, 2016 Share Posted February 24, 2016 Ahlan, al code bita3ak kan totally messy. l hine rani fixito, --Client side: GUIEditor_Image = {} GUIEditor_Image[1] = guiCreateStaticImage(93,439,44,35,"heart.png",false) function trolled() local sound = playSound("Heartbeat.mp3", false) if (sound and isElement(sound)) then setSoundVolume(sound, 1.0) guiSetVisible(GUIEditor_Image[1],true) setTimer(closewin, 3000, 1) end end addEvent("dienoob", true) addEventHandler("dienoob", getRootElement(), trolled) function closewin() guiSetVisible(GUIEditor_Image[1], false) end --Server side: addEventHandler("onPlayerWasted", root, function (_, attacker) if (attacker and attacker ~= source and isElement(attacker)) then setElementHealth(attacker, getElementHealth(attacker) + 35 ) triggerClientEvent(attacker,"dienoob",attacker) outputChatBox("[--", attacker, 0, 255, 0, true) end end) Tahiyati, KariM Link to comment
#Soking Posted February 25, 2016 Share Posted February 25, 2016 triggerClientEvent("dienoob",attacker) Link to comment
Jupi Posted February 25, 2016 Share Posted February 25, 2016 triggerClientEvent("dienoob",attacker) كدة التريقر هيوصل لكل العناصر triggerClientEvent(attacker, "dienoob", attacker) Link to comment
Simple. Posted February 25, 2016 Share Posted February 25, 2016 -- Server Side addEventHandler("onPlayerWasted", root, function (_, attacker) if attacker and attacker ~= source and getElementType ( attacker ) == 'player' then setElementHealth(attacker, getElementHealth(attacker) + 35 ) triggerClientEvent(attacker,"dienoob",attacker) outputChatBox("[", attacker, 0, 255, 0, true) end end) -- Client Side local img = guiCreateStaticImage(93,439,44,35,"heart.png",false) addEvent("dienoob", true) addEventHandler("dienoob", getRootElement(), function () if isElement ( sound ) then destroyElement ( sound ) end sound = playSound("Heartbeat.mp3", false) setSoundVolume(sound, 1.0) guiSetVisible(img,true) setTimer(guiSetVisible, 3000, 1, img, false) end) Link to comment
Me[Z]oO Posted February 25, 2016 Share Posted February 25, 2016 ^ انت مصطفى سعدي مدري وش قلعت اسمك ! اوووبس ي رقل وربي انك كفو كشفته Link to comment
Ahmed Ly Posted February 25, 2016 Author Share Posted February 25, 2016 Ahlan, al code bita3ak kan totally messy.l hine rani fixito, --Client side: GUIEditor_Image = {} GUIEditor_Image[1] = guiCreateStaticImage(93,439,44,35,"heart.png",false) function trolled() local sound = playSound("Heartbeat.mp3", false) if (sound and isElement(sound)) then setSoundVolume(sound, 1.0) guiSetVisible(GUIEditor_Image[1],true) setTimer(closewin, 3000, 1) end end addEvent("dienoob", true) addEventHandler("dienoob", getRootElement(), trolled) function closewin() guiSetVisible(GUIEditor_Image[1], false) end --Server side: addEventHandler("onPlayerWasted", root, function (_, attacker) if (attacker and attacker ~= source and isElement(attacker)) then setElementHealth(attacker, getElementHealth(attacker) + 35 ) triggerClientEvent(attacker,"dienoob",attacker) outputChatBox("[--", attacker, 0, 255, 0, true) end end) Tahiyati, KariM not work Link to comment
KariiiM Posted February 25, 2016 Share Posted February 25, 2016 Try this, --Client side: GUIEditor_Image = {} GUIEditor_Image[1] = guiCreateStaticImage(93,439,44,35,"heart.png",false) local sound function trolled() if sound and isElement(sound) then destroyElement(sound) sound = nil end sound = playSound("Heartbeat.mp3", false) setSoundVolume(sound, 1.0) guiSetVisible(GUIEditor_Image[1],true) setTimer(closewin, 3000, 1) end addEvent("dienoob", true) addEventHandler("dienoob", getRootElement(), trolled) function closewin() guiSetVisible(GUIEditor_Image[1], false) end --Server side: addEventHandler("onPlayerWasted", root, function (_, attacker) if (attacker and attacker ~= source and isElement(attacker)) then setElementHealth(attacker, getElementHealth(attacker) + 35 ) triggerClientEvent(attacker,"dienoob",attacker) outputChatBox("[--", attacker, 0, 255, 0, true) end end) Link to comment
!#NssoR_) Posted February 25, 2016 Share Posted February 25, 2016 addEventHandler("onPlayerWasted", root, function (_, attacker) if ( attacker and attacker ~= source ) then setElementHealth(attacker, getElementHealth(attacker) + 35 ) triggerClientEvent(attacker,"dienoob",attacker) outputChatBox("[--", attacker, 0, 255, 0, true) end end) img = guiCreateStaticImage(93,439,44,35,"heart.png",false) guiSetVisible(img,false) addEvent("dienoob", true) addEventHandler('dienoob',root, function () if ( isElement(sound) ) then destroyElement(sound) end sound = playSound("Heartbeat.mp3", false) setSoundVolume(sound, 1.0) guiSetVisible(img,true) setTimer(closewin, 3000, 1) end) function closewin() guiSetVisible(img, false) end Link to comment
KariiiM Posted February 25, 2016 Share Posted February 25, 2016 Yeah true, ana mwafi9 ma3ak He forgot this line in below, I thought he had that in the full code already guiSetVisible(GUIEditor_Image[1], false) Link to comment
Ahmed Ly Posted February 25, 2016 Author Share Posted February 25, 2016 Try this,--Client side: GUIEditor_Image = {} GUIEditor_Image[1] = guiCreateStaticImage(93,439,44,35,"heart.png",false) local sound function trolled() if sound and isElement(sound) then destroyElement(sound) sound = nil end sound = playSound("Heartbeat.mp3", false) setSoundVolume(sound, 1.0) guiSetVisible(GUIEditor_Image[1],true) setTimer(closewin, 3000, 1) end addEvent("dienoob", true) addEventHandler("dienoob", getRootElement(), trolled) function closewin() guiSetVisible(GUIEditor_Image[1], false) end --Server side: addEventHandler("onPlayerWasted", root, function (_, attacker) if (attacker and attacker ~= source and isElement(attacker)) then setElementHealth(attacker, getElementHealth(attacker) + 35 ) triggerClientEvent(attacker,"dienoob",attacker) outputChatBox("[--", attacker, 0, 255, 0, true) end end) Thank you !!! Link to comment
KariiiM Posted February 26, 2016 Share Posted February 26, 2016 Thank you !!! You're welcome 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