ETMods.net

N!tmod, a Wolfenstein: Enemy Territory Modification!

You are not logged in.

Announcement

You can donate to help us keeping services online.

#1 14-Mar-11 07:08:21

Zelly
Member
Registered: 14-Mar-11
Posts: 1

Re: Need help with array/tables

Ok, Well to start im Ive done quite a bit of Lua, but im still learning.

What im trying to find out is how I can set certain things to other things in an array (or something similar)

Im still new on the array thing but ill try to explain what i have in mind

we got
arrayOne = { }
arrayTwo = {}
arraythree = {arrayone,arraytwo}

arrayOne[1] = Guid
arraytwo[1] = Name


so then i do something like arraythree[1] and it prints GUID, Name

I know this is hard to understand xD but my overall goal is to have a command similar to /players

but different stuff in it (more for admins)
--------------------
| Name | Guid | IP |
Tom      sdajsau 564.54886.54

xD somtin like that

Lol, Possibly even save all this to a file

Offline

#2 14-Mar-11 10:05:44

Perlo0ung
Member
Registered: 31-Jan-11
Posts: 3

Re: Need help with array/tables

Zelly wrote:

Ok, Well to start im Ive done quite a bit of Lua, but im still learning.

What im trying to find out is how I can set certain things to other things in an array (or something similar)

Im still new on the array thing but ill try to explain what i have in mind

we got
arrayOne = { }
arrayTwo = {}
arraythree = {arrayone,arraytwo}

arrayOne[1] = Guid
arraytwo[1] = Name


so then i do something like arraythree[1] and it prints GUID, Name

I know this is hard to understand xD but my overall goal is to have a command similar to /players

but different stuff in it (more for admins)
--------------------
| Name | Guid | IP |
Tom      sdajsau 564.54886.54

xD somtin like that

Lol, Possibly even save all this to a file

well i dont really understand why u need an table for this... maybe explain bit more clear

Offline

#3 14-Mar-11 18:53:18

Sol
Member
Registered: 20-Dec-10
Posts: 10

Re: Need help with array/tables

He want something like that
ingame_players.gif

download: http://www.antman.info/wolf/etpro/downl … ua_2-1.zip
just check advPlayers(playerid) function

Offline

Board footer

Powered by FluxBB