Help needed! (Random integer value) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help needed! (Random integer value) (
/showthread.php?tid=230996)
Help needed! (Random integer value) -
[WSF]ThA_Devil - 24.02.2011
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...
Re: Help needed! (Random integer value) -
Feras - 24.02.2011
store them in two variables, use random(); simple as that.
Re: Help needed! (Random integer value) -
[WSF]ThA_Devil - 24.02.2011
but how to use?
explain me a bit...
Re: Help needed! (Random integer value) -
Mean - 24.02.2011
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;
}
Re: Help needed! (Random integer value) -
[WSF]ThA_Devil - 24.02.2011
ok ty it helped xD :P
Re: Help needed! (Random integer value) -
Feras - 24.02.2011
example:
pawn Код:
1_variable = random(7000); //jackpot
2_variable = random(10); //score