05.02.2016, 15:22
Define a rand local variable for max_players, assign the rand variable to the random function so it should look like this;
You have to use these functions under OnPlayerConnect for the codes to work as you want them to work.
PHP код:
new rand[MAX_PLAYERS];
rand[playerid] = random(2); // Bear in mind the fact that you can only script 3 dialogs with this. One being '0', the other being '1', the other being '2'
if(rand[playerid] == 0) { // if the randomized number is 0 then
// showplayerdialog here
}
if(rand[playerid] == 1) { // same as above
//showplayerdialog here
}
if(rand[playerid] == 2) { // same as above
//showplayerdialog here
}