#1

How do I create a enum like this:
pawn Код:
enum numbers
{
55,66,77
};
So that way when I refer to a command I can do if(numbers) something like that.
Reply
#2

Just create a regular array? I don't quite understand what you want to do.
Reply
#3

I've seen it done with coordinates, where they put like 10 coordinates and they refer back to it using a enum of some sort, how do I do that?
Reply
#4

Quote:
Originally Posted by Mento
Посмотреть сообщение
I've seen it done with coordinates, where they put like 10 coordinates and they refer back to it using a enum of some sort, how do I do that?
You mean something like this?:-

pawn Код:
enum PLAYER_DATA
{
    iLogged,
    iAdminLevel,
    iVip,
    bIsRegged,
    iPocketCash,
    iKills,
    iDeaths
}

new gPlayerData[MAX_PLAYERS][PLAYER_DATA];
To learn more about enumerators you can click the following link:-


https://sampwiki.blast.hk/wiki/Keywords:Initialisers#enum
-FalconX
Reply
#5

I figured out I was mistaken I meant this:
pawn Код:
new Pos[2][3] = {
{15,15,15},
{105,15,35}
};
Reply
#6

new Float:Pos[2].....
Reply
#7

Right, but I wasn't using floats at the time, but you're right as I will probably use more advanced coordinates later on. Also for this thing, does it use a lot of memory, and should I avoid it? Or is it fine if I use it a lot in my script?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)