Jump to content

Make My Code , Short


Max+

Recommended Posts

Posted

Hello , i made a gameMode , it has a lot of buttons , labels , dxdraw

What iam Asking about is , can i make a tabel , to improt them and loop the table and it will automaticly make the buttons and labels and dxdraw ,

same thing with events

can i make a table have like 3 events , and each event will do something ,

because my gameMode has like 120 lines of codes ,

- New , Kill System

- New, GameMode Intro

- Leve / Exp System

- New nametag showing style

- New , Hud For Players

- Skin Selection from SA-MP

- Money System / Buy Weapons

- Drop Weapons

- New, Flood System

- New , Group Assign

- Gun license For Weapons

- Random Rule System For Money

Posted

i dont know about sql and i dont want to use it at all ,

i want like i posted above tables, if you know about tabel please show me ,

- New , Kill System

- New, GameMode Intro

- Leve / Exp System

- New nametag showing style

- New , Hud For Players

- Skin Selection from SA-MP

- Money System / Buy Weapons

- Drop Weapons

- New, Flood System

- New , Group Assign

- Gun license For Weapons

- Random Rule System For Money

Posted

Can i get Some Help Please ?

- New , Kill System

- New, GameMode Intro

- Leve / Exp System

- New nametag showing style

- New , Hud For Players

- Skin Selection from SA-MP

- Money System / Buy Weapons

- Drop Weapons

- New, Flood System

- New , Group Assign

- Gun license For Weapons

- Random Rule System For Money

Posted

Google "lua tables" and "lua for loop". Read about how they work, and then try it yourself. There's no better way of learning than by trial and error.

If I help you in a thread and you need further assistance, please don't PM me - use the thread you created instead. This way everyone on the forum can take advantage of it.

Posted

ex :

local table = {  
  labels = { 100, 100, 100, 100, 200, 200, 200, 200 }, 
  buttons = { 300, 300, 300, 300, 500, 500, 500, 500 }, 
  ["onClientResourceStart"] = { function1, function2 }, 
} 
  
CreateLabels = guiCreateLabel( table[1][1], table[1][2], table[1][3], table[1][4] ) 
for i = 1, #table["onClientResourceStart"] do 
    addEventHandler( "onClientResourceStart", resourceRoot, table["onClientResourceStart"][i] ) 
end 

To Contact Me at Skype : [email protected]

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...