☠ RaZeR ☠ Posted August 6, 2014 Share Posted August 6, 2014 (edited) السلام عليكم ورحمة الله هلا شباب حاولت اسوي مود وحبيت استغل كلمت كل مبرمج "تعلم من الويكي" تعلمت لاكن واجهتني مشكلة في مود انا سويت التريقر وكل شي بس مب راضي يودي وينقل اللاعب الى التيم Client ! function Theft() if(source == GUIEditor.button[1]) then local teleportX, teleportY, teleportZ = 3233.28760, -1395.22119, 6.00781 setElementPosition(getLocalPlayer(), teleportX, teleportY, teleportZ) triggerServerEvent("Theft", getLocalPlayer()) end end addEventHandler("onClientGUIClick", root, Theft) Server side ! addEvent("Theft" , true ) function Team1 () setPlayerTeam(source,Theft) giveWeapon( source, 31, 500 ) giveWeapon( source, 34, 500 ) giveWeapon( source, 24, 500 ) end addEventHandler("Theft", root, Team1) Edited August 6, 2014 by Guest Link to comment
nxFairlywell Posted August 6, 2014 Share Posted August 6, 2014 ااصلا عندك خطأ في setElementPosition ليه حاط لوكال تقدر تحط الاحداثيات بدون و getLocalPlayer() استبدلها بـ source Link to comment
☠ RaZeR ☠ Posted August 6, 2014 Author Share Posted August 6, 2014 صح كذا ؟؟ function Theft() if(source == GUIEditor.button[1]) then teleportX, teleportY, teleportZ = 3233.28760, -1395.22119, 6.00781 setElementPosition(source(), teleportX, teleportY, teleportZ) triggerServerEvent("Theft", source()) end end addEventHandler("onClientGUIClick", root, Theft) Link to comment
XI_Alooy1212_IX Posted August 6, 2014 Share Posted August 6, 2014 (edited) صح كذا ؟؟ function Theft() if(source == GUIEditor.button[1]) then teleportX, teleportY, teleportZ = 3233.28760, -1395.22119, 6.00781 setElementPosition(source(), teleportX, teleportY, teleportZ) triggerServerEvent("Theft", source()) end end addEventHandler("onClientGUIClick", root, Theft) setElementPosition(source(), teleportX, teleportY, teleportZ) استبدل setElementPosition ( localPlayer, 2490.1206054688, -1666.0263671875, 13.34375 ) #جرب .... جرب الكود function Theft() if(source == GUIEditor.button[1]) then setElementPosition ( localPlayer, 3233.28760, -1395.22119, 6.00781 ) triggerServerEvent("Theft", source()) end end addEventHandler("onClientGUIClick", root, Theft) Edited August 6, 2014 by Guest Link to comment
☠ RaZeR ☠ Posted August 6, 2014 Author Share Posted August 6, 2014 اخوي من اول ماسويت اللي قلتي عليه ما عاد ينقل للمكان Link to comment
XI_Alooy1212_IX Posted August 6, 2014 Share Posted August 6, 2014 # تم التعديل شوف ^ فوق Link to comment
☠ RaZeR ☠ Posted August 6, 2014 Author Share Posted August 6, 2014 الحين انتقل لاكن واراح للقروب حق الحراميه Link to comment
☠ RaZeR ☠ Posted August 6, 2014 Author Share Posted August 6, 2014 يعني شوف السيرفر انا ابيه لما يضغط على الزر ينتقل ويوديه تيم حراميه # انا سويت تريقر لاكن setPlayerTeam مب شغاله انا جربت ##@ Link to comment
XI_Alooy1212_IX Posted August 6, 2014 Share Posted August 6, 2014 طيب ارسل الكود الخطاء Link to comment
3tibe511 Posted August 6, 2014 Share Posted August 6, 2014 client function Theft() if(source == GUIEditor.button[1]) then setElementPosition ( localPlayer, 2490.1206054688, -1666.0263671875, 13.34375 ) triggerServerEvent("Theft", localPlayer) end end addEventHandler("onClientGUIClick", root, Theft) server addEvent("Theft" , true ) function Team1 () local team = getTeamFromName ( "Theft" ) if team then setPlayerTeam(source,team) giveWeapon( source, 31, 500 ) giveWeapon( source, 34, 500 ) giveWeapon( source, 24, 500 ) end end addEventHandler("Theft", root, Team1) Link to comment
The Don Posted August 6, 2014 Share Posted August 6, 2014 اذا ما زبط حق العتيبي جرب ذا -- Client Side addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.button[1] then triggerServerEvent("Theft1", getLocalPlayer()) end end ) -- Server Side local Theft = createTeam ("YouNameTeam",255,255,255) addEvent("Theft1" , true ) addEventHandler("Theft1",root, function () setPlayerTeam( source,Theft) spawnPlayer ( source,3233.28760, -1395.22119, 6.00781) giveWeapon( source, 31, 500 ) giveWeapon( source, 34, 500 ) giveWeapon( source, 24, 500 ) end ) Link to comment
☠ RaZeR ☠ Posted August 6, 2014 Author Share Posted August 6, 2014 ابوعتب جاتني مشكلة في الديبق attempt to call global 'source'(a user data value) ويادؤن كودك مااشتغل Link to comment
XI_Alooy1212_IX Posted August 6, 2014 Share Posted August 6, 2014 addEvent("Theft" , true ) addEventHandler("Theft", root, Team1) function Team1 () local team = getTeamFromName ( "Theft" ) if team then setPlayerTeam(source,team) giveWeapon( source, 31, 500 ) giveWeapon( source, 34, 500 ) giveWeapon( source, 24, 500 ) end end ) # جرب سيرفر سابد ~ Link to comment
☠ RaZeR ☠ Posted August 6, 2014 Author Share Posted August 6, 2014 addEvent("Theft" , true ) addEventHandler("Theft", root, Team1) function Team1 () local team = getTeamFromName ( "Theft" ) if team then setPlayerTeam(source,team) giveWeapon( source, 31, 500 ) giveWeapon( source, 34, 500 ) giveWeapon( source, 24, 500 ) end end ) # جرب سيرفر سابد ~ نفس الشىْ Debug attempt to call global 'source'(a user data value) Link to comment
The Don Posted August 6, 2014 Share Posted August 6, 2014 ذذ ؟ كيف ما اشتغل توني مجربه وشغال زي الحلاوه -- Client Side GUIEditor = { button = {}, window = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(308, 193, 208, 196, "", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(57, 68, 94, 79, "ss", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") end ) addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.button[1] then triggerServerEvent("Theft1", getLocalPlayer()) end end ) -- Server Side local Theft = createTeam ("YouNameTeam",255,255,255) addEvent("Theft1" , true ) addEventHandler("Theft1",root, function () setPlayerTeam( source,Theft) spawnPlayer ( source,3233.28760, -1395.22119, 6.00781) giveWeapon( source, 31, 500 ) giveWeapon( source, 34, 500 ) giveWeapon( source, 24, 500 ) end ) وحتى انه ينقلني للبحر Link to comment
☠ RaZeR ☠ Posted August 6, 2014 Author Share Posted August 6, 2014 اعرف لاكن ما ينقلك لتيم الحراميه ويقول debug attempt to call global 'source'(a user data value) Link to comment
XI_Alooy1212_IX Posted August 6, 2014 Share Posted August 6, 2014 (edited) ضيف ده الكود team = createTeam (NameTheTeam", 255, 0, 0) في سيرفر سايد ~~~ #برب Edited August 6, 2014 by Guest Link to comment
3tibe511 Posted August 6, 2014 Share Posted August 6, 2014 (edited) المشكلة يمكن من عندك Edited August 6, 2014 by Guest Link to comment
XI_Alooy1212_IX Posted August 6, 2014 Share Posted August 6, 2014 يب شغال لزم تسوي كريت تيم ^^ Link to comment
☠ RaZeR ☠ Posted August 6, 2014 Author Share Posted August 6, 2014 مشكور اشتغل بس ابي شي اخير ابيه لما ينتقل للمكان ينتقل بسكن 46 انا جربت SetPedSkin مب نافع Link to comment
XI_Alooy1212_IX Posted August 6, 2014 Share Posted August 6, 2014 ارسل كودك هنا ع سريع #ZzzZz Link to comment
The Don Posted August 6, 2014 Share Posted August 6, 2014 حياك الله + امسك ذا بسكين 46 -- Server Side local Theft = createTeam ("YouNameTeam",255,255,255) addEvent("Theft1" , true ) addEventHandler("Theft1",root, function () setPlayerTeam( source,Theft) spawnPlayer ( source,3233.28760, -1395.22119, 6.00781,0,46) giveWeapon( source, 31, 500 ) giveWeapon( source, 34, 500 ) giveWeapon( source, 24, 500 ) end ) Link to comment
XI_Alooy1212_IX Posted August 6, 2014 Share Posted August 6, 2014 (edited) . ^^ . Edited August 6, 2014 by Guest 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