Random Missions
#1

I want to put a random mission how to do. I have this script:

pawn Код:
#define MAX_MISSIONI 1000

enum eMissioni { //Elenco Missioni
    TM, //Terroristi vs Mafia
    Shoting, // Sparatoria
};
new Missione[eMissioni][MAX_PLAYERS];
new RandomMissions[MAX_MISSIONI][2] = {
    TM,
    Shoting,
};
Reply
#2

Wherever you start your missions, you do:

pawn Код:
new iRand = random( sizeof RandomMissions );
RandomMissions[ iRand ];
Or something like that.
Depends on how you construct the code, really.

Btw, [2] should be lenght of the strings. You can really just do [] instead of [2]
Reply
#3

Quote:
Originally Posted by LarzI
Посмотреть сообщение
Wherever you start your missions, you do:

pawn Код:
new iRand = random( sizeof RandomMissions );
RandomMissions[ iRand ];
Or something like that.
Depends on how you construct the code, really.

Btw, [2] should be lenght of the strings. You can really just do [] instead of [2]
can you put a exemple please?
Reply
#4

I'm afraid not.
If you post how to call/start your missions, I could though.
Reply
#5

Quote:
Originally Posted by LarzI
Посмотреть сообщение
I'm afraid not.
If you post how to call/start your missions, I could though.
I want to start a DM Missions, when i start the I would like the server chooses a random Mission
Reply
#6

Like OnGameModeInit?
Reply
#7

Quote:
Originally Posted by LarzI
Посмотреть сообщение
Like OnGameModeInit?
yes, like that
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)