yazan Posted March 3, 2013 Share Posted March 3, 2013 سلام عليكم ودي كود تحديد المكان عند ضغط زر + كود ضهور رساله لقروب معين عند كتابتها في يدت و كبس زر ارسل Link to comment
===|OSAMA|=== Posted March 3, 2013 Share Posted March 3, 2013 الطلب الأول ماني فاهمه إذا تقصد تحديد مكآن اللاعب فـ إستخدم 'onClientGUIClick' setElementPosition وبالنسبة للطلب الثآني 'onClientGUIClick' guiGetText triggerServerEvent outputChatBox Link to comment
PaiN^ Posted March 4, 2013 Share Posted March 4, 2013 ===|OSAMA|=== said: وبالنسبة للطلب الثآني 'onClientGUIClick' guiGetText triggerServerEvent outputChatBox + isObjectInACLGroup Link to comment
yazan Posted March 4, 2013 Author Share Posted March 4, 2013 (edited) يطلع اخطاء بسو ودي ياه يطلع لقروب شرطي + الكلام يكون وش كتبه في يدت سيرفر addEventHandler("outputChatBox",getRootElement(),function(GUIEditor_Edit) outChatBox('inGUIEditor_Edit', 255, 255, 255, true ) كلنت GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(32,125,721,362,"By yaZan",false) guiSetVisible(GUIEditor_Window[1],false) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Edit[1] = guiCreateEdit(9,65,694,96,"",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(233,34,239,19,"اكتب رساله و اضغط ارسل للشرطة للمساعدتك",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(86,164,516,55,"ارسل للشرطة",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(12,249,700,101,"تحديد مكاني",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(264,223,395,21,"اضغط تحديد مكاني لتحديد مكانك",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("F7","down",open) addEventHandler( "onClientGUIClick", root, function () if ( source == GUIEditor_Button ) then triggerServerEvent("outputChatBox",localPlayer,guiGetText) elseif ( source == GUIEditor_Button[2] ) then setElementPosition ( source, posX, posY, posZ ) end end) Edited March 4, 2013 by Guest Link to comment
TAPL Posted March 4, 2013 Share Posted March 4, 2013 yazan said: يطلع اخطاء بسو ودي ياه يطلع لقروب شرطي + الكلام يكون وش كتبه في يدت سيرفر addEventHandler("outChatBox",getRootElement(),function(GUIEditor_Edit) outChatBox('inGUIEditor_Edit', 255, 255, 255, true ) كلنت GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(32,125,721,362,"By yaZan",false) guiSetVisible(GUIEditor_Window[1],false) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Edit[1] = guiCreateEdit(9,65,694,96,"",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(233,34,239,19,"اكتب رساله و اضغط ارسل للشرطة للمساعدتك",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(86,164,516,55,"ارسل للشرطة",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(12,249,700,101,"تحديد مكاني",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(264,223,395,21,"اضغط تحديد مكاني لتحديد مكانك",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("F7","down",open) addEventHandler( "onClientGUIClick", root, function () if ( source == GUIEditor_Button ) then triggerServerEvent("outputChatBox",localPlayer,guiGetText) elseif ( source == GUIEditor_Button[2] ) then setElementPosition ( source, posX, posY, posZ ) end end) حبيبي وش تخربط من راسك؟ https://wiki.multitheftauto.com/wiki/Introduction_to_Scripting_the_GUI Link to comment
PaiN^ Posted March 4, 2013 Share Posted March 4, 2013 yazan said: addEventHandler("outChatBox",getRootElement(),function(GUIEditor_Edit) outChatBox('inGUIEditor_Edit', 255, 255, 255, true ) outChatBox ???? Link to comment
TAPL Posted March 4, 2013 Share Posted March 4, 2013 yazan said: طيب ممكن تصحيح https://wiki.multitheftauto.com/wiki/Debugging Link to comment
TAPL Posted March 4, 2013 Share Posted March 4, 2013 yazan said: حاولت فيه وريني الي حاولت فيه Link to comment
yazan Posted March 4, 2013 Author Share Posted March 4, 2013 yazan said: يطلع اخطاء بسو ودي ياه يطلع لقروب شرطي + الكلام يكون وش كتبه في يدت سيرفر addEventHandler("outputChatBox",getRootElement(),function(GUIEditor_Edit) outChatBox('inGUIEditor_Edit', 255, 255, 255, true ) كلنت GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(32,125,721,362,"By yaZan",false) guiSetVisible(GUIEditor_Window[1],false) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Edit[1] = guiCreateEdit(9,65,694,96,"",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(233,34,239,19,"اكتب رساله و اضغط ارسل للشرطة للمساعدتك",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(86,164,516,55,"ارسل للشرطة",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(12,249,700,101,"تحديد مكاني",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(264,223,395,21,"اضغط تحديد مكاني لتحديد مكانك",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("F7","down",open) addEventHandler( "onClientGUIClick", root, function () if ( source == GUIEditor_Button ) then triggerServerEvent("outputChatBox",localPlayer,guiGetText) elseif ( source == GUIEditor_Button[2] ) then setElementPosition ( source, posX, posY, posZ ) end end) Link to comment
TAPL Posted March 4, 2013 Share Posted March 4, 2013 TAPL said: yazan said: طيب ممكن تصحيح https://wiki.multitheftauto.com/wiki/Debugging Link to comment
yazan Posted March 4, 2013 Author Share Posted March 4, 2013 ^^^^^^^^^^^^ ماني فهم منه شي Link to comment
jafar Posted March 4, 2013 Share Posted March 4, 2013 yazan said: يطلع اخطاء بسو ودي ياه يطلع لقروب شرطي + الكلام يكون وش كتبه في يدت سيرفر addEventHandler("outputChatBox",getRootElement(),function(GUIEditor_Edit) outChatBox('inGUIEditor_Edit', 255, 255, 255, true ) كلنت GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(32,125,721,362,"By yaZan",false) guiSetVisible(GUIEditor_Window[1],false) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Edit[1] = guiCreateEdit(9,65,694,96,"",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(233,34,239,19,"اكتب رساله و اضغط ارسل للشرطة للمساعدتك",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(86,164,516,55,"ارسل للشرطة",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(12,249,700,101,"تحديد مكاني",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(264,223,395,21,"اضغط تحديد مكاني لتحديد مكانك",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("F7","down",open) addEventHandler( "onClientGUIClick", root, function () if ( source == GUIEditor_Button ) then triggerServerEvent("outputChatBox",localPlayer,guiGetText) elseif ( source == GUIEditor_Button[2] ) then setElementPosition ( source, posX, posY, posZ ) end end) خرابيط Link to comment
Bhrany-danger Posted March 4, 2013 Share Posted March 4, 2013 https://wiki.multitheftauto.com/wiki/Debugging هذا حق تعرف وش الخطا في الكود اكتب في اف 8 debugscript 3 .. Link to comment
yazan Posted March 4, 2013 Author Share Posted March 4, 2013 خخخ اعرف ما يطلع اخطاء لكن ما فيه وضيف Link to comment
][sojn][ Posted March 4, 2013 Share Posted March 4, 2013 هههههههههه من وين جبت الاكواد كل كود جايبه من مود نسخ ولصق وما تدري وش يعني Link to comment
#Al-Ha[J]aRii Posted March 4, 2013 Share Posted March 4, 2013 اكواد خرابيط ههههه شوف السيرفر مافي فكشن اسمه outChatBox Link to comment
iPrestege Posted March 4, 2013 Share Posted March 4, 2013 - Client Side - GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(32,125,721,362,"By yaZan",false) guiSetVisible(GUIEditor_Window[1],false) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Edit[1] = guiCreateEdit(9,65,694,96,"",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(233,34,239,19,"اكتب رساله و اضغط ارسل للشرطة للمساعدتك",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(86,164,516,55,"ارسل للشرطة",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(12,249,700,101,"تحديد مكاني",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(264,223,395,21,"اضغط تحديد مكاني لتحديد مكانك",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("F7","down",open) addEventHandler( "onClientGUIClick", root, function () local Data = guiGetText(GUIEditor_Edit[1]) local x,y,z = getElementPosition (localPlayer) if ( source == GUIEditor_Button[1] ) then triggerServerEvent("onSendDataToPolice",localPlayer,Data) elseif ( source == GUIEditor_Button[2] ) then outputChatBox("You're Position : X "..x.." , Y "..y.." , "..z.." ",225,255,0,true) end end ) - Server Side - addEvent("onSendDataToPolice",true) addEventHandler("onSendDataToPolice",root, function (Data) if isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount (source) ), aclGetGroup ( "القروب" ) ) then outputChatBox("a communication has been received from ["..getPlayerName(source).."] : "..Data.." ",root,225,0,0,true) end end ) Link to comment
HsSoN Posted March 4, 2013 Share Posted March 4, 2013 سوجن said: هههههههههه من وين جبت الاكواد كل كود جايبه من مود نسخ ولصق وما تدري وش يعني بلا فلسفة زايده لو كان فيك خير عدلت له الاكواد مثل بريستنج جزاه الله الف خير مو تقعد تضحك عليه قول انا معرف اعدل الكود وخلاص !!.. وترأ ذا قسم برمجة يعني لتعديل الاكواد مو تجي تتفلسف Link to comment
#Al-Ha[J]aRii Posted March 4, 2013 Share Posted March 4, 2013 HsSoN said: سوجن said: هههههههههه من وين جبت الاكواد كل كود جايبه من مود نسخ ولصق وما تدري وش يعني بلا فلسفة زايده لو كان فيك خير عدلت له الاكواد مثل بريستنج جزاه الله الف خير مو تقعد تضحك عليه قول انا معرف اعدل الكود وخلاص !!.. وترأ ذا قسم برمجة يعني لتعديل الاكواد مو تجي تتفلسف +1 Link to comment
iPrestege Posted March 4, 2013 Share Posted March 4, 2013 + افضل تستخدم توسيط النافذهـ لأانها ماتجي كاملة للكل : centerWindow #, Link to comment
3NAD Posted March 4, 2013 Share Posted March 4, 2013 Mr.Pres[T]ege said: - Client Side - GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(32,125,721,362,"By yaZan",false) guiSetVisible(GUIEditor_Window[1],false) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Edit[1] = guiCreateEdit(9,65,694,96,"",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(233,34,239,19,"اكتب رساله و اضغط ارسل للشرطة للمساعدتك",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(86,164,516,55,"ارسل للشرطة",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(12,249,700,101,"تحديد مكاني",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(264,223,395,21,"اضغط تحديد مكاني لتحديد مكانك",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("F7","down",open) addEventHandler( "onClientGUIClick", root, function () local Data = guiGetText(GUIEditor_Edit[1]) local x,y,z = getElementPosition (localPlayer) if ( source == GUIEditor_Button[1] ) then triggerServerEvent("onSendDataToPolice",localPlayer,Data) elseif ( source == GUIEditor_Button[2] ) then outputChatBox("You're Position : X "..x.." , Y "..y.." , "..z.." ",225,255,0,true) end end ) - Server Side - addEvent("onSendDataToPolice",true) addEventHandler("onSendDataToPolice",root, function (Data) if isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount (source) ), aclGetGroup ( "القروب" ) ) then outputChatBox("a communication has been received from ["..getPlayerName(source).."] : "..Data.." ",root,225,0,0,true) end end ) addEvent ( "onSendDataToPolice", true ) addEventHandler ( "onSendDataToPolice", root, function ( Data ) if tostring ( Data ) then for _, v in ipairs ( getElementsByType ( "player" ) ) do local plrAccount = getPlayerAccount ( v ) if plrAccount then if isObjectInACLGroup ( "user.".. getAccountName ( plrAccount ), aclGetGroup ( "القروب" ) ) then outputChatBox ( "a communication has been received from ["..getPlayerName(source).."] : "..Data, v, 225, 0, 0, true ) end end end end 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