Mr-Kartha Posted August 28, 2012 Share Posted August 28, 2012 مرحبا شباب كيفكم اخباركم انا سويت سكربت الشخصيات بس لما اضغط على الشخصيه ما تركب client GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(346,235,188,287,"~~~~SKIN-by-KaRtHa~~~~",false) GUIEditor_TabPanel[1] = guiCreateTabPanel(0.0532,0.0767,0.8989,0.892,true,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("KSA 1",GUIEditor_TabPanel[1]) GUIEditor_Image[1] = guiCreateStaticImage(0.0118,0.0043,0.9763,0.8448,"ss.png",true,GUIEditor_Tab[1]) GUIEditor_Button[1] = guiCreateButton(0.0118,0.8491,0.9763,0.1293,"open skin ksa 1",true,GUIEditor_Tab[1]) GUIEditor_Tab[2] = guiCreateTab("KSA 2",GUIEditor_TabPanel[1]) GUIEditor_Image[2] = guiCreateStaticImage(0,0,0.9882,0.8534,"s.png",true,GUIEditor_Tab[2]) GUIEditor_Button[2] = guiCreateButton(0.0059,0.8621,0.9704,0.1164,"open skin ksa 2",true,GUIEditor_Tab[2]) GUIEditor_Tab[3] = guiCreateTab("KARTHA ",GUIEditor_TabPanel[1]) GUIEditor_Edit[1] = guiCreateEdit(101,-35,5,5,"",false,GUIEditor_Tab[3]) GUIEditor_Label[1] = guiCreateLabel(0.0059,0.0086,0.9882,0.0776,"~~~~~~~~~~~~~~~~~~~~~",true,GUIEditor_Tab[3]) GUIEditor_Label[2] = guiCreateLabel(0.1775,0.0948,0.7101,0.069,"تم صنع المود من قبل",true,GUIEditor_Tab[3]) guiSetFont(GUIEditor_Label[2],"default-bold-small") GUIEditor_Label[3] = guiCreateLabel(0.0296,0.1983,0.9112,0.0819," [M-R]~aL~kArThA",true,GUIEditor_Tab[3]) GUIEditor_Label[4] = guiCreateLabel(0.1834,0.306,0.7692,0.0819,"للتواصل انسخ الايميل",true,GUIEditor_Tab[3]) guiSetFont(GUIEditor_Label[4],"default-bold-small") GUIEditor_Edit[2] = guiCreateEdit(0.2071,0.4224,0.6154,0.0819,"[email protected]",true,GUIEditor_Tab[3]) GUIEditor_Label[5] = guiCreateLabel(0.0296,0.5086,0.9408,0.069,"~~~~~~~~~~~~~~~~~~",true,GUIEditor_Tab[3]) GUIEditor_Label[6] = guiCreateLabel(0.0296,0.5776,0.9408,0.0862," mods by",true,GUIEditor_Tab[3]) GUIEditor_Label[7] = guiCreateLabel(0.0296,0.6638,0.9467,0.0776," [M-R]~aL~kArThA",true,GUIEditor_Tab[3]) GUIEditor_Label[8] = guiCreateLabel(0.0355,0.7586,0.9349,0.0819," Copy Email",true,GUIEditor_Tab[3]) GUIEditor_Edit[3] = guiCreateEdit(0.1953,0.8534,0.6036,0.0819,"[email protected]",true,GUIEditor_Tab[3]) guiSetVisible (GUIEditor_Window[1], false) --- هاذ الزر هو اخفاء النافذه ---------------------------------------------------انهاء النافذه---------------------------------------------------- ---يرحم امك يا نافذه افتحي بزر F7 bindKey ( "F7" , "down" , function() if ( guiGetVisible ( GUIEditor_Window[1] ) == true ) then guiSetVisible ( GUIEditor_Window[1] ,false ) showCursor (false ) guiSetInputEnabled(false) elseif ( guiGetVisible ( GUIEditor_Window[1] ) == false ) then guiSetVisible ( GUIEditor_Window[1] ,true ) showCursor (false ) guiSetInputEnabled(true) playSound("kartha/sss.wav") ----- صوت النافذه end end ) ---------- --- وظائف الأزار --------- function onGuiClick (button, state, absoluteX, absoluteY) if (source == GUIEditor_Button[1]) then ----- الزر الأول triggerServerEvent ("skin1", getLocalPlayer()) ---- ارسال الزر للسيرفر اذا ضغط عليه لاعب ونمسي اسم للحدث اللي هو skin1 -------- لازم نسوي الحدث بجانب الخادم ويكون بنفس اسم الحدث اللي حطيناه skin1 elseif (source == GUIEditor_Button[2]) then ------ الزر الثاني triggerServerEvent ("skin2", getLocalPlayer()) ------- مثل طريقة الزر الأول ويكون له حدث وباسم skin2 end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) ------------- ---- استبدال الشخصية ------------ function Repskin() ------------------------ ---- الثوب الأسود ----------------------- TXD1 = engineLoadTXD ("skin/124.txd"); --- اسم ملف TXD / ومساره موجود بملف skin engineImportTXD (TXD1, 124); ---- رقم الشخصية DFF1 = engineLoadDFF ("skin/124.dff", 124); --- اسم ملف dff / ورقم الشخصية engineReplaceModel (DFF1, 124); --- رقم الشخصية ------------------------ ---- الثوب الأبيض ----------------------- TXD2 = engineLoadTXD ("skin/46.txd"); engineImportTXD (TXD2, 46); DFF2 = engineLoadDFF ("skin/46.dff", 46); engineReplaceModel (DFF2, 46); end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), Repskin) server ------------------------------ --------جانب الخادم--server side --- --------------------------- ------------------- -- الثوب الأبيض ------------------- ------- -- للزر الأول الموجود بجانب العميل وهو GUIEditor_Button[1] ----- addEvent( "skin1", true ) ----- الحدث اللي سويناه لوظيفة الزر والموجود في جانب العميل واللي هوtriggerServerEvent ("skin1", getLocalPlayer()) function setSkin1 () setPedSkin ( source, 46 ) ---- رقم الشخصية outputChatBox ( "تم تغيير الشخصية بنجاح.", source, 255, 0, 0 ) ----- الشات end addEventHandler ( "skin1", getRootElement(), setSkin1 ) --------الحدث واسم الوظيفة ------------------- -- الثوب الأسود ------------------- ------- -- للزر الثاني الموجود بجانب العميل وهو GUIEditor_Button[2] ----- addEvent( "skin2", true ) ----- الحدث اللي سويناه لوظيفة الزر والموجود في جانب العميل واللي هوtriggerServerEvent ("skin2", getLocalPlayer()) function setSkin2 () setPedSkin ( source, 124 ) ---- رقم الشخصية outputChatBox ( "تم تغيير الشخصية بنجاح.", source, 255, 0, 0 ) ---- الشات end addEventHandler ( "skin2", getRootElement(), setSkin2 ) --------الحدث واسم الوظيفة وشكررا .... Link to comment
Mbtdaa Posted August 28, 2012 Share Posted August 28, 2012 انت ناسخ الاكواد من سكربت سعد حق الشخصيات ! Link to comment
Tete omar Posted August 28, 2012 Share Posted August 28, 2012 addEventHandler ("onClientResourceStart", resourceRoot, function( ) TXD1 = engineLoadTXD ("skin/124.txd") engineImportTXD (TXD1, 124) DFF1 = engineLoadDFF ("skin/124.dff", 124) engineReplaceModel (DFF1, 124) TXD2 = engineLoadTXD ("skin/46.txd") engineImportTXD (TXD2, 46) DFF2 = engineLoadDFF ("skin/46.dff", 46) engineReplaceModel (DFF2, 46) end GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(346,235,188,287,"~~~~SKIN-by-KaRtHa~~~~",false) GUIEditor_TabPanel[1] = guiCreateTabPanel(0.0532,0.0767,0.8989,0.892,true,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("KSA 1",GUIEditor_TabPanel[1]) GUIEditor_Image[1] = guiCreateStaticImage(0.0118,0.0043,0.9763,0.8448,"ss.png",true,GUIEditor_Tab[1]) GUIEditor_Button[1] = guiCreateButton(0.0118,0.8491,0.9763,0.1293,"open skin ksa 1",true,GUIEditor_Tab[1]) GUIEditor_Tab[2] = guiCreateTab("KSA 2",GUIEditor_TabPanel[1]) GUIEditor_Image[2] = guiCreateStaticImage(0,0,0.9882,0.8534,"s.png",true,GUIEditor_Tab[2]) GUIEditor_Button[2] = guiCreateButton(0.0059,0.8621,0.9704,0.1164,"open skin ksa 2",true,GUIEditor_Tab[2]) GUIEditor_Tab[3] = guiCreateTab("KARTHA ",GUIEditor_TabPanel[1]) GUIEditor_Edit[1] = guiCreateEdit(101,-35,5,5,"",false,GUIEditor_Tab[3]) GUIEditor_Label[1] = guiCreateLabel(0.0059,0.0086,0.9882,0.0776,"~~~~~~~~~~~~~~~~~~~~~",true,GUIEditor_Tab[3]) GUIEditor_Label[2] = guiCreateLabel(0.1775,0.0948,0.7101,0.069,"تم صنع المود من قبل",true,GUIEditor_Tab[3]) guiSetFont(GUIEditor_Label[2],"default-bold-small") GUIEditor_Label[3] = guiCreateLabel(0.0296,0.1983,0.9112,0.0819," [M-R]~aL~kArThA",true,GUIEditor_Tab[3]) GUIEditor_Label[4] = guiCreateLabel(0.1834,0.306,0.7692,0.0819,"للتواصل انسخ الايميل",true,GUIEditor_Tab[3]) guiSetFont(GUIEditor_Label[4],"default-bold-small") GUIEditor_Edit[2] = guiCreateEdit(0.2071,0.4224,0.6154,0.0819,"[email protected]",true,GUIEditor_Tab[3]) GUIEditor_Label[5] = guiCreateLabel(0.0296,0.5086,0.9408,0.069,"~~~~~~~~~~~~~~~~~~",true,GUIEditor_Tab[3]) GUIEditor_Label[6] = guiCreateLabel(0.0296,0.5776,0.9408,0.0862," mods by",true,GUIEditor_Tab[3]) GUIEditor_Label[7] = guiCreateLabel(0.0296,0.6638,0.9467,0.0776," [M-R]~aL~kArThA",true,GUIEditor_Tab[3]) GUIEditor_Label[8] = guiCreateLabel(0.0355,0.7586,0.9349,0.0819," Copy Email",true,GUIEditor_Tab[3]) GUIEditor_Edit[3] = guiCreateEdit(0.1953,0.8534,0.6036,0.0819,"[email protected]",true,GUIEditor_Tab[3]) guiSetVisible (GUIEditor_Window[1], false) bindKey ( "F7" , "down" , function() if guiGetVisible ( textWindow ) == false then guiSetVisible ( textWindow , true ) showCursor ( true ) else guiSetVisible ( textWindow , false ) showCursor ( false ) guiSetInputEnabled ( false ) end end) addEventHandler ("onClientGUIClick", root, function( ) if ( source == GUIEditor_Button[1] ) then triggerServerEvent ("skin1", getLocalPlayer()) elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent ("skin2", getLocalPlayer()) end end) Link to comment
Tete omar Posted August 28, 2012 Share Posted August 28, 2012 مافيه أي مشكلة بالكود ---يرحم امك يا نافذه افتحي بزر F7 bindKey ( "F7" , "down" , function() if ( guiGetVisible ( GUIEditor_Window[1] ) == true ) then guiSetVisible ( GUIEditor_Window[1] ,false ) showCursor (false ) guiSetInputEnabled(false) elseif ( guiGetVisible ( GUIEditor_Window[1] ) == false ) then guiSetVisible ( GUIEditor_Window[1] ,true ) showCursor (false ) guiSetInputEnabled(true) playSound("kartha/sss.wav") ----- صوت النافذه end end ) Link to comment
POWR Posted August 28, 2012 Share Posted August 28, 2012 يمكن ما ركب الشخصيات بالملف وما ضافها بالميتا Link to comment
TAPL Posted August 28, 2012 Share Posted August 28, 2012 مافيه أي مشكلة بالكود ---يرحم امك يا نافذه افتحي بزر F7 bindKey ( "F7" , "down" , function() if ( guiGetVisible ( GUIEditor_Window[1] ) == true ) then guiSetVisible ( GUIEditor_Window[1] ,false ) showCursor (false ) guiSetInputEnabled(false) elseif ( guiGetVisible ( GUIEditor_Window[1] ) == false ) then guiSetVisible ( GUIEditor_Window[1] ,true ) showCursor (false ) guiSetInputEnabled(true) playSound("kartha/sss.wav") ----- صوت النافذه end end ) جرب الكود و رد لي خبر Link to comment
Mr-Kartha Posted August 28, 2012 Author Share Posted August 28, 2012 سلطان انا نسخة كلنت اخر شي بس النافذه انا مسويها وش !!! ابي اتعلم ياخي Link to comment
Mbtdaa Posted August 28, 2012 Share Posted August 28, 2012 سلطان انا نسخة كلنت اخر شي بس النافذه انا مسويها وش !!! ابي اتعلم ياخي انا ماقلت شي تعلم بكيفك بس يمكن انك ناسخ شي وناسي شي Link to comment
POWR Posted August 28, 2012 Share Posted August 28, 2012 سلطان انا نسخة كلنت اخر شي بس النافذه انا مسويها وش !!! ابي اتعلم ياخي بس لو تبي تتعلم علم ما تنساه اقرا الوكي Link to comment
|Mr|-Talal07-| Posted August 28, 2012 Share Posted August 28, 2012 على حسب علمي ان setElementModel هي الصح Link to comment
AHMAD1234 Posted August 28, 2012 Share Posted August 28, 2012 اسمع يالطيب خذ ذا الكود احسن واسهل من حق سعد ---client--- GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(312,152,165,339,"skins",false) guiSetVisible(GUIEditor_Window[1],false) GUIEditor_Grid[1] = guiCreateGridList(9,19,147,274,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"skin ID",60) GUIEditor_Button[1] = guiCreateButton(9,296,69,34,"ok",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(86,296,70,34,"close",false,GUIEditor_Window[1]) local skins = {{0},{1},{2},{7},{8},{9},{10},{13},{14},{15},{16},{17},{18},{19},{20},{21},{22},{23},{24},{25},{26},{27},{28},{29},{30},{31},{32},{33},{34}} for i,v in ipairs (skins) do local row = guiGridListAddRow (GUIEditor_Grid[1]) guiGridListSetItemText (GUIEditor_Grid[1], row, 1, v[1], false, true) end function onClientClick (button, state, absoluteX, absoluteYe) if (source == GUIEditor_Button[1]) then if (guiGridListGetSelectedItem (GUIEditor_Grid[1])) then local skin = guiGridListGetItemText (GUIEditor_Grid[1], guiGridListGetSelectedItem (GUIEditor_Grid[1]), 1) triggerServerEvent ("skins", getLocalPlayer(), skin) end end end addEventHandler ("onClientGUIClick", GUIEditor_Button[1], onClientClick) function onClientClick (button, state, absoluteX, absoluteYe) if (source == GUIEditor_Button[2]) then guiSetVisible(GUIEditor_Window[1],false) showCursor(false) end end addEventHandler ("onClientGUIClick", GUIEditor_Button[2], onClientClick) function window() if (guiGetVisible(GUIEditor_Window[1]) == true) then guiSetVisible(GUIEditor_Window[1], false) showCursor(false) else guiSetVisible(GUIEditor_Window[1], true) showCursor(true) end end bindKey("F4","down",window) ---server--- addEvent ("skins", true) addEventHandler ("skins", getRootElement(), function(skin) setPedSkin(source, skin) end ) النافذة تفتح وتقفل بزر اف4 بالعافية Link to comment
3NAD Posted August 28, 2012 Share Posted August 28, 2012 setPedSkin This function is deprecated. This means that its use is discouraged and that it might not exist in future versions, but there should be an alternative (usually more generic) way of performing what it once did. Link to comment
AHMAD1234 Posted August 28, 2012 Share Posted August 28, 2012 setPedSkin This function is deprecated. This means that its use is discouraged and that it might not exist in future versions, but there should be an alternative (usually more generic) way of performing what it once did. lol Did you mean setPlayerSkin Link to comment
3NAD Posted August 28, 2012 Share Posted August 28, 2012 i meant use this =D setElementModel Link to comment
AHMAD1234 Posted August 28, 2012 Share Posted August 28, 2012 i meant use this =D setElementModel lol Yes, there are many ways to reach the same result setPedSkin & setPlayerSkin & setElementModel Link to comment
3NAD Posted August 28, 2012 Share Posted August 28, 2012 شكلكـ مابتفهم إلا بالعربي اقول الويكي مكتوب ان الوظايف ذي مهملة و بعض المرات ماتستجيب فـ أفضل شيء انكـ تستخدم setElementModel Link to comment
AHMAD1234 Posted August 28, 2012 Share Posted August 28, 2012 شكلكـ مابتفهم إلا بالعربياقول الويكي مكتوب ان الوظايف ذي مهملة و بعض المرات ماتستجيب فـ أفضل شيء انكـ تستخدم setElementModel وانا اقلك كل الطرق توصل لنفس النتيجه يالطيب Link to comment
3NAD Posted August 28, 2012 Share Posted August 28, 2012 No problem =] بسس ركز بالويكي Link to comment
AHMAD1234 Posted August 28, 2012 Share Posted August 28, 2012 No problem =]بسس ركز بالويكي يب اوكي 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