Doffy Posted January 10, 2017 Posted January 10, 2017 ابي كود اول ما اضغط علي زر يعطيني سلاح تلقائي من الايدي 22 ل 36 والذخيرة حقتها من 50 ل 600 وشكرا :*
#TeKa Posted January 10, 2017 Posted January 10, 2017 --Client addEventHandler ( "onClientGUIClick", root, function () if source == --اسم الزر then triggerServerEvent("earn",getRootElement(),wep,thePlayer) end end ) function weap (wep,thePlayer) id = math.random(22,36) wep = math.random(50,600) givePlayerWeapon(thePlayer,wep,id) addEvent("earn", true) addEventHandler("earn",getRootElement(), weap) --Server ..!!!
Doffy Posted January 10, 2017 Author Posted January 10, 2017 26 minutes ago, #TeKa said: --Client addEventHandler ( "onClientGUIClick", root, function () if source == --اسم الزر then triggerServerEvent("earn",getRootElement(),wep,thePlayer) end end ) function weap (wep,thePlayer) id = math.random(22,36) wep = math.random(50,600) givePlayerWeapon(thePlayer,wep,id) addEvent("earn", true) addEventHandler("earn",getRootElement(), weap) --Server ..!!! اخوي الكود موب شغال
N3xT Posted January 10, 2017 Posted January 10, 2017 1 hour ago, #TeKa said: --Client addEventHandler ( "onClientGUIClick", root, function () if source == --اسم الزر then triggerServerEvent("earn",getRootElement(),wep,thePlayer) end end ) function weap (wep,thePlayer) id = math.random(22,36) wep = math.random(50,600) givePlayerWeapon(thePlayer,wep,id) addEvent("earn", true) addEventHandler("earn",getRootElement(), weap) --Server ..!!! ليتك مخلي أكوادك عندك ولا عطيته هي كلنت addEventHandler ( "onClientGUIClick", root, function () if ( source == "إسم الزر" ) then triggerServerEvent("myWeapon",localPlayer, localPlayer) end end ) سيرفر addEvent("myWeapon", true) addEventHandler("myWeapon", root, function ( p ) local id = math.random(22,36) local ammo = math.random(50,600) giveWeapon ( p, tonumber(id), tonumber(ammo) ) end )
MR.Mosa Posted January 10, 2017 Posted January 10, 2017 اخي نسكت ابي اسئلك هنا في هاذا triggerServerEvent("myWeapon",localPlayer, localPlayer) ليش مكرر localPlayer مرتين للتعلم فقط
!#NssoR_) Posted January 10, 2017 Posted January 10, 2017 1 hour ago, MR.Mosa said: ليش مكرر localPlayer مرتين للتعلم فقط غير ضروري الحركه الي هو مسويها تقدر تسويه بهذا الشكل triggerServerEvent("myWeapon",localPlayer) و جهة السيرفر تصير بهذا الشكل addEvent("myWeapon", true) addEventHandler("myWeapon", root, function ( ) local id,ammo = math.random(22,36),math.random(50,600) if not ( giveWeapon ( client, id, ammo,true )) then -- سويت كذا عشان لو مافيه سلاح بالايدي العشوائي الي طلع outputChatBox("* Please try again there's an error !",client,255,255,255) end end ) 1
MR.GRAND Posted January 10, 2017 Posted January 10, 2017 3 hours ago, MR.Mosa said: اخي نسكت ابي اسئلك هنا في هاذا triggerServerEvent("myWeapon",localPlayer, localPlayer) ليش مكرر localPlayer مرتين للتعلم فقط لأفادتك وزيادة خبرتك ^ وتعليمك فقط ^ localPlayer الأولي يقصد فيها اللاعب المحلي اللي مرسل الترايقر, localPlayer الثانية يقصد فيها اضافة متغير جديد وهو = اللاعب المحلي بهدف جعله متغير مخصص لأعطاء سلاح ^ تقدر تستخدمها بأشياء آخرى تنفعك ^ 1
MR.Mosa Posted January 11, 2017 Posted January 11, 2017 13 hours ago, MR.GRAND said: لأفادتك وزيادة خبرتك ^ وتعليمك فقط ^ localPlayer الأولي يقصد فيها اللاعب المحلي اللي مرسل الترايقر, localPlayer الثانية يقصد فيها اضافة متغير جديد وهو = اللاعب المحلي بهدف جعله متغير مخصص لأعطاء سلاح ^ تقدر تستخدمها بأشياء آخرى تنفعك ^ 14 hours ago, !#NssoR_) said: غير ضروري الحركه الي هو مسويها تقدر تسويه بهذا الشكل triggerServerEvent("myWeapon",localPlayer) و جهة السيرفر تصير بهذا الشكل addEvent("myWeapon", true) addEventHandler("myWeapon", root, function ( ) local id,ammo = math.random(22,36),math.random(50,600) if not ( giveWeapon ( client, id, ammo,true )) then -- سويت كذا عشان لو مافيه سلاح بالايدي العشوائي الي طلع outputChatBox("* Please try again there's an error !",client,255,255,255) end end ) مشكورين ما قصرتو 1
N3xT Posted January 11, 2017 Posted January 11, 2017 مثل ما قالوا لك الشباب , مافيه ذاك الفرق الكبير 2
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