Random() function
#1

Is it in anyway possible to loop numbers 1, 3 and 6 without having to loop the numbers 2, 4 and 5?

Random only sets the MAX so... its not good using that
Reply
#2

Here
You can create something like this On Player Spawn in random
But put the numbers 1,3,5, etc
Reply
#3

Hello!

Do you mean it so?
PHP код:
for(new i;i<6;i++)
{
    if(
== || == || == 5)continue;
    
// i == 1, i == 3, i == 6

Reply
#4

Quote:
Originally Posted by arlindi
Посмотреть сообщение
Here
You can create something like this On Player Spawn in random
But put the numbers 1,3,5, etc
Hmm something like
Код HTML:
Random(1, 3, 5);
Will Work


Quote:
Originally Posted by Mencent
Посмотреть сообщение
Hello!

Do you mean it so?
PHP код:
for(new i;i<6;i++)
{
    if(
== || == || == 5)continue;
    
// i == 1, i == 3, i == 6

Nah man... That Loops on those numbers... i need them in random
Reply
#5

Yeah you can use it
This is my IDEA
Reply
#6

This function was once posted in Useful Functions
pawn Код:
// Use it like Random(1, 3, 6);
stock Random(...) {
    return getarg(random(numargs()));
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)