SAM!! Posted October 2, 2016 Share Posted October 2, 2016 ياريت تصلحوة لي لان المود يشتغل بس edit وكل ال label لا تظهر وابي اسوي زر يغلق النافذة وشكرا لكم local resX, resY = guiGetScreenSize() function makeAnimationGUI() animationWindow = guiCreateWindow(445, 87, 355, 513, "Animation System|V.2|By Mazzika", false) guiSetVisible(animationWindow,false) guiSetAlpha(animationWindow, 0.87) animationCategoryList = guiCreateGridList(10, 23, 158, 356,false,animationWindow) animationList = guiCreateGridList(187, 23, 158, 356,false,animationWindow) column1 = guiGridListAddColumn(animationCategoryList,"Category",0.8) column2 = guiGridListAddColumn(animationList,"Animation",0.8) stopButton = guiCreateButton(97, 405, 158, 38, "Stop Animation", false, animationWindow) guiSetFont(stopButton, "default-bold-small") guiSetProperty(stopButton, "NormalTextColour", "FF4DFF00") addEventHandler("onClientGUIClick",stopButton,function() setPedAnimation(getLocalPlayer(),nil,nil) end) for k, v in ipairs (getElementsByType("animationCategory")) do local row = guiGridListAddRow(animationCategoryList) guiGridListSetItemText(animationCategoryList,row,column1,getElementID(v),false,false) GUIEditor.edit[1] = guiCreateEdit(9, 474, 78, 29, "Version 1.2 !!", false, animationWindow) guiSetProperty(GUIEditor.edit[1], "NormalTextColour", "FF0013D5") guiEditSetReadOnly(GUIEditor.edit[1], true) GUIEditor.label[2] = guiCreateLabel(83, 449, 192, 15, "املأ لحظات الأنتظار بكثرة الأستغفارّّ", false, animationWindow) guiSetFont(GUIEditor.label[2], "default-bold-small") guiLabelSetColor(GUIEditor.label[2], 211, 184, 0) GUIEditor.label[3] = guiCreateLabel(143, 487, 202, 16, "سبحان اللهّ وبحمدة سبحان اللهّ العظيم", false, animationWindow) guiSetFont(GUIEditor.label[3], "default-bold-small") guiLabelSetColor(GUIEditor.label[3], 0, 203, 210) GUIEditor.label[4] = guiCreateLabel(97, 384, 158, 17, "نظام الحركات الأصدار الأول!!", false, animationWindow) guiSetFont(GUIEditor.label[4], "default-bold-small") guiLabelSetColor(GUIEditor.label[4], 238, 0, 253) end addEventHandler("onClientGUIClick",animationCategoryList,getAnimations) addEventHandler("onClientGUIClick",animationList,setAnimation) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),makeAnimationGUI) function toggleVisible() if (guiGetVisible(animationWindow) == false) then guiSetVisible(animationWindow,true) showCursor(true) else guiSetVisible(animationWindow,false) showCursor(false) end end bindKey("F2","down",toggleVisible) function getAnimations() selectedCategory = guiGridListGetItemText(animationCategoryList,guiGridListGetSelectedItem(animationCategoryList),1) if (selectedCategory ~= "") then guiGridListClear(animationList) for k, v in ipairs (getElementChildren(getElementByID(selectedCategory))) do local row = guiGridListAddRow(animationList) guiGridListSetItemText(animationList,row,column1,getElementID(v),false,false) end end if (selectedCategory == "") then guiGridListClear(animationList) end end function setAnimation() selectedAnimation = guiGridListGetItemText(animationList,guiGridListGetSelectedItem(animationList),1) if (selectedAnimation ~= "") then if (not isPlayerDead(getLocalPlayer())) then if (isPedInVehicle(getLocalPlayer()) == false) then local animationBlock = getElementData(getElementByID(selectedAnimation),"block") local animationID = getElementData(getElementByID(selectedAnimation),"code") triggerServerEvent("setAnimation",getLocalPlayer(),animationBlock,animationID) else outputChatBox("You cannot use animations while in a vehicle.",255,0,0) end else outputChatBox("You cannot use animations while you are dead.",255,0,0) end end end Link to comment
</Mr.Tn6eL> Posted October 3, 2016 Share Posted October 3, 2016 local resX, resY = guiGetScreenSize() function makeAnimationGUI() animationWindow = guiCreateWindow(445, 87, 355, 513, "Animation System|V.2|By Mazzika", false) guiSetVisible(animationWindow,false) guiSetAlpha(animationWindow, 0.87) animationCategoryList = guiCreateGridList(10, 23, 158, 356,false,animationWindow) animationList = guiCreateGridList(187, 23, 158, 356,false,animationWindow) column1 = guiGridListAddColumn(animationCategoryList,"Category",0.8) column2 = guiGridListAddColumn(animationList,"Animation",0.8) stopButton = guiCreateButton(97, 405, 158, 38, "Stop Animation", false, animationWindow) guiSetFont(stopButton, "default-bold-small") guiSetProperty(stopButton, "NormalTextColour", "FF4DFF00") addEventHandler("onClientGUIClick",stopButton,function() setPedAnimation(getLocalPlayer(),nil,nil) end) for k, v in ipairs (getElementsByType("animationCategory")) do local row = guiGridListAddRow(animationCategoryList) guiGridListSetItemText(animationCategoryList,row,column1,getElementID(v),false,false) end GUIEditor.edit[1] = guiCreateEdit(9, 474, 78, 29, "Version 1.2 !!", false, animationWindow) guiSetProperty(GUIEditor.edit[1], "NormalTextColour", "FF0013D5") guiEditSetReadOnly(GUIEditor.edit[1], true) GUIEditor.label[2] = guiCreateLabel(83, 449, 192, 15, "املأ لحظات الأنتظار بكثرة الأستغفارّّ", false, animationWindow) guiSetFont(GUIEditor.label[2], "default-bold-small") guiLabelSetColor(GUIEditor.label[2], 211, 184, 0) GUIEditor.label[3] = guiCreateLabel(143, 487, 202, 16, "سبحان اللهّ وبحمدة سبحان اللهّ العظيم", false, animationWindow) guiSetFont(GUIEditor.label[3], "default-bold-small") guiLabelSetColor(GUIEditor.label[3], 0, 203, 210) GUIEditor.label[4] = guiCreateLabel(97, 384, 158, 17, "نظام الحركات الأصدار الأول!!", false, animationWindow) guiSetFont(GUIEditor.label[4], "default-bold-small") guiLabelSetColor(GUIEditor.label[4], 238, 0, 253) addEventHandler("onClientGUIClick",animationCategoryList,getAnimations) addEventHandler("onClientGUIClick",animationList,setAnimation) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),makeAnimationGUI) function toggleVisible() if (guiGetVisible(animationWindow) == false) then guiSetVisible(animationWindow,true) showCursor(true) else guiSetVisible(animationWindow,false) showCursor(false) end end bindKey("F2","down",toggleVisible) function getAnimations() selectedCategory = guiGridListGetItemText(animationCategoryList,guiGridListGetSelectedItem(animationCategoryList),1) if (selectedCategory ~= "") then guiGridListClear(animationList) for k, v in ipairs (getElementChildren(getElementByID(selectedCategory))) do local row = guiGridListAddRow(animationList) guiGridListSetItemText(animationList,row,column1,getElementID(v),false,false) end end if (selectedCategory == "") then guiGridListClear(animationList) end end function setAnimation() selectedAnimation = guiGridListGetItemText(animationList,guiGridListGetSelectedItem(animationList),1) if (selectedAnimation ~= "") then if (not isPlayerDead(getLocalPlayer())) then if (isPedInVehicle(getLocalPlayer()) == false) then local animationBlock = getElementData(getElementByID(selectedAnimation),"block") local animationID = getElementData(getElementByID(selectedAnimation),"code") triggerServerEvent("setAnimation",getLocalPlayer(),animationBlock,animationID) else outputChatBox("You cannot use animations while in a vehicle.",255,0,0) end else outputChatBox("You cannot use animations while you are dead.",255,0,0) end end end Link to comment
iPrestege Posted October 3, 2016 Share Posted October 3, 2016 بالنسبة لليبل والايديت مايطلعون ماشوف جدولهم في الكود ضيف الجدول وبيطلعون في اللوحة . 1 Link to comment
SAM!! Posted October 7, 2016 Author Share Posted October 7, 2016 </Mr.Tn6eL> كفو يالغالي ماقصرت يالذيب 1 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