EdeN Posted August 31, 2012 Share Posted August 31, 2012 GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Window[1] = guiCreateWindow(476,119,256,160,"===7MoDy===",false) GUIEditor_TabPanel[1] = guiCreateTabPanel(9,20,238,131,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("Shop-1",GUIEditor_TabPanel[1]) GUIEditor_Button[1] = guiCreateButton(48,17,139,35,"jetpack",false,GUIEditor_Tab[1]) GUIEditor_Button[2] = guiCreateButton(47,58,139,35,"removePedJetPack",false,GUIEditor_Tab[1]) GUIEditor_Tab[2] = guiCreateTab("Aoubt",GUIEditor_TabPanel[1]) GUIEditor_Label[1] = guiCreateLabel(4,10,198,91," 7MoDy",false,GUIEditor_Tab[2]) guiSetFont(GUIEditor_Label[1],"sa-header") function jetPackCommand ( source, key ) if ( doesPedHaveJetPack ( source ) ) then -- if the player has a jetpack removePedJetPack ( GUIEditor_Button[2] ) -- remove it else givePedJetPack ( source ) -- otherwise give him one end end addCommandHandler ( "jetpack", jetPackCommand ) -- Checks whether or not the player has a jetpack, and gives or removes it from the player function consoleJetPack ( thePlayer, commandName ) if not doesPedHaveJetPack ( thePlayer ) then -- if the player doesn't have a jetpack local status = givePedJetPack ( GUIEditor_Button[1] ) -- give him one if not status then outputConsole ( "Failed to give jetpack.", thePlayer ) -- tell him if it failed end else local status = removePedJetPack ( thePlayer ) -- remove his jetpack if ( not status ) then outputConsole ( "Failed to remove jetpack.", thePlayer ) -- tell him if it failed end end end -- add the function above to handle the "jetpack" command addCommandHandler ( "jetpack", consoleJetPack ) ممكن تصححو Link to comment
./BlackBird# Posted August 31, 2012 Share Posted August 31, 2012 ي خي استخدم [xml][/xml] مو [code] [/code] + جايب امثلة من الويكي و تقول صلحولي؟ Link to comment
ABO.SR7777A Posted August 31, 2012 Share Posted August 31, 2012 مثل حالتي هههههههههههههههههههههههههههههههههههههههههههههههه ضض11ض1ض1ض1ض ض2ض2ض2ض2ض2 ض3ض3ض3ضض3 ض4ض4ض4ض4ض ض5ض5ض5ض5ض5 6ض6ض6ض6ض6ض6 Link to comment
EdeN Posted August 31, 2012 Author Share Posted August 31, 2012 ي خي استخدم [xml][/xml] مو [code] [/code] + جايب امثلة من الويكي و تقول صلحولي؟ انا استخدمة والله [code] [/code] Link to comment
Tete omar Posted August 31, 2012 Share Posted August 31, 2012 كلنت GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Window[1] = guiCreateWindow(476,119,256,160,"===7MoDy===",false) GUIEditor_TabPanel[1] = guiCreateTabPanel(9,20,238,131,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("Shop-1",GUIEditor_TabPanel[1]) GUIEditor_Button[1] = guiCreateButton(48,17,139,35,"jetpack",false,GUIEditor_Tab[1]) GUIEditor_Button[2] = guiCreateButton(47,58,139,35,"removePedJetPack",false,GUIEditor_Tab[1]) GUIEditor_Tab[2] = guiCreateTab("Aoubt",GUIEditor_TabPanel[1]) GUIEditor_Label[1] = guiCreateLabel(4,10,198,91," 7MoDy",false,GUIEditor_Tab[2]) guiSetFont(GUIEditor_Label[1],"sa-header") addEventHandler("onClientGUIClick", root, function( ) if ( source == GUIEditor_Button[1] ) then triggerServerEvent("giveJetPack", getLocalPlayer()) removePedJetPack ( GUIEditor_Button[2] ) elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent("removeJetPack", getLocalPlayer()) end end) سيرفر addEvent("giveJetPack", true) addEventHandler("giveJetPack", root, function( ) givePedJetPack( source ) end) addEvent("removeJetPack", true) addEventHandler("removeJetPack", root, function( ) removePedJetPack( source ) end) انا فهمت كودك بالمنطقية , انت تبي زر يشيل النفاثة , وزر يحط النفاثة صح ؟ Link to comment
Tete omar Posted August 31, 2012 Share Posted August 31, 2012 شيل سطر 19 يا ===7MoDy=== Link to comment
EdeN Posted August 31, 2012 Author Share Posted August 31, 2012 كلنت GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Window[1] = guiCreateWindow(476,119,256,160,"===7MoDy===",false) GUIEditor_TabPanel[1] = guiCreateTabPanel(9,20,238,131,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("Shop-1",GUIEditor_TabPanel[1]) GUIEditor_Button[1] = guiCreateButton(48,17,139,35,"jetpack",false,GUIEditor_Tab[1]) GUIEditor_Button[2] = guiCreateButton(47,58,139,35,"removePedJetPack",false,GUIEditor_Tab[1]) GUIEditor_Tab[2] = guiCreateTab("Aoubt",GUIEditor_TabPanel[1]) GUIEditor_Label[1] = guiCreateLabel(4,10,198,91," 7MoDy",false,GUIEditor_Tab[2]) guiSetFont(GUIEditor_Label[1],"sa-header") addEventHandler("onClientGUIClick", root, function( ) if ( source == GUIEditor_Button[1] ) then triggerServerEvent("giveJetPack", getLocalPlayer()) removePedJetPack ( GUIEditor_Button[2] ) elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent("removeJetPack", getLocalPlayer()) end end) سيرفر addEvent("giveJetPack", true) addEventHandler("giveJetPack", root, function( ) givePedJetPack( source ) end) addEvent("removeJetPack", true) addEventHandler("removeJetPack", root, function( ) removePedJetPack( source ) end) انا فهمت كودك بالمنطقية , انت تبي زر يشيل النفاثة , وزر يحط النفاثة صح ؟ يب هذا الي ابيه مشكوووووووور Link to comment
Tete omar Posted August 31, 2012 Share Posted August 31, 2012 كلنت GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Window[1] = guiCreateWindow(476,119,256,160,"===7MoDy===",false) GUIEditor_TabPanel[1] = guiCreateTabPanel(9,20,238,131,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("Shop-1",GUIEditor_TabPanel[1]) GUIEditor_Button[1] = guiCreateButton(48,17,139,35,"jetpack",false,GUIEditor_Tab[1]) GUIEditor_Button[2] = guiCreateButton(47,58,139,35,"removePedJetPack",false,GUIEditor_Tab[1]) GUIEditor_Tab[2] = guiCreateTab("Aoubt",GUIEditor_TabPanel[1]) GUIEditor_Label[1] = guiCreateLabel(4,10,198,91," 7MoDy",false,GUIEditor_Tab[2]) guiSetFont(GUIEditor_Label[1],"sa-header") addEventHandler("onClientGUIClick", root, function( ) if ( source == GUIEditor_Button[1] ) then triggerServerEvent("giveJetPack", getLocalPlayer()) removePedJetPack ( GUIEditor_Button[2] ) elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent("removeJetPack", getLocalPlayer()) end end) سيرفر addEvent("giveJetPack", true) addEventHandler("giveJetPack", root, function( ) givePedJetPack( source ) end) addEvent("removeJetPack", true) addEventHandler("removeJetPack", root, function( ) removePedJetPack( source ) end) انا فهمت كودك بالمنطقية , انت تبي زر يشيل النفاثة , وزر يحط النفاثة صح ؟ يب هذا الي ابيه مشكوووووووور العفو بس قبل ما ستعمله شيل سطر 19 Link to comment
EdeN Posted August 31, 2012 Author Share Posted August 31, 2012 كلنت GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Window[1] = guiCreateWindow(476,119,256,160,"===7MoDy===",false) GUIEditor_TabPanel[1] = guiCreateTabPanel(9,20,238,131,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("Shop-1",GUIEditor_TabPanel[1]) GUIEditor_Button[1] = guiCreateButton(48,17,139,35,"jetpack",false,GUIEditor_Tab[1]) GUIEditor_Button[2] = guiCreateButton(47,58,139,35,"removePedJetPack",false,GUIEditor_Tab[1]) GUIEditor_Tab[2] = guiCreateTab("Aoubt",GUIEditor_TabPanel[1]) GUIEditor_Label[1] = guiCreateLabel(4,10,198,91," 7MoDy",false,GUIEditor_Tab[2]) guiSetFont(GUIEditor_Label[1],"sa-header") addEventHandler("onClientGUIClick", root, function( ) if ( source == GUIEditor_Button[1] ) then triggerServerEvent("giveJetPack", getLocalPlayer()) removePedJetPack ( GUIEditor_Button[2] ) elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent("removeJetPack", getLocalPlayer()) end end) سيرفر addEvent("giveJetPack", true) addEventHandler("giveJetPack", root, function( ) givePedJetPack( source ) end) addEvent("removeJetPack", true) addEventHandler("removeJetPack", root, function( ) removePedJetPack( source ) end) انا فهمت كودك بالمنطقية , انت تبي زر يشيل النفاثة , وزر يحط النفاثة صح ؟ يب هذا الي ابيه مشكوووووووور العفو بس قبل ما ستعمله شيل سطر 19 طيب Link to comment
EdeN Posted August 31, 2012 Author Share Posted August 31, 2012 سوويت الي قتلي وماشتغل المود ؟ Link to comment
abu5lf Posted August 31, 2012 Share Posted August 31, 2012 Client-side GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Window[1] = guiCreateWindow(476,119,256,160,"===7MoDy===",false) GUIEditor_TabPanel[1] = guiCreateTabPanel(9,20,238,131,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("Shop-1",GUIEditor_TabPanel[1]) GUIEditor_Button[1] = guiCreateButton(48,17,139,35,"jetpack \ removePedJetPack ",false,GUIEditor_Tab[1]) --GUIEditor_Button[2] = guiCreateButton(47,58,139,35,"removePedJetPack",false,GUIEditor_Tab[1]) GUIEditor_Tab[2] = guiCreateTab("Aoubt",GUIEditor_TabPanel[1]) GUIEditor_Label[1] = guiCreateLabel(4,10,198,91," 7MoDy",false,GUIEditor_Tab[2]) guiSetFont(GUIEditor_Label[1],"sa-header") addEventHandler( 'onClientGUIClick', root, function( ) if ( source == GUIEditor_Button[1] ) then triggerServerEvent ( 'JetPack', getLocalPlayer()) end end ) Server-side addEvent ( 'JetPack', true ) addEventHandler ( 'JetPack', root, function ( ) if ( not doesPedHaveJetPack ( source ) ) then givePedJetPack( source ) else removePedJetPack( source ) end end ) <meta> <script src="client.lua" type="client"/> <script src="server.lua" type="server"/> </meta> 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