SA-MP Forums Archive
Auto enum creator ? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Auto enum creator ? (/showthread.php?tid=426727)



Auto enum creator ? - Papacool - 30.03.2013

Hello !

I would like to create a big array like this
pawn Код:
enum enumObject { english[32], french[32] }
new objectName[21000][enumObject] = {
/* 0 */ {"CJ SKIN", "SKIN DE CJ"},
/* 1 */ {"OTHER SKIN", "AUTRE SKIN"},
/* 2 */ {"OTHER SKIN", "AUTRE SKIN"},
/* 3 */ {"OTHER SKIN", "AUTRE SKIN"},
....
...
}
Am I forced to create one by one, or there is a programme to create multiple ligne with auto increment ?
" /* %d <- ligne number */ {" ", " "}, "


Thanks for your help


Re: Auto enum creator ? - Pawnie - 30.03.2013

What do you want to make with it?


Re: Auto enum creator ? - MP2 - 30.03.2013

Not sure what you're asking.


Re: Auto enum creator ? - Pawnie - 30.03.2013

I think he is asking if he can make the script automaticly "work" on the enum. For example make the enum for him with all objects or something. Not sure.

Basicaly like the enum putting stuff in on it's own. Placing all object into enum automaticly.


Re: Auto enum creator ? - MP2 - 30.03.2013

I think I now understand what you're asking. You want to add names for every skin, in two different languages; that is apparent.

I assume what you're after is a way to create all the lines with line numbers automatically so you can just go down and fill them in.

Just make a quick script with fwrite() and a loop of 300 (as there's 300 skins, 0-299).