Jw8. Posted August 15, 2017 Posted August 15, 2017 سلام عليكم ! ابي كود عند قتل 10 لاعبين ياخذ صورة killWasted = guiCreateStaticImage(1113, 298, 243, 239, "pack/gold_package.png", false) لو سمحتو تقدرو ؟
Jw8. Posted August 15, 2017 Author Posted August 15, 2017 11 minutes ago, Default said: 'onPlayerWasted' getElementData setElementData للاسف معرف للدتأ addEventHandler( "onPlayerWasted", root, function() guiSetVisible ( killWasted, true ) guiSetEnabled (openPack,true) triggerServerEvent('get_packges', localPlayer) end
Jw8. Posted August 15, 2017 Author Posted August 15, 2017 43 minutes ago, MR.StoRm said: وش إسم داتا القتل عندك ؟ kills
MR.StoRm Posted August 15, 2017 Posted August 15, 2017 27 minutes ago, DmAr511 said: kills if getElementData ( localPlayer , 'kills' ) >= 10 then
SAM!! Posted August 15, 2017 Posted August 15, 2017 (edited) اخي تقصد بس الاعب يقتل 10 لاعبين يجية صورة علي الشاشة ولا وش لاني مو فاهمك كويس؟ server side --server side function leesh ( playerSource ) if getElementData ( localPlayer , 'kills' ) >= 10 then triggerClientEvent(root, "leesh", root) end end --client side function leesh() leeshsound = playSound("leesh.mp3",false) -- اضافة من عندي لك لو تبي تحط صوت مع الصورة setSoundVolume (leeshsound, 1) addEventHandler("onClientRender", root, drowleesh) setTimer(function() removeEventHandler("onClientRender", root, drowleesh) end,2000,1) end addEvent("leesh",true) addEventHandler("leesh",root,leesh) local sX, sY = guiGetScreenSize() function drowleesh() dxDrawImage((sX/2)-250, (sY/2)-250, 250, 250 , "leesh.jpg") -- اسم صورتك end Edited August 15, 2017 by SAM!!
#BrosS Posted August 15, 2017 Posted August 15, 2017 19 minutes ago, SAM!! said: اخي تقصد بس الاعب يقتل 10 لاعبين يجية صورة علي الشاشة ولا وش لاني مو فاهمك كويس؟ server side function leesh ( playerSource ) if getElementData ( localPlayer , 'kills' ) >= 10 then triggerClientEvent(root, "leesh", root) end end وش ذا يالحبيب 3 hours ago, DmAr511 said: للاسف معرف للدتأ addEventHandler( "onPlayerWasted", root, function() guiSetVisible ( killWasted, true ) guiSetEnabled (openPack,true) triggerServerEvent('get_packges', localPlayer) end onPlayerWasted سيرفر استعمل onClientPlayerWasted ووين محاولتك حق الداتا ماتحتاج خبرة كبيرة
SAM!! Posted August 15, 2017 Posted August 15, 2017 حط قبل النفكشن باول سطر بالسيرفر دي addEventHandler( "onPlayerWasted", root,
#BrosS Posted August 15, 2017 Posted August 15, 2017 @SAM!! كودك غلط وانا حطيت رد مافي داعي تزوييد مشاركات
Jw8. Posted August 16, 2017 Author Posted August 16, 2017 On ١٥/٨/٢٠١٧ at 16:11, #BrosS said: @SAM!! كودك غلط وانا حطيت رد مافي داعي تزوييد مشاركات addEventHandler( "onClientPlayerWasted", root, function() triggerServerEvent('get_packgesB', localPlayer) addEventHandler("onClientRender", root, showOnSpawnS) outputChatBox("#00FFFF[Packges System]#DC143CYou Get packge Silver", source, 255, 0, 0,true) Sound = playSound("sound.mp3",false) setSoundVolume (Sound, 100) setTimer(function() guiSetEnabled (openPack,true) removeEventHandler("onClientRender", root, showOnSpawnS) triggerServerEvent('remove_packges', localPlayer) end,10000,1) end ) وش المشكله هنا ؟ كل ما اموت انا يجيلي البكج ؟ addEvent("get_packgesS",true) addEventHandler("get_packgesS",getRootElement(),function() if getElementData ( source , 'kills' ) >= 25 or getElementData ( source , 'kills' ) >= 21 or getElementData ( source , 'kills' ) >= 32 then setElementData(source, "Money", (getElementData(source, "Money") or 0) + 0) outputChatBox("#00FFFF[Packges System]#DC143CYou Get Packges Silver To Open 'F8 - packges'", player, 255, 0, 0,true) end end )
Jw8. Posted August 16, 2017 Author Posted August 16, 2017 On ١٥/٨/٢٠١٧ at 16:11, #BrosS said: @SAM!! كودك غلط وانا حطيت رد مافي داعي تزوييد مشاركات addEventHandler( "onClientPlayerWasted", root, function() triggerServerEvent('get_packgesB', localPlayer) addEventHandler("onClientRender", root, showOnSpawnS) outputChatBox("#00FFFF[Packges System]#DC143CYou Get packge Silver", source, 255, 0, 0,true) Sound = playSound("sound.mp3",false) setSoundVolume (Sound, 100) setTimer(function() guiSetEnabled (openPack,true) removeEventHandler("onClientRender", root, showOnSpawnS) triggerServerEvent('remove_packges', localPlayer) end,10000,1) end ) ابي كل ما تقتل تجي صورة
Rockyz Posted August 16, 2017 Posted August 16, 2017 20 minutes ago, DmAr511 said: addEventHandler( "onClientPlayerWasted", root, function() triggerServerEvent('get_packgesB', localPlayer) addEventHandler("onClientRender", root, showOnSpawnS) outputChatBox("#00FFFF[Packges System]#DC143CYou Get packge Silver", source, 255, 0, 0,true) Sound = playSound("sound.mp3",false) setSoundVolume (Sound, 100) setTimer(function() guiSetEnabled (openPack,true) removeEventHandler("onClientRender", root, showOnSpawnS) triggerServerEvent('remove_packges', localPlayer) end,10000,1) end ) ابي كل ما تقتل تجي صورة تجي صورة للي انقلت ولا للي قتل
Jw8. Posted August 16, 2017 Author Posted August 16, 2017 Just now, #,+( _xiRoc[K]; > said: تجي صورة للي انقلت ولا للي قتل الي يقتل !!
#BrosS Posted August 16, 2017 Posted August 16, 2017 (edited) addEventHandler( "onClientPlayerWasted", root, function(killer) triggerServerEvent('get_packgesB', killer) addEventHandler("onClientRender", root, showOnSpawnS) outputChatBox("#00FFFF[Packges System]#DC143CYou Get packge Silver", 255, 0, 0,true) Sound = playSound("sound.mp3",false) setSoundVolume (Sound, 100) setTimer(function() guiSetEnabled (openPack,true) removeEventHandler("onClientRender", root, showOnSpawnS) triggerServerEvent('remove_packges', killer) end,10000,1) end ) .. Edited August 16, 2017 by #BrosS
Jw8. Posted August 16, 2017 Author Posted August 16, 2017 39 minutes ago, #BrosS said: addEventHandler( "onClientPlayerWasted", root, function(killer) triggerServerEvent('get_packgesB', killer) addEventHandler("onClientRender", root, showOnSpawnS) outputChatBox("#00FFFF[Packges System]#DC143CYou Get packge Silver", 255, 0, 0,true) Sound = playSound("sound.mp3",false) setSoundVolume (Sound, 100) setTimer(function() guiSetEnabled (openPack,true) removeEventHandler("onClientRender", root, showOnSpawnS) triggerServerEvent('remove_packges', killer) end,10000,1) end ) .. يجي لكل السيرفر وانا كل ما امووت خخخ
N3xT Posted August 17, 2017 Posted August 17, 2017 جرب ذا ماجربته, اذا جبت 10 قتلات وفوق يطلع لك الصورة killWasted = guiCreateStaticImage(1113, 298, 243, 239, "pack/gold_package.png", false) killCount = 0 addEventHandler( "onClientPlayerWasted", root, function ( killer ) if ( killer == localPlayer ) and ( getElementType(source) == "player" ) then killCount = killCount + 1 outputChatBox("Kills Count: "..killCount) if ( killCount =< 10 ) then guiSetVisible ( killWasted, true ) outputChatBox("You've got a gold package") end end end )
Ahmed Ly Posted August 17, 2017 Posted August 17, 2017 -- Server addEventHandler ( "onPlayerWasted", root, function ( _, attacker ) if ( attacker and attacker ~= source and isElement ( attacker ) ) then if getElementData ( attacker , 'kills' ) >= 25 or getElementData ( attacker , 'kills' ) >= 21 or getElementData (attacker , 'kills') >= 32 then outputChatBox("#00FFFF[Packges System]#DC143CYou Get packge Silver", attacker, 255, 0, 0,true) triggerClientEvent(attacker,"123",attacker) end end end ) --- Client addEvent("123",true) addEventHandler("123",root, function () addEventHandler("onClientRender", root, showOnSpawnS) Sound = playSound("sound.mp3",false) setTimer(function() guiSetEnabled (openPack,true) removeEventHandler("onClientRender", root, showOnSpawnS) triggerServerEvent('remove_packges', localPlayer) end,10000,1) end )
Rockyz Posted August 17, 2017 Posted August 17, 2017 4 hours ago, N3xT said: جرب ذا ماجربته, اذا جبت 10 قتلات وفوق يطلع لك الصورة killWasted = guiCreateStaticImage(1113, 298, 243, 239, "pack/gold_package.png", false) killCount = 0 addEventHandler( "onClientPlayerWasted", root, function ( killer ) if ( killer == localPlayer ) and ( getElementType(source) == "player" ) then killCount = killCount + 1 outputChatBox("Kills Count: "..killCount) if ( killCount =< 10 ) then guiSetVisible ( killWasted, true ) outputChatBox("You've got a gold package") end end end ) سطر 9 =< x <= 1
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