ErHaBe Posted July 15, 2016 Share Posted July 15, 2016 السلام عليكم مشكله بالقريد ليست كلنت addEventHandler("onClientGUIClick",resourceRoot, function ( ) if ( source == b1 ) then if ( guiGridListGetSelectedItem(GUIEditor.gridlist[1] ) ~= -1 ) then local name = guiGridListGetItemText(GUIEditor.gridlist[1],guiGridListGetSelectedItem(GUIEditor.gridlist[1] ),1) local thePlayer = getElementModel( name ) triggerServerEvent("skin",localPlayer) else outputChatBox("plase selcet player", 255, 0, 0) end end end ) addEvent("skin",true) addEventHandler("skin",root, function (source) setElementModel(id,287) end end) المشكله هي اني عامل شخصيتين بل قريد ليست وانا عامل مثلا شخصيه سوات بمحل وشخصيه ارمي بمحل مثلا بس اضغط مثلا على شخصيه ارمي يعطيني شخصيه سوات وبس اضغط على شخصيه سوات يعطيني شخصيه سوات اما بس اعمل العكس بيعطيني شخصيه ارمي بالاثنين ويقلي بدي بق في مشكله بالارقمنت ب getelementmodil بالكلنت وبس Link to comment
gadid-lua Posted July 15, 2016 Share Posted July 15, 2016 السلام عليكممشكله بالقريد ليست كلنت addEventHandler("onClientGUIClick",resourceRoot, function ( ) if ( source == b1 ) then if ( guiGridListGetSelectedItem(GUIEditor.gridlist[1] ) ~= -1 ) then local name = guiGridListGetItemText(GUIEditor.gridlist[1],guiGridListGetSelectedItem(GUIEditor.gridlist[1] ),1) local thePlayer = getElementModel( name ) triggerServerEvent("skin",localPlayer) else outputChatBox("plase selcet player", 255, 0, 0) end end end ) addEvent("skin",true) addEventHandler("skin",root, function (source) setElementModel(id,287) end end) المشكله هي اني عامل شخصيتين بل قريد ليست وانا عامل مثلا شخصيه سوات بمحل وشخصيه ارمي بمحل مثلا بس اضغط مثلا على شخصيه ارمي يعطيني شخصيه سوات وبس اضغط على شخصيه سوات يعطيني شخصيه سوات اما بس اعمل العكس بيعطيني شخصيه ارمي بالاثنين ويقلي بدي بق في مشكله بالارقمنت ب getelementmodil بالكلنت وبس --client addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == b1 ) then if ( guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) ~= -1 ) then local SkinName = guiGridListGetItemText ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1]), 1 ) local SkiniD = guiGridListGetItemData( GUIEditor.gridlist[1], guiGridListGetSelectedItem( GUIEditor.gridlist[1]), 1 ) if ( SkinName ~= '' and SkiniD ~= '' ) then triggerServerEvent ( "Skin", localPlayer, SkiniD ) end else outputChatBox ( "* Please Select Skin", 0, 255, 0, true ) end end end ) سيرفر addEvent ( "Skin", true ) addEventHandler ( "Skin", root, function ( SkiniD ) setElementModel ( source, tonumber ( SkiniD ) ) end ) Link to comment
N3xT Posted July 15, 2016 Share Posted July 15, 2016 أولاً : ماني شايف أنك تحتاج تريقر للـ سيرفر تقدر تسويها بالكلنت ثانياً على أي اساس إستعملت قيت ألمنت داتا ؟ أيضاً مالها داعي المفروض تستعمل guiGridListSetItemData إطرح الكود كامل عشان أقدر اساعدك لأنه ناقص فوق الجدول Link to comment
ErHaBe Posted July 15, 2016 Author Share Posted July 15, 2016 حليت المشكله بس بدي فنكشن لما الاعب يسجل تطلع له الوحه مشكورين عطلب الاول Link to comment
Adham Posted July 15, 2016 Share Posted July 15, 2016 "onClientPlayerJoin" guiSetVisible Link to comment
SycroX Posted July 15, 2016 Share Posted July 15, 2016 حليت المشكله بس بدي فنكشنلما الاعب يسجل تطلع له الوحه مشكورين عطلب الاول -__- لا تساعد غلط يا لعبة addEventHandler = "onPlayerLogin" triggerClientEvent guiSetVisible showCursor Link to comment
N3xT Posted July 15, 2016 Share Posted July 15, 2016 حليت المشكله بس بدي فنكشنلما الاعب يسجل تطلع له الوحه مشكورين عطلب الاول -__- لا تساعد غلط يا لعبة addEventHandler = "onPlayerLogin" triggerClientEvent guiSetVisible showCursor سبحان الله ، قاعد أكتب الرد وبقوله نفس كلامك بس أنت سبقتني Link to comment
Adham Posted July 15, 2016 Share Posted July 15, 2016 (edited) --- Server --- addEventHandler ( "onPlayerLogin",root, function ( ) triggerClientEvent ( source, "Set", source ) end ) --- Client --- addEvent ( "Set", true ) addEventHandler ( "Set", root, function ( ) guiSetVisible ( wnd, true ) showCursor ( true ) guiSetInputEnabled ( true ) end ) Edited July 15, 2016 by Guest Link to comment
N3xT Posted July 15, 2016 Share Posted July 15, 2016 --- Server --- addEventHandler ( "onPlayerLogin",root, function ( ) triggerClientEvent ( source, "Set",resourceRoot ) end ) --- Client --- addEvent ( "Set", true ) addEventHandler ( "Set", root, function ( ) guiSetVisible ( wnd, true ) showCursor ( false ) guiSetInputEnabled ( false ) end ) showCursor ( false ) guiSetInputEnabled ( false ) false ? Link to comment
ErHaBe Posted July 15, 2016 Author Share Posted July 15, 2016 --- Server --- addEventHandler ( "onPlayerLogin",root, function ( ) triggerClientEvent ( source, "Set",resourceRoot ) end ) --- Client --- addEvent ( "Set", true ) addEventHandler ( "Set", root, function ( ) guiSetVisible ( wnd, true ) showCursor ( false ) guiSetInputEnabled ( false ) end ) ما نجحت الطريقه مع ان غيرت ل true واسم النافذه وكل شي Link to comment
N3xT Posted July 15, 2016 Share Posted July 15, 2016 جرب عدل التريقر اللي بالسيرفر لـ كذا triggerClientEvent ( source, "Set",source) Link to comment
ErHaBe Posted July 15, 2016 Author Share Posted July 15, 2016 جرب عدل التريقر اللي بالسيرفر لـ كذا triggerClientEvent ( source, "Set",source) addEvent ( "Set", true ) addEventHandler ( "Set", root, function ( ) guiSetVisible ( wnndow1, true ) showCursor ( true ) guiSetInputEnabled ( true ) end ) debug line 4 Expected gui-element at argument 1,got nil] Link to comment
ErHaBe Posted July 15, 2016 Author Share Posted July 15, 2016 تأكد من أسم اللوحة نفس شي addEvent ( "Set", true ) addEventHandler ( "Set", root, function ( ) guiSetVisible ( window1, true ) showCursor ( true ) guiSetInputEnabled ( true ) end ) Link to comment
ErHaBe Posted July 15, 2016 Author Share Posted July 15, 2016 طب حد من المشرفين يجي يساعد معقوله نظل على كود صغير هل قد بس يقلنا المشكله لانهم خبيرين Link to comment
Adham Posted July 15, 2016 Share Posted July 15, 2016 addEventHandler ( "onPlayerLogin",root, function ( ) triggerClientEvent ( source, "Set", source ) end ) --- Client --- addEvent ( "Set", true ) addEventHandler ( "Set", root, function ( ) guiSetVisible ( NameWnd, true ) showCursor ( false ) guiSetInputEnabled ( false ) end ) Link to comment
ErHaBe Posted July 15, 2016 Author Share Posted July 15, 2016 addEventHandler ( "onPlayerLogin",root, function ( ) triggerClientEvent ( source, "Set", source ) end ) --- Client --- addEvent ( "Set", true ) addEventHandler ( "Set", root, function ( ) guiSetVisible ( NameWnd, true ) showCursor ( false ) guiSetInputEnabled ( false ) end ) نفس شي انا لوحتي فيها نافذه وبنافذه فيه قريد ليست وجويت القريد ليست بوتون بس كذا ومبرمجه جاهزه اما المشكله بدي اول ما لاعب يسجل دخوله بس ما تظبط Link to comment
Adham Posted July 15, 2016 Share Posted July 15, 2016 جرب غير false الي true لو م اشتغل شغل دي بق وشوف Link to comment
MR.GRAND Posted July 15, 2016 Share Posted July 15, 2016 طب حد من المشرفين يجي يساعد معقوله نظل على كود صغير هل قد بس يقلنا المشكله لانهم خبيرين حط كود لوحتك مع الكود اللي فيه الخطا موكل شوي تحط ربع الكود Link to comment
SycroX Posted July 15, 2016 Share Posted July 15, 2016 جرب غيرfalse الي true لو م اشتغل شغل دي بق وشوف انتا حياتك غلط في غلط ليه حاطت false اصلن ؟؟ ولا اي شي و خلاص + لصاحب الموضوع اطراح اكوادك كود اللوحة و اسمها اطرحو Link to comment
ErHaBe Posted July 15, 2016 Author Share Posted July 15, 2016 كلنت local Skins = { { "ARMY", 287 }, { "SWAT", 285 }, } GUIEditor = { gridlist = {}, window = {}, button = {} } addEventHandler("onClientResourceStart", resourceRoot, function() window1 = guiCreateWindow(10, 10, 226, 335, "Skins", false) guiWindowSetSizable(window1, false) GridList = guiCreateGridList(9, 16, 207, 309, false, window1) guiGridListAddColumn(GridList, "Skins", 0.9) for _,v in ipairs ( Skins ) do local Row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, Row, 1, tostring ( v[1] ), false, false ) guiGridListSetItemData ( GridList, Row, 1, tonumber ( v[2] ) ) end Button1 = guiCreateButton(42, 256, 117, 47, "Give", false, GridList) guiSetProperty(Button1, "NormalTextColour", "FFAAAAAA") end ) ------ addEvent ( "Set", true ) addEventHandler ( "Set", root, function ( ) guiSetVisible ( window1, true ) showCursor ( false ) guiSetInputEnabled ( false ) end ) addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == Button1 ) then if ( guiGridListGetSelectedItem ( GridList ) ~= -1 ) then local SkinName = guiGridListGetItemText ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) local SkiniD = guiGridListGetItemData( GridList, guiGridListGetSelectedItem( GridList ), 1 ) if ( SkinName ~= '' and SkiniD ~= '' ) then triggerServerEvent ( "Skin", localPlayer, SkiniD ) end else outputChatBox ( "* Please Select Skin", 0, 255, 0, true ) end end end ) -------- addEvent ( "Skin", true ) addEventHandler ( "Skin", root, function ( SkiniD ) local source = setElementModel ( source, tonumber ( SkiniD ) ) outputChatBox ( "* Changed Skin", source, 255, 0, 0, true ) end ) ---------- addEventHandler ( "onPlayerLogin",root, function ( ) triggerClientEvent ( source, "Set", source ) end ) Link to comment
' A F . Posted July 15, 2016 Share Posted July 15, 2016 addEvent ( "Skin", true ) addEventHandler ( "Skin", root, function ( SkiniD ) setElementModel ( source, tonumber ( SkiniD ) ) outputChatBox ( "* Changed Skin", source, 255, 0, 0, true ) end ) addEventHandler ( "onPlayerLogin",root, function ( ) triggerClientEvent ( source, "Set", source ) 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