Help needed! (Random integer value)
#1

i needed help with random integer value because of Goldpot minigame... i need that every time is different pot...
like one time is 1000 and 7 score.. second time 50000 and 1 score.. i mean store them in array...
__________________________________________________ ___________________________
my biggest question about this is how to put random value into array...
Reply
#2

store them in two variables, use random(); simple as that.
Reply
#3

but how to use?
explain me a bit...
Reply
#4

Example usage of random function:
pawn Код:
CMD:random( playerid, params[ ] )
{
    new integer = random( 1000 );
    new str[ 128 ];
    format( str, sizeof str, "Random number between 0 and 1000: %d", integer );
    SendClientMessage( playerid, 0xAAAAAA, string );
    return 1;
}
Reply
#5

ok ty it helped xD :P
Reply
#6

example:
pawn Код:
1_variable = random(7000);   //jackpot
2_variable = random(10);     //score
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)