Forum
Search
Members
Help
Hello There, Guest!
Login
Username:
Password:
Lost Password?
Remember me
SA-MP Forums Archive
SA-MP Scripting and Plugins
Scripting Help
Threaded Mode
How to generate random numbers?
Ox1gEN
Huge Clucker
Posts: 364
Threads: 41
Joined: Aug 2014
Reputation:
0
#1
03.09.2014, 15:23
Title ^^
Find
Reply
Stinged
High-roller
Posts: 1,578
Threads: 15
Joined: Feb 2013
Reputation:
0
#2
03.09.2014, 15:35
random(100);
Find
Reply
Ox1gEN
Huge Clucker
Posts: 364
Threads: 41
Joined: Aug 2014
Reputation:
0
#3
03.09.2014, 15:37
That'll give me?
A random number between 1-99?
Find
Reply
Dignity
High-roller
Posts: 1,661
Threads: 47
Joined: May 2013
Reputation:
0
#4
03.09.2014, 15:41
Yes.
Find
Reply
Stinged
High-roller
Posts: 1,578
Threads: 15
Joined: Feb 2013
Reputation:
0
#5
03.09.2014, 15:47
Well a random number between 0 and 99. If you want to make a min-max, use this function:
pawn Код:
randMin
(
min
,
max
)
// By ****** (I think)
{
return
random
(
max
-
min
)
+
min
;
}
Find
Reply
Ox1gEN
Huge Clucker
Posts: 364
Threads: 41
Joined: Aug 2014
Reputation:
0
#6
03.09.2014, 15:50
Quote:
Originally Posted by
Stinged
Well a random number between 0 and 99. If you want to make a min-max, use this function:
pawn Код:
randMin
(
min
,
max
)
// By ****** (I think)
{
return
random
(
max
-
min
)
+
min
;
}
Thanks for both of y'all, this is what I was exactly wanting
Find
Reply
«
Next Oldest
|
Next Newest
»
View a Printable Version
Forum Jump:
Private Messages
User Control Panel
Who's Online
Search
Forum Home
SA-MP
-- News and Updates
-- General
-- Client Support
-- Bug Reports
-- Screenshots and Videos
SA-MP Server
-- Server Support
-- Server Advertisements
SA-MP Scripting and Plugins
-- Scripting Help
---- Tutorials
---- Discussion
---- Help Archive
-- Gamemode Scripts
-- Filterscripts
---- Includes
---- Tools and Files
---- Maps
-- Plugin Development
SA-MP DL Edition
-- SA-MP 0.3.DL
---- Model Releases
Other
-- Everything and Nothing
Non-English
-- Languages
---- Nederlands/Dutch
------ Scripting Showroom en Discussie
------ Off topic
---- Español/Spanish
------ Lanzamientos/Releases
---- Français/French
------ Showroom
---- Русский/Russian
------ Релизы/Releases
---- Português/Portuguese
------ Lançamentos/Releases
---- Română/Romanian
------ Salonul Scripturilor
---- Archive
Users browsing this thread: 1 Guest(s)
SA-MP Forums Archive
SA-MP Scripting and Plugins
Scripting Help