Ja[B]er[X]Pro Posted February 22, 2016 Share Posted February 22, 2016 ابي فنكشنات ان الاعبين ما يقدرون يقتلون بعض Link to comment
Abdul KariM Posted February 22, 2016 Share Posted February 22, 2016 onClientPlayerDamage cancelEvent لو تبيه للتيمات setTeamFriendlyFire Link to comment
Ja[B]er[X]Pro Posted February 22, 2016 Author Share Posted February 22, 2016 onClientPlayerDamage cancelEvent لو تبيه للتيمات setTeamFriendlyFire لكن هناك مشكلة الان ابي الاعبين ما يقدرون يقتلوني بعض لكن الزومبي يقدرون يقتلون الاعبين والاعبين يقتلون الزومبي Link to comment
Abdul KariM Posted February 22, 2016 Share Posted February 22, 2016 حط الاعبين بتيم وسوي لهم setTeamFriendlyFire او يوم يندمج الاعب تتأكد ان الي ضربه بيد getElementType وتكنسل الايفنت او تعكس تحقق من داتا الزومبي getElementData -- not ... وتكنسل الايفنت Link to comment
Ja[B]er[X]Pro Posted February 22, 2016 Author Share Posted February 22, 2016 هل هذا صحيح؟؟ يتحقق ان الالمنت = لاعب ويقفل الحدث addEventHandler("onClientPlayerDamage",root, function() if getElementType(player) then cancelEvent () end end) Link to comment
#Mr.Rajo~,< Posted February 22, 2016 Share Posted February 22, 2016 هل هذا صحيح؟؟يتحقق ان الالمنت = لاعب ويقفل الحدث addEventHandler("onClientPlayerDamage",root, function() if getElementType(player) then cancelEvent () end end) addEventHandler("onClientPlayerDamage",root, function() if getElementType(source) == "player" then cancelEvent () end end) اتوقع كذا Link to comment
Simple. Posted February 22, 2016 Share Posted February 22, 2016 addEventHandler("onClientPlayerDamage",root, function( attacker ) if getElementType( source ) == 'player' and getElementType ( attacker ) == 'player' then cancelEvent () end end) Link to comment
Ja[B]er[X]Pro Posted February 22, 2016 Author Share Posted February 22, 2016 addEventHandler("onClientPlayerDamage",root, function( attacker ) if getElementType( source ) == 'player' and getElementType ( attacker ) == 'player' then cancelEvent () end end) شكراً لك Link to comment
Ja[B]er[X]Pro Posted February 22, 2016 Author Share Posted February 22, 2016 اين الاخطاء بالكود دا ؟ addEventHandleR("onResourceStart",root, function(player) local mathPlayer = math.random(player) local x,y,z = getElementPosition(player,mathPlayer) local blip = createBlip(x,y,z,47) setElementData(player,"pplayer",true) outputChatBox("Kill"..player.."To Win $50000",root,0,255,0) end) addEventHandler("onPlayerWasted",root, function(player) if getElementData(player,"pplayer") == true then givePlayerMoney(attacker,50000) destroyElement(blip) outputChatBox("Tish Player"..attacker.."Was Kill"..player.."Win $50000",root,255,0,255) setTimer( function() restartResource() end,60000,1) end end) Link to comment
Abdul KariM Posted February 22, 2016 Share Posted February 22, 2016 اين الاخطاء بالكود دا ؟ addEventHandleR("onResourceStart",root, function(player) local mathPlayer = math.random(player) local x,y,z = getElementPosition(player,mathPlayer) local blip = createBlip(x,y,z,47) setElementData(player,"pplayer",true) outputChatBox("Kill"..player.."To Win $50000",root,0,255,0) end) addEventHandler("onPlayerWasted",root, function(player) if getElementData(player,"pplayer") == true then givePlayerMoney(attacker,50000) destroyElement(blip) outputChatBox("Tish Player"..attacker.."Was Kill"..player.."Win $50000",root,255,0,255) setTimer( function() restartResource() end,60000,1) end end) راجع سورس الاحداث كلها onResourceStart -- لازم تسوي لوب للاعبين اذا بغيت تسوي شي onPlayerWasted -- مصدره الاعب الي مات وفيه بارتمنات عن الي القاتل الخ ... ء Link to comment
#Mr.Rajo~,< Posted February 22, 2016 Share Posted February 22, 2016 انت معرف البلاير والبارمتر حق الحدث اسم المود Parameters[edit] resource startedResource + عندك خطا بهذا addEventHandleR addEventHandler Link to comment
Abdul KariM Posted February 22, 2016 Share Posted February 22, 2016 اضيف على ذلك انت مسوي يختار لاعب عشوائي لو اشتغل السكربت ويحط له داتا ويجيب احداثياته سوي متغير لفنكشن getRandomPlayer -- تجيب احداثياته وتحط له داتا لو اشتغل المود ومايحتاج تسوي لوب + انت مسوي لوكال للبلب ولو مات الاعب بتحذفه كذا ماراح يشتغل احذف اللوكال ولو مات الاعب تحقق من البلب واحذفه وبالنسبة restartResource ناقصك ارقمنتات attacker و ماهي معرفه Link to comment
Simple. Posted February 23, 2016 Share Posted February 23, 2016 Begin () function Begin ( ) local player = getRandomPlayer () blip = createBlipAttachedTo ( player, 47 ) setElementData ( player, 'pplayer', true ) outputChatBox ( '* kill '.. getPlayerName ( player ) ..' To Win 50000$', root, 128, 128, 128 ) addEventHandler ( 'onPlayerWasted', root, onWasted ) end function onWasted ( _,killer ) if killer ~= source and getElementData ( source, 'pplayer' ) == true then givePlayerMoney ( killer, 50000 ) destroyElement ( blip ) setElementData ( source, 'pplayer', false ) outputChatBox ( '* '..getPlayerName ( killer )..' Killed '..getPlayerName ( source )..' and won 50000$', root, 128, 128, 128 ) removeEventHandler ( 'onPlayerWasted', root, onWasted ) setTimer ( Begin, 60000,1 ) end end جرب , واعتذر إذا كان فيه اخطاء لاني سويته عالسريع 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