How to make MAX_'SOMETHING'
#1

Hi,

As the title is, I would like to make something same as MAX_PLAYERS which has IDs(ie.: 'playerid').
For like MAX_ITEMS and I would like to use that as 'itemid'.

Thank you in advance!!!
Reply
#2

just define them on the top of the script like
PHP код:
#define MAX_ITEMS//something 
((please rep if I helped.))
Reply
#3

Quote:
Originally Posted by TaLhA XIV
Посмотреть сообщение
just define them on the top of the script like
PHP код:
#define MAX_ITEMS//something 
((please rep if I helped.))
Stop reputation whoring, god damn!
Reply
#4

Hmm, well I knew it but it is not what I wanted.

I still cannoted use it as itemid, right or I can?
Reply
#5

Depends on how you use it your MAX_ITEMS define, it's just a command to the pre compiler so the former gets replaced with the latter during compiling* (MAX_ITEMS will be replaced with whatever you put to the right 'MAX_ITEMS 50' will replace MAX_ITEMS with 50 everywhere in your script).

If you use it to define an array it'll make the array 50 slots big, that's all it does really, just simplifying your needs.

*Or actually just before it starts compiling, pre check.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)