26.02.2009, 14:06
Ok so what i want is that i make a random number between 1 and 5 with my own function
rand(1, 5) --- duh
Then we have an array here:
Then if it outputs 5 or any other number, select that string from the array.
Like if rand(1, 5) outputs 2, then send the player a message with the name John in it.
If it outputs 3, send the player a message with the name Katey in it.
Can somebody explain me how?
Thanks!
rand(1, 5) --- duh
Then we have an array here:
pawn Code:
new Names[] = {"Michael", "John", "Katey", "Richard", "Robbin"};
Like if rand(1, 5) outputs 2, then send the player a message with the name John in it.
If it outputs 3, send the player a message with the name Katey in it.
Can somebody explain me how?
Thanks!