Scorpio Posted May 13, 2013 Share Posted May 13, 2013 ابي كود سلاح محد يقدر ياخذ السلاح غير الأدمن + اقدر اذيد من الأسلحة + اقدر احط دم ودرعع وشكراً Link to comment
فاّرس Posted May 13, 2013 Share Posted May 13, 2013 isObjectInACLGroup getPlayerAccount getAccountName ^ مع إني مو متأكد انه بيضبط لقروب معين, + وش تقصد بزياده الاسلحه؟ اذا تقصد عدد الرصاص , setWeaponProperty + وش تقصد بالدم والدرع ياريت توضح طلبآتك, اذا قصدك تبي تعطي دم ودرع, setElementHealth setPedArmor Link to comment
Scorpio Posted May 13, 2013 Author Share Posted May 13, 2013 isObjectInACLGroup getPlayerAccount getAccountName ^ مع إني مو متأكد انه بيضبط لقروب معين, + وش تقصد بزياده الاسلحه؟ اذا تقصد عدد الرصاص , setWeaponProperty + وش تقصد بالدم والدرع ياريت توضح طلبآتك, اذا قصدك تبي تعطي دم ودرع, setElementHealth setPedArmor يعني يصير في مكان معين مسدس وخلاط و دم ودرع ... الخ الخ محد يدقر يستخدمهم غير الأدمن Link to comment
PaiN^ Posted May 13, 2013 Share Posted May 13, 2013 onPickupHit وبعدين تحقق مع الحدث createPickup سوي بيك آب إن اللاعب إللي أخذ البيك آب آدمن بالوظايف إللي عطاك ذا بيست و عطه الدم أو السلاح أو الدرع إذا كان آدمن Link to comment
Scorpio Posted May 13, 2013 Author Share Posted May 13, 2013 كذا صح؟ local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then if not createPickup ( thePlayer ) then createPickup ( thePlayer ) - end end end ) local aPickup = createPickup ( 10.0, 10.0, 10.0, 2, 31, 3000, 50 ) function pickedUpWeaponCheck ( player ) outputChatBox ( "You have picked up a M4.", player ) end addEventHandler ( "onPickupHit", aPickup, pickedUpWeaponCheck ) Link to comment
iPrestege Posted May 13, 2013 Share Posted May 13, 2013 كيف يعني تبية ياخذ يوم يلمس البيك اب ولا كيف اشرح كويس ! Link to comment
Scorpio Posted May 13, 2013 Author Share Posted May 13, 2013 كيف يعني تبية ياخذ يوم يلمس البيك اب ولا كيف اشرح كويس ! ابي كود يكون في سلاحين + ودرع ودم محد يقدر ابداً يستخدمو غير الأدمن لكن يكون على الأرض وانا بحط الأحدثيات Link to comment
|Mr|-Talal07-| Posted May 13, 2013 Share Posted May 13, 2013 pick = createPickup( ... ) addEventHandler("onPickupHit",pick, function (player) if not isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)),aclGetGroup("Admin")) then cancelEvent() outputChatBox("You Are Not Admin",player,255,0,0) end end ) Link to comment
Scorpio Posted May 13, 2013 Author Share Posted May 13, 2013 pick = createPickup( ... ) addEventHandler("onPickupHit",pick, function (player) if not isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)),aclGetGroup("Admin")) then cancelEvent() outputChatBox("You Are Not Admin",player,255,0,0) end end ) كيف ما فهمت وين الأحدثيات حجت السلاح؟ Link to comment
iPrestege Posted May 13, 2013 Share Posted May 13, 2013 -- # Server Side aPickup = { } local Health = 1240 local Armor = 1242 local WeaponID = 30 local Ammo = 100 aPickup[1] = createPickup ( x,y,z ,3 , Health ) aPickup[2] = createPickup ( x,y,z ,2 , WeaponID ) aPickup[3] = createPickup ( x,y,z , 3, Armor ) addEventHandler("onPickupHit",getRootElement(), function ( player ) if ( getElementType ( player ) == "player" ) then if not isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( player ) ) , aclGetGroup ( "Admin" ) ) then outputChatBox("* You are not admin",player,155,0,0) cancelEvent ( true ) return end if ( source == aPickup[1] ) then setElementHealth ( player,100 ) elseif ( source == aPickup[3] ) then setPedArmor ( player,100 ) elseif ( source == aPickup[2] ) then giveWeapon ( player,WeaponID,Ammo,true ) end end end ) Link to comment
iMr.Dawix~# Posted May 13, 2013 Share Posted May 13, 2013 pick = createPickup( ... ) addEventHandler("onPickupHit",pick, function (player) if not isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)),aclGetGroup("Admin")) then cancelEvent() outputChatBox("You Are Not Admin",player,255,0,0) end end ) كيف ما فهمت وين الأحدثيات حجت السلاح؟ حاول تعتمد ع نفسك شوي لو ضليت مثل كذا بس تطلب ويجيك جاهز ماحد بيساعدك حاول تفهم الكود شوي Link to comment
Scorpio Posted May 14, 2013 Author Share Posted May 14, 2013 -- # Server Side aPickup = { } local Health = 1240 local Armor = 1242 local WeaponID = 30 local Ammo = 100 aPickup[1] = createPickup ( x,y,z ,3 , Health ) aPickup[2] = createPickup ( x,y,z ,2 , WeaponID ) aPickup[3] = createPickup ( x,y,z , 3, Armor ) addEventHandler("onPickupHit",getRootElement(), function ( player ) if ( getElementType ( player ) == "player" ) then if not isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( player ) ) , aclGetGroup ( "Admin" ) ) then outputChatBox("* You are not admin",player,155,0,0) cancelEvent ( true ) return end if ( source == aPickup[1] ) then setElementHealth ( player,100 ) elseif ( source == aPickup[3] ) then setPedArmor ( player,100 ) elseif ( source == aPickup[2] ) then giveWeapon ( player,WeaponID,Ammo,true ) end 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