yazan Posted March 3, 2013 Posted March 3, 2013 سلام عليكم ودي كود تحديد المكان عند ضغط زر + كود ضهور رساله لقروب معين عند كتابتها في يدت و كبس زر ارسل
===|OSAMA|=== Posted March 3, 2013 Posted March 3, 2013 الطلب الأول ماني فاهمه إذا تقصد تحديد مكآن اللاعب فـ إستخدم 'onClientGUIClick' setElementPosition وبالنسبة للطلب الثآني 'onClientGUIClick' guiGetText triggerServerEvent outputChatBox
PaiN^ Posted March 4, 2013 Posted March 4, 2013 وبالنسبة للطلب الثآني 'onClientGUIClick' guiGetText triggerServerEvent outputChatBox + isObjectInACLGroup
yazan Posted March 4, 2013 Author 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
TAPL Posted March 4, 2013 Posted March 4, 2013 يطلع اخطاء بسو ودي ياه يطلع لقروب شرطي + الكلام يكون وش كتبه في يدت سيرفر 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
PaiN^ Posted March 4, 2013 Posted March 4, 2013 addEventHandler("outChatBox",getRootElement(),function(GUIEditor_Edit) outChatBox('inGUIEditor_Edit', 255, 255, 255, true ) outChatBox ????
TAPL Posted March 4, 2013 Posted March 4, 2013 طيب ممكن تصحيح https://wiki.multitheftauto.com/wiki/Debugging
yazan Posted March 4, 2013 Author Posted March 4, 2013 يطلع اخطاء بسو ودي ياه يطلع لقروب شرطي + الكلام يكون وش كتبه في يدت سيرفر 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)
TAPL Posted March 4, 2013 Posted March 4, 2013 طيب ممكن تصحيح https://wiki.multitheftauto.com/wiki/Debugging
jafar Posted March 4, 2013 Posted March 4, 2013 يطلع اخطاء بسو ودي ياه يطلع لقروب شرطي + الكلام يكون وش كتبه في يدت سيرفر 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) خرابيط
Bhrany-danger Posted March 4, 2013 Posted March 4, 2013 https://wiki.multitheftauto.com/wiki/Debugging هذا حق تعرف وش الخطا في الكود اكتب في اف 8 debugscript 3 ..
][sojn][ Posted March 4, 2013 Posted March 4, 2013 هههههههههه من وين جبت الاكواد كل كود جايبه من مود نسخ ولصق وما تدري وش يعني
#Al-Ha[J]aRii Posted March 4, 2013 Posted March 4, 2013 اكواد خرابيط ههههه شوف السيرفر مافي فكشن اسمه outChatBox
iPrestege Posted March 4, 2013 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 )
HsSoN Posted March 4, 2013 Posted March 4, 2013 هههههههههه من وين جبت الاكواد كل كود جايبه من مود نسخ ولصق وما تدري وش يعني بلا فلسفة زايده لو كان فيك خير عدلت له الاكواد مثل بريستنج جزاه الله الف خير مو تقعد تضحك عليه قول انا معرف اعدل الكود وخلاص !!.. وترأ ذا قسم برمجة يعني لتعديل الاكواد مو تجي تتفلسف
#Al-Ha[J]aRii Posted March 4, 2013 Posted March 4, 2013 هههههههههه من وين جبت الاكواد كل كود جايبه من مود نسخ ولصق وما تدري وش يعني بلا فلسفة زايده لو كان فيك خير عدلت له الاكواد مثل بريستنج جزاه الله الف خير مو تقعد تضحك عليه قول انا معرف اعدل الكود وخلاص !!.. وترأ ذا قسم برمجة يعني لتعديل الاكواد مو تجي تتفلسف +1
iPrestege Posted March 4, 2013 Posted March 4, 2013 + افضل تستخدم توسيط النافذهـ لأانها ماتجي كاملة للكل : centerWindow #,
3NAD Posted March 4, 2013 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 ) 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 )
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