Question about [MAX_PLAYERS]
#1

i have this:

pawn Код:
new car[MAX_PLAYERS];
can i assign it to a word rather than an interger?

pawn Код:
car[playerid] = STOLEN;
Can it be done without defining stolen?
Reply
#2

Use bool: true when it's stolen false when not.
Reply
#3

thats sort of the same as using 1 for stolen and 0 for not. I want to use words like STOLEN or RESPAWNED without defining them.

Is this possible? If it sn't, just say "Impossible"
Reply
#4

Instead of this:
pawn Код:
#define STOLEN (1)
#define RESPAWNED (2)

car[playerid] = STOLEN;
car[playerid] = RESPAWNED;
Use this:
pawn Код:
car[playerid] = 1;
car[playerid] = 2;
Is this what you want? Or do you want to put the words in it like:
pawn Код:
new
    myString[MAX_PLAYERS][8];
myString[playerid] = "stolen";
or like:
pawn Код:
format(myString[playerid], sizeof(myString), "stolen");
Reply
#5

I want to do this:

pawn Код:
car[playerid] = STOLEN;
car[playerid] = RESPAWNED;
but without this:

pawn Код:
#define STOLEN (1)
#define RESPAWNED (2)
is it possible?
Reply
#6

Quote:
Originally Posted by Don Correlli
Use this:
pawn Код:
car[playerid] = 1;
car[playerid] = 2;
Reply
#7

Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by Don Correlli
Use this:
pawn Код:
car[playerid] = 1;
car[playerid] = 2;
but i wanna use words instead of numbers
Reply
#8

I don't really understand what you want.
Reply
#9

sorry

i mean like this:

pawn Код:
car[playerid] = STOLEN;
but i don't want to define stolen... Is this possible?
Reply
#10

Make it hold the word "STOLEN"?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)