Jump to content

ممكن تصححولي


EdeN

Recommended Posts

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

كلنت

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
كلنت
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
كلنت
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
كلنت
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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...