Doffy Posted February 17, 2017 Share Posted February 17, 2017 ابي اول ما اللاعب يختار رتبة في رو في الجريد ليست ويضغط علي زر ياخذ رتبة واذا مثلا جا يضغط علي الرو الي تحته يسحب منه الرتبة الي معه ويعطيه الرتبة الجديدة Link to comment
Adham Posted February 17, 2017 Share Posted February 17, 2017 (edited) "onClientGUIClick" guiGridListSetItemText guiGridListGetItemText getPlayerAccount isGuestAccount isObjectInACLGroup aclGetGroup aclGroupRemoveObject Edited February 17, 2017 by Deativated Link to comment
Doffy Posted February 17, 2017 Author Share Posted February 17, 2017 Just now, Deativated said: "onClientGUIClick" guiGridListSetIteamText guiGridListGetIteamText getPlayerAccount isGuestAccount isObjectInACLGroup aclGetGroup aclGroupRemoveObject طيب وش فايدة guiGridListGetIteamText Link to comment
Adham Posted February 17, 2017 Share Posted February 17, 2017 عدلت كتبت الكتابه بالغلط , Link to comment
iMr.WiFi..! Posted February 17, 2017 Share Posted February 17, 2017 16 minutes ago, KinG_Himoo12 said: طيب وش فايدة guiGridListGetIteamText تجلب اسم الرتبة : ) Link to comment
Doffy Posted February 17, 2017 Author Share Posted February 17, 2017 4 hours ago, iMr.WiFi..! said: تجلب اسم الرتبة : ) طيب وكيف اخله ياخذ رتبة هذا الباقي #Edit: 4 hours ago, iMr.WiFi..! said: تجلب اسم الرتبة : ) يلبيه Link to comment
Ahmed Ly Posted February 18, 2017 Share Posted February 18, 2017 On 17/02/2017 at 17:58, KinG_Himoo12 said: طيب وكيف اخله ياخذ رتبة هذا الباقي #Edit: يلبيه استخدام aclGroupAddObject Link to comment
Doffy Posted February 19, 2017 Author Share Posted February 19, 2017 4 hours ago, Ahmed Ly said: استخدام aclGroupAddObject محاولتي ما اشتغلت --Client addEventHandler("onClientGUIClick",root, function () local rankstake = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) if ( source == GUIEditor.button[2] ) then if rankstake == 0 then triggerServerEvent("lv1",localPlayer, localPlayer) --Server addEvent("lv1",true) addEventHandler("lv1",root, function() if getElementData(source,'Level') >= 15 then if accountName then aclGroupAddObject (aclGetGroup("Level1"), "user."..accountName) outputChatBox("تم اخذ رتبة جديدة",source,255,255,255,true) else outputChatBox("#FF0000*#00FF00You Don't Have Enough Level",source,255,255,255,true) end end end) Link to comment
Ahmed Ly Posted February 19, 2017 Share Posted February 19, 2017 (edited) --Client addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.button[2] then local rankstake = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) if rankstake == 1 then triggerServerEvent("lv1", localPlayer) end end end ) --Server addEvent("lv1",true) addEventHandler("lv1",root, function() if getElementData(source,'Level') >= 15 then acc1 = getPlayerAccount(source) if not isGuestAccount(acc1) then acc2 = getAccountName(acc1) if not isObjectInACLGroup ("user."..acc2,aclGetGroup ("Level1")) then aclGroupAddObject (aclGetGroup("Level1"), "user."..acc2) outputChatBox("تم اخذ رتبة جديدة",source,255,255,255,true) playSoundFrontEnd(source,20) else outputChatBox("لديك هاذي رتبة ",source,255,255,255,true) end else outputChatBox("يجب عليك تسجيل",source,0,255,0,true) end end else outputChatBox("ليس لديك ساعات",source,0,255,0,true) end ) Edited February 19, 2017 by Ahmed Ly Link to comment
Doffy Posted February 19, 2017 Author Share Posted February 19, 2017 2 minutes ago, Ahmed Ly said: --Client addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.button[2] then local rankstake = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) if rankstake == 1 then triggerServerEvent("lv1", localPlayer) end end end ) --Server addEvent("lv1",true) addEventHandler("lv1",root, function() if getElementData(source,'Level') >= 15 then acc1 = getPlayerAccount(source) if not isGuestAccount(acc1) then acc2 = getAccountName(acc2) if not isObjectInACLGroup ("user."..acc2,aclGetGroup ("Level1")) then aclGroupAddObject (aclGetGroup("Level1"), "user."..acc2) outputChatBox("تم اخذ رتبة جديدة",source,255,255,255,true) playSoundFrontEnd(source,20) else outputChatBox("لديك هاذي رتبة ",source,255,255,255,true) end else outputChatBox("يجب عليك تسجيل",source,0,255,0,true) end end else outputChatBox("ليس لديك ساعات",source,0,255,0,true) end ) خطأ موب شغال يجيلي في الدي بق Link to comment
Doffy Posted February 19, 2017 Author Share Posted February 19, 2017 ERROR: Client triggered serverside event lv1, but event is not added server side 1 Link to comment
Ahmed Ly Posted February 19, 2017 Share Posted February 19, 2017 عدلة كود جرب توا واعطني كود ملف متاع الميتا Link to comment
Doffy Posted February 19, 2017 Author Share Posted February 19, 2017 Just now, Ahmed Ly said: عدلة كود جرب توا واعطني كود ملف متاع الميتا حق الميتا مضبوط ولو تبيه هذا هو <meta> <script src="c.lua" type="client" /> <script src="s.lua" type="server" /> </meta> Link to comment
Doffy Posted February 19, 2017 Author Share Posted February 19, 2017 (edited) خطأ ثاني ERROR: Loading Script failed: 'end' expected (to close 'function' at line 3) near 'else' Edited February 19, 2017 by KinG_Himoo12 Link to comment
Ahmed Ly Posted February 19, 2017 Share Posted February 19, 2017 -- جرب و اتاكد من الميتا!! -- كلنت addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.button[2] then local rankstake = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) if rankstake == 1 then triggerServerEvent("lv1", localPlayer) end end end ) --Server addEvent("lv1",true) addEventHandler("lv1",root, function() if getElementData(source,'Level') >= 15 then acc1 = getPlayerAccount(source) if not isGuestAccount(acc1) then acc2 = getAccountName(acc1) if not isObjectInACLGroup ("user."..acc2,aclGetGroup ("Level1")) then aclGroupAddObject (aclGetGroup("Level1"), "user."..acc2) outputChatBox("تم اخذ رتبة جديدة",source,255,255,255,true) playSoundFrontEnd(source,20) else outputChatBox("لديك هاذي رتبة ",source,255,255,255,true) end else outputChatBox("يجب عليك تسجيل",source,0,255,0,true) end else outputChatBox("ليس لديك ساعات",source,0,255,0,true) end end ) Link to comment
Doffy Posted February 19, 2017 Author Share Posted February 19, 2017 2 minutes ago, Ahmed Ly said: -- جرب و اتاكد من الميتا!! -- كلنت addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.button[2] then local rankstake = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) if rankstake == 1 then triggerServerEvent("lv1", localPlayer) end end end ) --Server addEvent("lv1",true) addEventHandler("lv1",root, function() if getElementData(source,'Level') >= 15 then acc1 = getPlayerAccount(source) if not isGuestAccount(acc1) then acc2 = getAccountName(acc1) if not isObjectInACLGroup ("user."..acc2,aclGetGroup ("Level1")) then aclGroupAddObject (aclGetGroup("Level1"), "user."..acc2) outputChatBox("تم اخذ رتبة جديدة",source,255,255,255,true) playSoundFrontEnd(source,20) else outputChatBox("لديك هاذي رتبة ",source,255,255,255,true) end else outputChatBox("يجب عليك تسجيل",source,0,255,0,true) end else outputChatBox("ليس لديك ساعات",source,0,255,0,true) end end ) برضو ERROR: Loading script failed:s.lua:19:'end' expected (to close 'function' at line 3) near'else' Link to comment
Doffy Posted February 19, 2017 Author Share Posted February 19, 2017 1 minute ago, Ahmed Ly said: متاكد؟ يب والله برب بروح مدرسة ولمن اجي اشوف الباقي :] Link to comment
iMr.WiFi..! Posted February 19, 2017 Share Posted February 19, 2017 (edited) -- Client addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.button[2] then local rankstake = guiGridListGetItemText ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1 )GUIEditor.gridlist[1] if rankstake ~= -1 then triggerServerEvent("lv1", localPlayer,rankstake) end end end ) --Server addEvent("lv1",true) addEventHandler("lv1",root, function(rankstake) acc1 = getPlayerAccount(source) if isGuestAccount(acc1) then return outputChatBox("يجب عليك تسجيل",source,0,255,0,true) end acc2 = getAccountName(acc1) if not isObjectInACLGroup ("user."..acc2,aclGetGroup (rankstake)) then aclGroupAddObject (aclGetGroup(rankstake), "user."..acc2) outputChatBox("تم اخذ رتبة جديدة",source,0,255,0,true) playSoundFrontEnd(source,20) else outputChatBox("لديك هاذي رتبة ",source,255,0,0,true) end end ) لازم اسم الرو الي حدده اللاعب يكون يطابق اسم الرتبة في الاسل : ) Edited February 19, 2017 by iMr.WiFi..! Link to comment
Doffy Posted February 19, 2017 Author Share Posted February 19, 2017 7 minutes ago, iMr.WiFi..! said: -- Client addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.button[2] then local rankstake = guiGridListGetItemText ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1 )GUIEditor.gridlist[1] if rankstake ~= -1 then triggerServerEvent("lv1", localPlayer,rankstake) end end end ) --Server addEvent("lv1",true) addEventHandler("lv1",root, function(rankstake) acc1 = getPlayerAccount(source) if isGuestAccount(acc1) then return outputChatBox("يجب عليك تسجيل",source,0,255,0,true) end acc2 = getAccountName(acc1) if not isObjectInACLGroup ("user."..acc2,aclGetGroup (rankstake)) then aclGroupAddObject (aclGetGroup(rankstake), "user."..acc2) outputChatBox("تم اخذ رتبة جديدة",source,0,255,0,true) playSoundFrontEnd(source,20) else outputChatBox("لديك هاذي رتبة ",source,255,0,0,true) end end ) لازم اسم الرو الي حدده اللاعب يكون يطابق اسم الرتبة في الاسل : ) انا مسويه الرو بلظبط نفس الاسم @_@ Link to comment
iMr.WiFi..! Posted February 19, 2017 Share Posted February 19, 2017 Just now, KinG_Himoo12 said: انا مسويه الرو بلظبط نفس الاسم @_@ طيب وش جا بالديبق ؟ Link to comment
Doffy Posted February 19, 2017 Author Share Posted February 19, 2017 6 hours ago, iMr.WiFi..! said: طيب وش جا بالديبق ؟ لحظة لسه بروح اجرب :] #Edit: مو شغال 6 hours ago, iMr.WiFi..! said: طيب وش جا بالديبق ؟ دي بق ERROR: Loading script failed \ c.lua:60: '=' expected near 'if' Link to comment
iMr.WiFi..! Posted February 19, 2017 Share Posted February 19, 2017 -- Client addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.button[2] then local rankstake = guiGridListGetItemText ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1 )GUIEditor.gridlist[1] if guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) ~= -1 then triggerServerEvent("lv1", localPlayer,rankstake) end end end ) --Server addEvent("lv1",true) addEventHandler("lv1",root, function(rankstake) acc1 = getPlayerAccount(source) if isGuestAccount(acc1) then return outputChatBox("يجب عليك تسجيل",source,0,255,0,true) end acc2 = getAccountName(acc1) if not isObjectInACLGroup ("user."..acc2,aclGetGroup (rankstake)) then aclGroupAddObject (aclGetGroup(rankstake), "user."..acc2) outputChatBox("تم اخذ رتبة جديدة",source,0,255,0,true) playSoundFrontEnd(source,20) else outputChatBox("لديك هاذي رتبة ",source,255,0,0,true) end end ) جرب ذا : ) Link to comment
Doffy Posted May 8, 2017 Author Share Posted May 8, 2017 On 2/19/2017 at 13:23, iMr.WiFi..! said: -- ClientaddEventHandler("onClientGUIClick",root,function () if source == GUIEditor.button[2] then local rankstake = guiGridListGetItemText ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1 )GUIEditor.gridlist[1] if guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) ~= -1 then triggerServerEvent("lv1", localPlayer,rankstake) end end end)--ServeraddEvent("lv1",true)addEventHandler("lv1",root,function(rankstake) acc1 = getPlayerAccount(source) if isGuestAccount(acc1) then return outputChatBox("يجب عليك تسجيل",source,0,255,0,true) end acc2 = getAccountName(acc1) if not isObjectInACLGroup ("user."..acc2,aclGetGroup (rankstake)) then aclGroupAddObject (aclGetGroup(rankstake), "user."..acc2) outputChatBox("تم اخذ رتبة جديدة",source,0,255,0,true) playSoundFrontEnd(source,20) else outputChatBox("لديك هاذي رتبة ",source,255,0,0,true) end end) جرب ذا : ) برضو فيه مشكلة ERROR: Loading script failed: c.lua:66:'=' expected near 'if' 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