~Mr.Hassan Posted August 11, 2015 Share Posted August 11, 2015 السلام عليكم معي لوحه جريد ليست ساعدني فيها دابل شوفوها local Skins = { -- {"skin" , "ID"} { "Skin1", "1" }, { "Skin2", "1" }, { "Skin3", "55" }, } addEventHandler("onClientResourceStart", resourceRoot, function () Grid = guiCreateGridList(16, 71, 277, 400, false) guiGridListAddColumn(Grid, "Skin", 0.9) guiGridListAddColumn(Grid, "ID", 0.9) for k,v in ipairs(Skins) do local row = guiGridListAddRow(Grid) guiGridListSetItemText(Grid,row,1, v[1],false,false) guiGridListSetItemText(Grid,row,2, v[2],false,false) end end) --------------------------------------------------------------- addEventHandler("onClientDoubleGUIClick", root , function() if source == Grid then SKIN = guiGridListGetItemText ( Grid, guiGridListGetSelectedItem ( Grid ), 2 ) ID = guiGridListGetItemText ( Grid, guiGridListGetSelectedItem ( Grid ), 3 ) triggerServerEvent("skin", localPlayer , Skin ,ID) end end ) ------------------------------------------------------------------------ ---------------------------------------- addEvent ( "skin" ,true ) addEventHandler("skin, root, function (Skin, ID) setElementModel(source, tonumber(1)) end ) فهمت كل شيئ بس معرفت كيف احطها اول ما يسجل الاعب تطلعله ممكن تقلولي كيف احطها كذا او احطها بزر Link to comment
iMr.SFA7 Posted August 11, 2015 Share Posted August 11, 2015 (edited) "onPlayerLogin" triggerClientEvent Edited August 11, 2015 by Guest Link to comment
~Mr.Hassan Posted August 11, 2015 Author Share Posted August 11, 2015 حق لوحه التسجيل دقيقه addEvent ("onLogin", true) addEventHandler ("onLogin", root, function (user, pass) local account = getAccount (user, pass) if (account) then if logIn (source, account, pass) then outputChatBox ("You Logged in Sucessfuly With User : #00FF00[ " .. user .. " ]!", source, 255, 255, 0, true) setElementModel (source, 287) else outputChatBox ("خطا !!", source, 255, 255, 0) end else outputChatBox ("خطا اسم الحساب والباسورد", source, 255, 255, 0) end end ) addEvent ("onRegister", true) addEventHandler ("onRegister", root, function (user, pass) if not getAccount (user) then local account = addAccount (user, pass) if (account) then if logIn (source, user, pass) then outputChatBox ("You Registerd and Logged in Sucessfuly - Please Remember Your User/Password!", source, 255, 255, 0) outputChatBox ("Register Details : [ Username ] : #00FF00" .. user .. " #FFFF1A[ Password ] : #00FF00" .. pass .. "", source, 255, 255, 0 , true) setElementModel (source, 287) triggerClientEvent ( source, "HideTheWindow", source ) else outputChatBox ("Register/Login error!", source, 255, 255, 0) end else outputChatBox ("Account name is already exist.", source, 255, 0, 0) end end end ) Link to comment
~Mr.Hassan Posted August 11, 2015 Author Share Posted August 11, 2015 اذا اللاعب دخل راح يكون عنده تحميل وفنكش اظهار اللوحة كلنتيعني ما تقدر بس حط أذا أشتغل السكربت يظهر اللوحة وما يحتاج ترايقر addEventHandler ("onClientResourceStart",resourceRoot, function ( ) guiSetVisible (window , true ) end ) Link to comment
iMr.SFA7 Posted August 11, 2015 Share Posted August 11, 2015 -- Client Side local Skins = { -- {"skin" , "ID"} { "Skin1", "1" }, { "Skin2", "1" }, { "Skin3", "55" }, } addEventHandler("onClientResourceStart", resourceRoot, function () Grid = guiCreateGridList(16, 71, 277, 400, false) guiSetVisible (Grid ,false ) guiGridListAddColumn(Grid, "Skin", 0.9) guiGridListAddColumn(Grid, "ID", 0.9) for k,v in ipairs(Skins) do local row = guiGridListAddRow(Grid) guiGridListSetItemText(Grid,row,1, v[1],false,false) guiGridListSetItemText(Grid,row,2, v[2],false,false) end end ) addEventHandler("onClientDoubleGUIClick", root , function() if source == Grid then SKIN = guiGridListGetItemText ( Grid, guiGridListGetSelectedItem ( Grid ), 2 ) ID = guiGridListGetItemText ( Grid, guiGridListGetSelectedItem ( Grid ), 3 ) triggerServerEvent("skin", localPlayer , Skin ,ID) end end ) addEvent ("Trigger",true ) addEventHandler ("Trigger",root, function () guiSetVisible (Grid ,true ) end ) -- Server side addEventHandler ("onPlayerLogin",root, function () triggerClientEvent (source , "Trigger",source ) end ) addEvent ( "skin" ,true ) addEventHandler("skin", root, function (Skin, ID) setElementModel(source, tonumber(1)) end ) Link to comment
~Mr.Hassan Posted August 11, 2015 Author Share Posted August 11, 2015 -- Client Side local Skins = { -- {"skin" , "ID"} { "Skin1", "1" }, { "Skin2", "1" }, { "Skin3", "55" }, } addEventHandler("onClientResourceStart", resourceRoot, function () Grid = guiCreateGridList(16, 71, 277, 400, false) guiSetVisible (Grid ,false ) guiGridListAddColumn(Grid, "Skin", 0.9) guiGridListAddColumn(Grid, "ID", 0.9) for k,v in ipairs(Skins) do local row = guiGridListAddRow(Grid) guiGridListSetItemText(Grid,row,1, v[1],false,false) guiGridListSetItemText(Grid,row,2, v[2],false,false) end end ) addEventHandler("onClientDoubleGUIClick", root , function() if source == Grid then SKIN = guiGridListGetItemText ( Grid, guiGridListGetSelectedItem ( Grid ), 2 ) ID = guiGridListGetItemText ( Grid, guiGridListGetSelectedItem ( Grid ), 3 ) triggerServerEvent("skin", localPlayer , Skin ,ID) end end ) addEvent ("Trigger",true ) addEventHandler ("Trigger",root, function () guiSetVisible (Grid ,true ) end ) -- Server side addEventHandler ("onPlayerLogin",root, function () triggerClientEvent (source , "Trigger",source ) end ) addEvent ( "skin" ,true ) addEventHandler("skin", root, function (Skin, ID) setElementModel(source, tonumber(1)) end ) ابيه بزر بوتون لما يضغط على البوتون ياخذ + ما اشتغل مدري ليه الوحه اشتغلت بس لما ابي اخذ الشخصيه ما اشتغل والدي بوق ما يقلي شيئ Link to comment
iMr.SFA7 Posted August 11, 2015 Share Posted August 11, 2015 حط الجدول كذا local Skins = { -- {"skin" , "ID"} { "Skin1", 1}, { "Skin2", 2 }, { "Skin3", 3 }, } ملف السيرفر حطه كذا -- Server side addEventHandler ("onPlayerLogin",root, function () triggerClientEvent (source , "Trigger",source ) end ) addEvent ( "skin" ,true ) addEventHandler("skin", root, function (Skin, ID) setElementModel(source, tonumber(ID)) end ) Link to comment
~Mr.Hassan Posted August 11, 2015 Author Share Posted August 11, 2015 ما ظبط مدري ليه Link to comment
iMr.SFA7 Posted August 11, 2015 Share Posted August 11, 2015 حاط الحدث كذا onClientDoubleGUIClick حطه onClientGUIClick وأحذف كلمة tonumber من السيرفر Link to comment
~Mr.Hassan Posted August 11, 2015 Author Share Posted August 11, 2015 حاط الحدث كذاonClientDoubleGUIClick حطه onClientGUIClick وأحذف كلمة tonumber من السيرفر وضح ممكن شرح مثال كود صغير Link to comment
iMr.SFA7 Posted August 11, 2015 Share Posted August 11, 2015 -- Client Side local Skins = { -- {"skin" , "ID"} { "Skin1", 1}, { "Skin2", 2 }, { "Skin3", 3 }, } addEventHandler("onClientResourceStart", resourceRoot, function () Grid = guiCreateGridList(16, 71, 277, 400, false) guiSetVisible (Grid ,false ) guiGridListAddColumn(Grid, "Skin", 0.9) guiGridListAddColumn(Grid, "ID", 0.9) for k,v in ipairs(Skins) do local row = guiGridListAddRow(Grid) guiGridListSetItemText(Grid,row,1, v[1],false,false) guiGridListSetItemText(Grid,row,2, v[2],false,false) end end ) addEventHandler("onClientGUIClick", root , function() if source == Grid then SKIN = guiGridListGetItemText ( Grid, guiGridListGetSelectedItem ( Grid ), 2 ) ID = guiGridListGetItemText ( Grid, guiGridListGetSelectedItem ( Grid ), 3 ) triggerServerEvent("skin", localPlayer , Skin ,ID) end end ) addEvent ("Trigger",true ) addEventHandler ("Trigger",root, function () guiSetVisible (Grid ,true ) end ) -- Server side addEventHandler ("onPlayerLogin",root, function () triggerClientEvent (source , "Trigger",source ) end ) addEvent ( "skin" ,true ) addEventHandler("skin", root, function (Skin, ID) setElementModel(client, ID) end ) Link to comment
~Mr.Hassan Posted August 11, 2015 Author Share Posted August 11, 2015 انا ابي لما يضغط على ال row وبعدين على البوتون يصير الحدث تقدر تقلي كم مثال افهم منهم Link to comment
iMr.SFA7 Posted August 11, 2015 Share Posted August 11, 2015 (edited) addEventHandler("onClientGUIClick", root , function() if source == Grid then if ( guiGridListGetSelectedItem(Grid) == -1 ) then return end local SKIN = guiGridListGetItemText ( Grid, guiGridListGetSelectedItem ( Grid ), 1) local ID = guiGridListGetItemText ( Grid, guiGridListGetSelectedItem ( Grid ), 2) triggerServerEvent("skin", localPlayer , SKIN , ID ) end end ) Edited August 11, 2015 by Guest Link to comment
~Mr.Hassan Posted August 11, 2015 Author Share Posted August 11, 2015 لك ظبطت بس لما اختار شخصيه ما تختفي الوحه ؟؟ ولا هي بزر Link to comment
iMr.SFA7 Posted August 11, 2015 Share Posted August 11, 2015 عدلت كودي خذه مرة ثانية بملف السيرفر بعد ما يحط السكن سوي ترايقر للكلنت وسوي اخفاء triggerClientEvent guiSetVisible Link to comment
~Mr.Hassan Posted August 11, 2015 Author Share Posted August 11, 2015 ممكن الفنكشات بترتيب اتخربط مخي لان ض Link to comment
iMr.SFA7 Posted August 11, 2015 Share Posted August 11, 2015 triggerClientEvent addEvent addEventHandler guiSetVisible Link to comment
~Mr.Hassan Posted August 11, 2015 Author Share Posted August 11, 2015 triggerClientEvent ( "ss", localPlayer ) addEvent ( " ss " , true ) addEventHandler ( "ss",root function () guiSetVisible ( اسم النافذه , false ) end ) Link to comment
iMr.SFA7 Posted August 11, 2015 Share Posted August 11, 2015 راجع ارقمنتات ترايقر ااكلنت ! localPlayer = Client Side Only Link to comment
~Mr.Hassan Posted August 11, 2015 Author Share Posted August 11, 2015 طيب الحين اكلم صديقي سكايب اشوفه المهم ابيك تشف لي هل كود addEvent ( "hassan", true ) addEventHandler ( "hassan",root function () for k, v in ipairs ( getElementsByType ( "player" ) ) do kickPlayer ( v, "صيانة" ) if isObjectInACLGroup ( 'user.' .. getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( 'Console' ) ) then كيف اخليه ما يطرد الكونسل شو بحط بعد ما يتحقق انه كونسل فيني احط للكيك فولس ؟ Link to comment
iMr.SFA7 Posted August 11, 2015 Share Posted August 11, 2015 addEvent ( "hassan", true ) addEventHandler ( "hassan",root, function () for k, v in ipairs ( getElementsByType ( "player" ) ) do if not isObjectInACLGroup ( 'user.' .. getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( 'Console' ) ) then kickPlayer ( v, "صيانة" ) end end end ) Link to comment
~Mr.Hassan Posted August 11, 2015 Author Share Posted August 11, 2015 اسمع اقدر اعمل تيكست والي يكتبه بتيكست يكون السبب ؟ Link to comment
~Mr.Hassan Posted August 11, 2015 Author Share Posted August 11, 2015 ومشكور على الكود Link to comment
iMr.SFA7 Posted August 11, 2015 Share Posted August 11, 2015 اسمع اقدر اعمل تيكست والي يكتبه بتيكست يكون السبب ؟ أكيد تقدر جيب التكست وارسله بالترايقر وحطه مكان السبب guiGetText triggerServerEvent kickPlayer 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