AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to get random round? (https://forums.alliedmods.net/showthread.php?t=206970)

danonix 01-28-2013 04:53

How to get random round?
 
As topic says, how to get random ROUNDS in each map, so sometimes function happens only one time in map, sometimes 3 times etc.

Thanks

Napoleon_be 01-28-2013 07:47

Re: How to get random round?
 
new variable = random(100)
if(variable < 10) {
StartFunction()
}

fysiks 01-28-2013 20:28

Re: How to get random round?
 
Quote:

Originally Posted by danonix (Post 1882165)
As topic says, how to get random ROUNDS in each map, so sometimes function happens only one time in map, sometimes 3 times etc.

Your request is unclear. Do you want a random number of rounds OR a function that only happens a random number of times on a map? One or the other.


Quote:

Originally Posted by Napoleon_be (Post 1882198)
new variable = random(100)
if(variable < 10) {
StartFunction()
}

That is a 10% probability of StartFunction() being executed. Not quite the same but I guess it could be an answer considering the poorly formed question.

danonix 01-29-2013 03:33

Re: How to get random round?
 
Code:

a function that only happens a random number of times on a map
Thanks : p

fysiks 01-29-2013 20:21

Re: How to get random round?
 
You need to give more details. What is this function and how often is it supposed to happen? What is the maximum number of times you want this function to happen? etc.

danonix 01-30-2013 02:53

Re: How to get random round?
 
I would like to get random players in each map, so they can smell a vip. It should happen maximum 3 times in map ( but it shouldn't loss every map. )

TheDS1337 01-30-2013 10:27

Re: How to get random round?
 
Why you don't try ZP's chance idea ?

danonix 01-30-2013 17:04

Re: How to get random round?
 
I don't know how zombie mods works, because I never had one, so I couldn't know that there is a thing.

fysiks 01-30-2013 20:31

Re: How to get random round?
 
You will need to answer all questions asked of you if you want a real answer.

danonix 01-31-2013 04:57

Re: How to get random round?
 
This function should do itself randomly on all maps without admin help. It would in random rounds loss a player, that earn something from VIP. Function shouldn't happen every map, but if do, it loss maximum in 3 rounds. I think, that I gave everything.


All times are GMT -4. The time now is 20:40.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.