#Mr.Pop Posted June 10, 2017 Share Posted June 10, 2017 (edited) addEventHandler("onClientGUIClick",resourceRoot, function () if ( guiGridListGetSelectedItem (Gr_Player ) ~= -1 ) then local Bt_Ok = guiGridListGetItemText ( Gr_Player , guiGridListGetSelectedItem ( Gr_Player ) , -1 ) setElementPosition(source,150.49068, -47.33965, 12.16697) end end) -----------Slab addEventHandler("onClientGUIClick",resourceRoot, function () local Slap = guiGridListGetItemText(Gr_Player,guiGridListGetSelectedItem(Gr_Player),1) if Slap ~= -1 and Slap ~= false and Slap ~= nil then local Slap = getPlayerFromName(Slap) triggerServerEvent("Slap",localPlayer) end end) لم اضغط اي زر في لوحة يموت لان عامل فكشن حق زر سلاب لكن هو يموت في كل الازرا Edited June 10, 2017 by mr.pop Link to comment
#Mr.Pop Posted June 10, 2017 Author Share Posted June 10, 2017 لوحة مثل حق الادمن لكن فيه بوتن سجن Link to comment
AE. Posted June 10, 2017 Share Posted June 10, 2017 (edited) لازم تحقق ان البوتن هو اللي انداس عليه مو اي بوتن ! addEventHandler("onClientGUIClick",resourceRoot, function () if source == Bt_Ok then local Slap = guiGridListGetItemText(Gr_Player,guiGridListGetSelectedItem(Gr_Player),1) if Slap ~= -1 and Slap ~= false and Slap ~= nil then local Slap = getPlayerFromName(Slap) triggerServerEvent("Slap",localPlayer) end end end) Edited June 10, 2017 by 3laa33 Link to comment
#Mr.Pop Posted June 10, 2017 Author Share Posted June 10, 2017 (edited) 8 hours ago, 3laa33 said: لازم تحقق ان البوتن هو اللي انداس عليه مو اي بوتن ! addEventHandler("onClientGUIClick",resourceRoot, function () if source == Bt_Ok then local Slap = guiGridListGetItemText(Gr_Player,guiGridListGetSelectedItem(Gr_Player),1) if Slap ~= -1 and Slap ~= false and Slap ~= nil then local Slap = getPlayerFromName(Slap) triggerServerEvent("Slap",localPlayer) end end end) منجحت جربتها من قبل كنت ناسي then اه نجح خلاص فهمتك والفكشن الاول ؟ حق الانتقال خلاص مشكورين شباب حلت المشكل اسف اذا اتعبتكم مساعدة انا الحين سويت الانتقال ابي لم يكتب في الخانة المدة و السبب هاهي لوحة Gui Pl_Ad_2 = guiCreateWindow(921, 34, 325, 448, "Jail", false) guiWindowSetSizable(Pl_Ad_2, false) guiSetProperty(Pl_Ad_2, "CaptionColour", "FFDD4800") guiGetVisible(Pl_Ad_2,false) Lb_Reason = guiCreateLabel(10, 23, 86, 19, "~~~ Reason :", false, Pl_Ad_2) guiLabelSetColor(Lb_Reason, 253, 1, 66) Mo_Reason = guiCreateMemo(9, 52, 306, 35, "", false, Pl_Ad_2) Cb_Time = guiCreateComboBox(15, 114, 301, 165, "30 Min", false, Pl_Ad_2) guiComboBoxAddItem(Cb_Time, "1 Min") guiComboBoxAddItem(Cb_Time, "5 Min") guiComboBoxAddItem(Cb_Time, "10 Min") guiComboBoxAddItem(Cb_Time, "15 Min") guiComboBoxAddItem(Cb_Time, "30 Min") guiComboBoxAddItem(Cb_Time, "45 Min") guiComboBoxAddItem(Cb_Time, "60 Min") guiComboBoxAddItem(Cb_Time, "1,5 H") guiComboBoxAddItem(Cb_Time, "2 H") guiSetVisible(Pl_Ad_2,false) Lb_Time = guiCreateLabel(17, 92, 239, 17, "~~~ Time : ", false, Pl_Ad_2) guiLabelSetColor(Lb_Time, 240, 13, 13) Bt_Ok = guiCreateButton(19, 284, 287, 40, "~~~|> Ok <|~~~", false, Pl_Ad_2) guiSetProperty(Bt_Ok, "NormalTextColour", "FF3542E5") Bt_Exit_2 = guiCreateButton(19, 361, 287, 40, "~~~|> Exit <|~~~", false, Pl_Ad_2) guiSetProperty(Bt_Exit_2, "NormalTextColour", "FF727272") end ) و Function Client addEventHandler("onClientGUIClick",resourceRoot, function () if source == Bt_Ok then if ( guiGridListGetSelectedItem (Gr_Player ) ~= -1 ) then local Bt_Ok = guiGridListGetItemText ( Gr_Player , guiGridListGetSelectedItem ( Gr_Player ) , 1 ) triggerServerEvent("Jail",localPlayer) end end end) Function Server addEvent("Jail",true) addEventHandler("Jail",root, function () setElementPosition(source,193.89998 ,161.28836 ,1003.00000) setElementInterior(source,3) end) This Function & Gui Edited June 10, 2017 by mr.pop Link to comment
AE. Posted June 10, 2017 Share Posted June 10, 2017 guiSetText(thelabel,"~~~ Time : "..yourtime) --ملحوظة بدل المتغيرات بالمتغيرات حقتك اللي هما --your time + thelabel + ملاحظة اخري حط الكود لما يضغط الزر او الاعب يروح السجن او مدري شف بتحطها فين + اصلا انت وين التايمر الي انت مسويه عشان يخرج من السجن؟ Link to comment
#Mr.Pop Posted June 10, 2017 Author Share Posted June 10, 2017 كيف اسوي تايم الوقت الوقت من هون guiComboBoxAddItem(Cb_Time, "1 Min") كل الاكودا كلينت ------------------------------Gui_1-- addEventHandler("onClientResourceStart", resourceRoot, function() Pl_Ad = guiCreateWindow(321, 29, 600, 454, "Panel_Admin", false) guiWindowSetSizable(Pl_Ad, false) guiGetVisible(Pl_Ad,false) Gr_Player = guiCreateGridList(9, 22, 279, 423, false, Pl_Ad) guiSetVisible (Pl_Ad,false) guiGridListAddColumn(Gr_Player, "Players", 0.5) guiGridListAddColumn(Gr_Player, "Jail", 0.2) guiGridListAddColumn(Gr_Player, "Time", 0.2) guiGridListAddColumn(Gr_Player, "Reason", 0.2) Jail = guiCreateButton(306, 38, 249, 56, "Jail", false, Pl_Ad) guiSetFont(Jail, "default-bold-small") guiSetProperty(Jail, "NormalTextColour", "FFFF0000") UnJail = guiCreateButton(306, 108, 249, 56, "UnJail", false, Pl_Ad) guiSetFont(UnJail, "default-bold-small") guiSetProperty(UnJail, "NormalTextColour", "FF4DFF00") Kick = guiCreateButton(306, 179, 249, 56, "Kick", false, Pl_Ad) guiSetFont(Kick, "default-bold-small") guiSetProperty(Kick, "NormalTextColour", "FF7C1350") Slap = guiCreateButton(306, 249, 249, 56, "Slap", false, Pl_Ad) guiSetFont(Slap, "default-bold-small") guiSetProperty(Slap, "NormalTextColour", "FF000A8E") OADJ = guiCreateButton(306, 325, 249, 56, "OpenAllDoorJail", false, Pl_Ad) guiSetFont(OADJ, "default-bold-small") guiSetProperty(OADJ, "NormalTextColour", "FF8E7100") Exit = guiCreateButton(359, 392, 152, 52, "Exit ", false, Pl_Ad) -----------Gui_2--- Pl_Ad_2 = guiCreateWindow(921, 34, 325, 448, "Jail", false) guiWindowSetSizable(Pl_Ad_2, false) guiSetProperty(Pl_Ad_2, "CaptionColour", "FFDD4800") guiGetVisible(Pl_Ad_2,false) Lb_Reason = guiCreateLabel(10, 23, 86, 19, "~~~ Reason :", false, Pl_Ad_2) guiLabelSetColor(Lb_Reason, 253, 1, 66) Mo_Reason = guiCreateMemo(9, 52, 306, 35, "", false, Pl_Ad_2) Cb_Time = guiCreateComboBox(15, 114, 301, 165, "30 Min", false, Pl_Ad_2) guiComboBoxAddItem(Cb_Time, "1 Min") guiComboBoxAddItem(Cb_Time, "5 Min") guiComboBoxAddItem(Cb_Time, "10 Min") guiComboBoxAddItem(Cb_Time, "15 Min") guiComboBoxAddItem(Cb_Time, "30 Min") guiComboBoxAddItem(Cb_Time, "45 Min") guiComboBoxAddItem(Cb_Time, "60 Min") guiComboBoxAddItem(Cb_Time, "1,5 H") guiComboBoxAddItem(Cb_Time, "2 H") guiSetVisible(Pl_Ad_2,false) Lb_Time = guiCreateLabel(17, 92, 239, 17, "~~~ Time : ", false, Pl_Ad_2) guiLabelSetColor(Lb_Time, 240, 13, 13) Bt_Ok = guiCreateButton(19, 284, 287, 40, "~~~|> Ok <|~~~", false, Pl_Ad_2) guiSetProperty(Bt_Ok, "NormalTextColour", "FF3542E5") Bt_Exit_2 = guiCreateButton(19, 361, 287, 40, "~~~|> Exit <|~~~", false, Pl_Ad_2) guiSetProperty(Bt_Exit_2, "NormalTextColour", "FF727272") end ) ----- Function -------------------------------------------------- bindKey("O", "down",function() guiSetVisible(Pl_Ad, not guiGetVisible (Pl_Ad) ) showCursor ( guiGetVisible (Pl_Ad) ) putPlayers() end) ----------------------GridList_Player-------------------- function putPlayers() guiGridListClear(Gr_Player) for i,player in ipairs(getElementsByType("player")) do local row = guiGridListAddRow(Gr_Player) guiGridListSetItemText(Gr_Player,row,1,getPlayerName(player),false,false) guiGridListGetSelectedItem(Gr_Player) if ( source == Gr_Player )then guiGridListSetItemColor(Gr_Player,row, 1, 0, 255, 0) end end end ------------------------------Exit---------- addEventHandler("onClientGUIClick",root, function () if source == Exit then guiSetVisible(Pl_Ad,false) showCursor(false) guiSetVisible(Pl_Ad_2,false) end end ) ----------------------------------Jail----- addEventHandler("onClientGUIClick",root, function () if source == Jail then guiSetVisible(Pl_Ad_2,true) showCursor(true) end end ) ---------------------------------Bt_Exit_2------ addEventHandler("onClientGUIClick",root, function () if source == Bt_Exit_2 then guiSetVisible(Pl_Ad_2,false) showCursor(true) end end ) --------------------------------------------------------- addEventHandler("onClientGUIClick",resourceRoot, function () if source == Bt_Ok then if ( guiGridListGetSelectedItem (Gr_Player ) ~= -1 ) then local Bt_Ok = guiGridListGetItemText ( Gr_Player , guiGridListGetSelectedItem ( Gr_Player ) , 1 ) triggerServerEvent("Jail",localPlayer) end end end) addEventHandler("onClientGUIClick",resourceRoot, function () if source == UnJail then if ( guiGridListGetSelectedItem (Gr_Player ) ~= -1 ) then local UnJail = guiGridListGetItemText ( Gr_Player , guiGridListGetSelectedItem ( Gr_Player ) , 1 ) triggerServerEvent("UnJail",localPlayer) end end end) addEventHandler("onClientGUIClick",resourceRoot, function () if source == Slap then local Slap = guiGridListGetItemText(Gr_Player,guiGridListGetSelectedItem(Gr_Player),1) if Slap ~= -1 and Slap ~= false and Slap ~= nil then local Slap = getPlayerFromName(Slap) triggerServerEvent("Slap",localPlayer) end end end) addEventHandler("onClientGUIClick",resourceRoot, function () if source == Kick then if ( guiGridListGetSelectedItem (Gr_Player ) ~= -1 ) then local Kick = guiGridListGetItemText ( Gr_Player , guiGridListGetSelectedItem ( Gr_Player ) , 1 ) triggerServerEvent("Kick",localPlayer) end end end) سيرفر local Object = createObject(8661,182.19999694824,155.10000610352,1002) local Object2 = createObject(3095,195.80000305176,164,1006.200012207,0,90,90) local Object3 = createObject(3095,195.60000610352,164.80000305176,1006.200012207,0,90,0) local Object1 = createObject(3095,191.39999389648,164.80000305176,1006.200012207,0,90,0) setElementInterior(Object,3) setElementInterior(Object2,3) setElementInterior(Object3,3) setElementInterior(Object1,3) addCommandHandler("Console", function(player) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("Console")) then triggerClientEvent(player, "OpenAdminManager", player) end end) addEvent("Slap",true) addEventHandler("Slap",root, function () killPed(source) end) addEvent("Jail",true) addEventHandler("Jail",root, function () setElementPosition(source,193.89998 ,161.28836 ,1003.00000) setElementInterior(source,3) end) addEvent("UnJail",true) addEventHandler("UnJail",root, function () setElementPosition(source,1522.00610, -1701.17517, 13.54688) setElementInterior(source,0) end) addEvent("Kick",true) addEventHandler("Kick",root, function () kickPlayer ( source, "Kick By Console" ) end) اعطوني للفكشن بس اجرب الوو ؟ هيك ؟ guiComboBoxSetSelected 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