SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 03/08/2019, 06:25 PM   #1
Manuel78
Little Clucker
 
Join Date: Jul 2017
Posts: 8
Reputation: 0
Default Random

I want to make my own random function or somehow change the one given by samp team. Is it possible?
Manuel78 is offline   Reply With Quote
Old 03/08/2019, 06:48 PM   #2
Kraeror
Gangsta
 
Kraeror's Avatar
 
Join Date: Mar 2017
Location: Bulgaria
Posts: 534
Reputation: 19
Default Re: Random

What do you mean by my own (or change the current one)? If you want to take a random number between two numbers you can use this function:
PHP Code:
stock randomEx(minmax)
{   
    new 
rand random(max-min)+min;    
    return 
rand;

CREDITS: https://forum.sa-mp.com/showthread.php?t=216093
Kraeror is offline   Reply With Quote
Old 03/08/2019, 06:50 PM   #3
Calisthenics
High-roller
 
Join Date: May 2018
Posts: 1,223
Reputation: 205
Default Re: Random

https://forum.sa-mp.com/showthread.php?t=109196
Calisthenics is offline   Reply With Quote
Old 03/08/2019, 07:33 PM   #4
Manuel78
Little Clucker
 
Join Date: Jul 2017
Posts: 8
Reputation: 0
Default Re: Random

Quote:
Originally Posted by Calisthenics View Post
Thank you, I will use this one
btw does anyone know how does random function look like in samp, which parameters uses that it's so bad
Manuel78 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tutorial] Random Aspects - Using numargs(), getarg(...) and random(...) to make random systems dynamic and easier! SickAttack Tutorials 7 10/05/2015 10:39 AM
How to make a random that chooses each random selection once Mennims Scripting Help 6 17/09/2013 06:56 AM
[Include] Insanity Random Lists(generate a random number from your list) CyNiC Includes 10 23/07/2011 01:45 PM
Random payment to Random player ViruZZzZ_ChiLLL Help Archive 1 01/05/2010 05:43 PM
Random location + Random skin Naruto4 Help Archive 2 03/12/2009 04:07 PM


All times are GMT. The time now is 06:15 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.