yazan Posted March 14, 2013 Share Posted March 14, 2013 سلام عليكم ودي تعديل على ذي تكتب رساله في ادت ططعل رساله في لوحه توضيح اكثر الكونسل يكتب يكبس اف 2 يطلع له لوحه فيها ادت يكتب رساله و يكبس ارسال ططلع للكل في لوحه GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} GUIEditor_Window[2] = guiCreateWindow(190,268,395,153,"By yaZan",false) guiSetVisible(GUIEditor_Window[2],false) guiSetAlpha(GUIEditor_Window[2],1) GUIEditor_Image[2] = guiCreateStaticImage(9,93,377,51,"images/mtalogo.png",false,GUIEditor_Window[2]) GUIEditor_Window[1] = guiCreateWindow(190,53,392,187,"By yaZan",false) guiSetVisible(GUIEditor_Window[1],false) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Edit[1] = guiCreateEdit(66,76,280,49,"",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(67,29,306,37,"ارسل رسال بل كتابه في صندوق الحوار و اضغط ارسال",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(97,141,208,36,"ارسل للكل",false,GUIEditor_Window[1]) function open() guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) guiSetInputEnabled(guiGetVisible(GUIEditor_Window[1])) end bindKey("F12","down",open) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == GUIEditor_Button[1] ) then local Data = guiGetText ( GUIEditor_Edit[1] ) if Data ~= "" then triggerServerEvent ( "onSendDataToAll", localPlayer, Data ) end end) Link to comment
iPrestege Posted March 14, 2013 Share Posted March 14, 2013 (edited) وش مافهمت ولا شيء == تحديث # جرب : GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} GUIEditor_Window[2] = guiCreateWindow(190,268,395,153,"By yaZan",false) guiSetVisible(GUIEditor_Window[2],false) guiSetAlpha(GUIEditor_Window[2],1) GUIEditor_Image[2] = guiCreateStaticImage(9,93,377,51,"images/mtalogo.png",false,GUIEditor_Window[2]) GUIEditor_Window[1] = guiCreateWindow(190,53,392,187,"By yaZan",false) guiSetVisible(GUIEditor_Window[1],false) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Edit[1] = guiCreateEdit(66,76,280,49,"",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(67,29,306,37,"ارسل رسال بل كتابه في صندوق الحوار و اضغط ارسال",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(97,141,208,36,"ارسل للكل",false,GUIEditor_Window[1]) function open() guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) guiSetInputEnabled(guiGetVisible(GUIEditor_Window[1])) end bindKey("F12","down",open) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == GUIEditor_Button[1] ) then local Data = guiGetText ( GUIEditor_Edit[1] ) if Data ~= "" then triggerServerEvent ( "onSendDataToAll", localPlayer, Data ) end end end ) Edited March 14, 2013 by Guest Link to comment
yazan Posted March 14, 2013 Author Share Posted March 14, 2013 ما في سيرفر هو لزم في بس ما عرفت اعمله برستيج اقلك تكبس اف 12 و انت معك ادمنيه كونسل ططلع لوحه فيها ادت تكتب رساله في ادت و تكبس ارسال ترسل للجميع في لوحه رقم 2 و شوي و تختفي Link to comment
iPrestege Posted March 14, 2013 Share Posted March 14, 2013 يعني اذا ضغط ارسال تطلع لوحة للكل لمدة معينة وتختفي؟ Link to comment
yazan Posted March 14, 2013 Author Share Posted March 14, 2013 ودي سيرفر و تعديل كلنت لنه سيرفر معرف له Link to comment
iPrestege Posted March 14, 2013 Share Posted March 14, 2013 اللوحة تفتح للكونسول : -- Client : addEvent addEventHandler -- Server : isObjectInACLGroup triggerClientEvent -- source اللوحة تفتح لمدة : -- Client : setTimer guiSetVisible Link to comment
yazan Posted March 14, 2013 Author Share Posted March 14, 2013 (edited) GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} GUIEditor_Window[2] = guiCreateWindow(190,268,395,153,"By yaZan",false) guiSetVisible(GUIEditor_Window[2],false) guiSetAlpha(GUIEditor_Window[2],1) GUIEditor_Image[2] = guiCreateStaticImage(9,93,377,51,"images/mtalogo.png",false,GUIEditor_Window[2]) GUIEditor_Window[1] = guiCreateWindow(190,53,392,187,"By yaZan",false) guiSetVisible(GUIEditor_Window[1],false) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Edit[1] = guiCreateEdit(66,76,280,49,"",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(67,29,306,37,"ارسل رسال بل كتابه في صندوق الحوار و اضغط ارسال",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(97,141,208,36,"ارسل للكل",false,GUIEditor_Window[1]) function open() guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) guiSetInputEnabled(guiGetVisible(GUIEditor_Window[1])) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then end bindKey("F12","down",open) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == GUIEditor_Button[1] ) then local Data = guiGetText ( GUIEditor_Edit[1] ) if Data ~= "" then triggerServerEvent ( "onSendDataToAll", localPlayer, Data ) end end end ) Edited March 14, 2013 by Guest Link to comment
iPrestege Posted March 14, 2013 Share Posted March 14, 2013 لازم تسوي ترايقر من السيرفر للكلنت والتايمر غلط لازم تسوية مع الاخفاء # Link to comment
yazan Posted March 14, 2013 Author Share Posted March 14, 2013 سيرفر شلون اعمله مقدر اخليه يجي على لوحه رقم 2 و تختفي Link to comment
iPrestege Posted March 14, 2013 Share Posted March 14, 2013 وضحت لك الترايقر عشان تفتح للكونسول مو الاخفاء!!!@#! Link to comment
yazan Posted March 14, 2013 Author Share Posted March 14, 2013 addEvent ( "onSendDataToALL", true ) addEventHandler ( "onSendDataToALL", root, function ( Data ) if tostring ( Data ) then for _, v in ipairs ( getElementsByType ( "player" ) ) do outputChatBox ( "a communication has been received from ["..getPlayerName(source).."] : "..Data, v, 225, 0, 0, true ) end end end end ) ذا لكن مو عارف اطلع بل لوحه ولا اخفاء لها Link to comment
iPrestege Posted March 14, 2013 Share Posted March 14, 2013 استخدم الوظائف اللي عطيتك حق الادمن فوق صعبه؟ Link to comment
yazan Posted March 14, 2013 Author Share Posted March 14, 2013 مو عارف اعمل ارسل للوحه ولا اخفاء لها الحين ذا كلنت و سيرفر سيرفر addEvent ( "onSendDataToALL", true ) addEventHandler ( "onSendDataToALL", root, function ( Data ) if tostring ( Data ) then for _, v in ipairs ( getElementsByType ( "player" ) ) do outputChatBox ( "a communication has been received from ["..getPlayerName(source).."] : "..Data, v, 225, 0, 0, true ) end end end end ) كلنت GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} GUIEditor_Window[2] = guiCreateWindow(190,268,395,153,"By yaZan",false) guiSetVisible(GUIEditor_Window[2],false) guiSetAlpha(GUIEditor_Window[2],1) GUIEditor_Image[2] = guiCreateStaticImage(9,93,377,51,"images/mtalogo.png",false,GUIEditor_Window[2]) GUIEditor_Window[1] = guiCreateWindow(190,53,392,187,"By yaZan",false) guiSetVisible(GUIEditor_Window[1],false) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Edit[1] = guiCreateEdit(66,76,280,49,"",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(67,29,306,37,"ارسل رسال بل كتابه في صندوق الحوار و اضغط ارسال",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(97,141,208,36,"ارسل للكل",false,GUIEditor_Window[1]) function open() guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) guiSetInputEnabled(guiGetVisible(GUIEditor_Window[1])) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then end bindKey("F12","down",open) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == GUIEditor_Button[1] ) then local Data = guiGetText ( GUIEditor_Edit[1] ) if Data ~= "" then triggerServerEvent ( "onSendDataToAll", localPlayer, Data ) end end end ) Link to comment
iPrestege Posted March 14, 2013 Share Posted March 14, 2013 اقولك ارسل ترايقر للفتح وسوي ايفنت وايفنت هاندلر بالكلنت وسوي ترايقر كلنت من السيرفر عشان يشيك للكونسول Link to comment
кιηg-αвα∂у Posted March 14, 2013 Share Posted March 14, 2013 جرب addEvent ( "onSendDataToALL", true ) addEventHandler ( "onSendDataToALL", root, function ( Data ) if tostring ( Data ) and isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( source) ), aclGetGroup ( "Admin" ) ) then for _, v in ipairs ( getElementsByType ( "player" ) ) do outputChatBox ( "a communication has been received from ["..getPlayerName(source).."] : "..Data, v, 225, 0, 0, true ) triggerClientEvent( getRootElement(), "setText", Data ) end end end end ) GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} GUIEditor_Window[2] = guiCreateWindow(190,268,395,153,"By yaZan",false) guiSetVisible(GUIEditor_Window[2],false) guiSetAlpha(GUIEditor_Window[2],1) GUIEditor_Image[2] = guiCreateStaticImage(9,93,377,51,"images/mtalogo.png",false,GUIEditor_Window[2]) GUIEditor_Window[1] = guiCreateWindow(190,53,392,187,"By yaZan",false) guiSetVisible(GUIEditor_Window[1],false) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Edit[1] = guiCreateEdit(66,76,280,49,"",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(67,29,306,37,"ارسل رسال بل كتابه في صندوق الحوار و اضغط ارسال",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(97,141,208,36,"ارسل للكل",false,GUIEditor_Window[1]) function open() guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) guiSetInputEnabled(guiGetVisible(GUIEditor_Window[1])) bindKey("F12","down",open) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == GUIEditor_Button[1] ) then local Data = guiGetText ( GUIEditor_Edit[1] ) if Data ~= "" then triggerServerEvent ( "onSendDataToAll", localPlayer, Data ) end end end ) addEvent("setText", true) addEventHandler("setText", root, function(Data) guiSetText("المكان الي تبي", Data) end) لاتنسى تغير السطر الي قبل الأخير في كيلنت Link to comment
iPrestege Posted March 14, 2013 Share Posted March 14, 2013 جرب addEvent ( "onSendDataToALL", true ) addEventHandler ( "onSendDataToALL", root, function ( Data ) if tostring ( Data ) and isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( source) ), aclGetGroup ( "Admin" ) ) then for _, v in ipairs ( getElementsByType ( "player" ) ) do outputChatBox ( "a communication has been received from ["..getPlayerName(source).."] : "..Data, v, 225, 0, 0, true ) triggerClientEvent( getRootElement(), "setText", Data ) end end end end ) GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} GUIEditor_Window[2] = guiCreateWindow(190,268,395,153,"By yaZan",false) guiSetVisible(GUIEditor_Window[2],false) guiSetAlpha(GUIEditor_Window[2],1) GUIEditor_Image[2] = guiCreateStaticImage(9,93,377,51,"images/mtalogo.png",false,GUIEditor_Window[2]) GUIEditor_Window[1] = guiCreateWindow(190,53,392,187,"By yaZan",false) guiSetVisible(GUIEditor_Window[1],false) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Edit[1] = guiCreateEdit(66,76,280,49,"",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(67,29,306,37,"ارسل رسال بل كتابه في صندوق الحوار و اضغط ارسال",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(97,141,208,36,"ارسل للكل",false,GUIEditor_Window[1]) function open() guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) guiSetInputEnabled(guiGetVisible(GUIEditor_Window[1])) bindKey("F12","down",open) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == GUIEditor_Button[1] ) then local Data = guiGetText ( GUIEditor_Edit[1] ) if Data ~= "" then triggerServerEvent ( "onSendDataToAll", localPlayer, Data ) end end end ) addEvent("setText", true) addEventHandler("setText", root, function(Data) guiSetText("المكان الي تبي", Data) end) لاتنسى تغير السطر الي قبل الأخير في كيلنت rootElement = ?? > source Link to comment
кιηg-αвα∂у Posted March 14, 2013 Share Posted March 14, 2013 انا ماعدلت على كوده بس ضفت يرسل ترايقر لكل الاعبين ويحط الكلام Link to comment
кιηg-αвα∂у Posted March 14, 2013 Share Posted March 14, 2013 عدلت الأخطاء الي في كودك GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} GUIEditor_Window[2] = guiCreateWindow(190,268,395,153,"By yaZan",false) guiSetVisible(GUIEditor_Window[2],false) guiSetAlpha(GUIEditor_Window[2],1) GUIEditor_Image[2] = guiCreateStaticImage(9,93,377,51,"images/mtalogo.png",false,GUIEditor_Window[2]) GUIEditor_Window[1] = guiCreateWindow(190,53,392,187,"By yaZan",false) guiSetVisible(GUIEditor_Window[1],false) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Edit[1] = guiCreateEdit(66,76,280,49,"",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(67,29,306,37,"ارسل رسال بل كتابه في صندوق الحوار و اضغط ارسال",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(97,141,208,36,"ارسل للكل",false,GUIEditor_Window[1]) function open() guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) guiSetInputEnabled(guiGetVisible(GUIEditor_Window[1])) end bindKey("F12","down",open) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == GUIEditor_Button[1] ) then local Data = guiGetText ( GUIEditor_Edit[1] ) if Data ~= "" then triggerServerEvent ( "onSendDataToAll", getLocalPlayer(), Data ) end end end ) addEvent("setText", true) addEventHandler("setText", root, function(v) guiSetText( المكان الي تبي, guiGetText(GUIEditor_Edit[1])) end) addEvent ( "onSendDataToAll", true ) addEventHandler ( "onSendDataToAll", root, function ( Data ) if tostring ( Data ) and isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( source) ), aclGetGroup ( "Admin" ) ) then for _, v in ipairs ( getElementsByType ( "player" ) ) do outputChatBox ( "a communication has been received from ["..getPlayerName(source).."] : "..Data, v, 225, 0, 0, true ) triggerClientEvent( getRootElement(), "setText", v ) end end end ) ملاحضة: انا جربته وشغال بس انت عدل المكان الي تبي تحط فيه الكلام Link to comment
3NAD Posted March 14, 2013 Share Posted March 14, 2013 لم يتم التجربة -- Client Side GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} GUIEditor_Window[2] = guiCreateWindow(190,268,395,153,"By yaZan",false) guiSetVisible(GUIEditor_Window[2],false) guiSetAlpha(GUIEditor_Window[2],1) GUIEditor_Image[2] = guiCreateStaticImage(9,93,377,51,"images/mtalogo.png",false,GUIEditor_Window[2]) GUIEditor_Window[1] = guiCreateWindow(190,53,392,187,"By yaZan",false) guiSetVisible(GUIEditor_Window[1],false) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Edit[1] = guiCreateEdit(66,76,280,49,"",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(67,29,306,37,"ارسل رسال بل كتابه في صندوق الحوار و اضغط ارسال",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(97,141,208,36,"ارسل للكل",false,GUIEditor_Window[1]) addEvent ( "onOpenDataWindow", true ) addEventHandler ( "onOpenDataWindow", root, function ( ) guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) guiSetInputEnabled ( guiGetVisible( GUIEditor_Window[1] ) ) end ) addEventHandler ( "onClientGUIClick", root, function ( ) if source == GUIEditor_Button[1] then local Data = guiGetText ( GUIEditor_Edit[1] ) if Data == "" then return end triggerServerEvent ( "onSendDataToAll", localPlayer, Data ) end end ) -- Server Side for _, v in ipairs ( getElementsByType ( "player" ) ) do bindKey ( v, "f12", "down", aOpen_ ) end addEventHandler ( "onPlayerJoin", root, function ( ) bindKey ( source, "f12", "down", aOpen_ ) end ) aOpen_ = function ( plr_ ) local plrAccount = getPlayerAccount ( plr_ ) if plrAccount not isGuestAccount ( plrAccount ) then if isObjectInACLGroup ("user."..getAccountName ( plrAccount ), aclGetGroup ( "Admin" ) ) then triggerClientEvent ( plr_, "onOpenDataWindow", plr_ ) end end end addEvent ( "onSendDataToAll", true ) addEventHandler ( "onSendDataToAll", root, function ( Data ) if tostring ( Data ) then outputChatBox ( "a communication has been received from ["..getPlayerName(source).."] : "..Data, root, 225, 0, 0, true ) end end ) Link to comment
iPrestege Posted March 14, 2013 Share Posted March 14, 2013 -- Server -- تعديل بسيط على كود عناد فية خطأ في الحساب ذذ aOpen_ = function ( plr_ ) local plrAccount = getPlayerAccount ( plr_ ) if not isGuestAccount ( plrAccount ) then if isObjectInACLGroup ("user."..getAccountName ( plrAccount ), aclGetGroup ( "Admin" ) ) then triggerClientEvent ( plr_, "onOpenDataWindow", plr_ ) end end end addEvent ( "onSendDataToAll", true ) addEventHandler ( "onSendDataToAll", root, function ( Data ) if tostring ( Data ) then outputChatBox ( "a communication has been received from ["..getPlayerName(source).."] : "..Data, root, 225, 0, 0, true ) end end ) for _, v in ipairs (getElementsByType ( "player" ) ) do bindKey ( v, "f12", "down", aOpen_ ) end addEventHandler ( "onPlayerJoin", root, function ( ) bindKey ( source, "f12", "down", aOpen_ ) 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