Raised This Month: $ Target: $400
 0% 

random_num()


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zi443r
Senior Member
Join Date: Mar 2009
Location: Braila,Romania
Old 07-08-2013 , 01:44   random_num()
Reply With Quote #1

i have this part of code:
PHP Code:
if (is_user_connected(id)) {....
client_cmd(id"connect %s:%d"g_IP[random_num(0sizeof(g_IP)-1)], g_portcvar)
log_message("[Redirect] Sent %s <%s> to new ip:%s"info1info2g_IP[random_num(0sizeof(g_IP)-1)])
...} 
both g_IP[random_num(0, sizeof(g_IP)-1)] will have the same value?
or i need to store it before?
__________________

Last edited by YamiKaitou; 07-08-2013 at 10:25.
zi443r is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 07-08-2013 , 02:24   Re: random_num()
Reply With Quote #2

redirecting a client by forcing client_cmd doesnt work anymore with latest Update.
__________________
Blizzard_87 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-08-2013 , 02:35   Re: random_num()
Reply With Quote #3

While this code doesn't work anymore, the answer to the actual question is that you have to store the value because the random_num() function gets a random number.
__________________
fysiks is offline
zi443r
Senior Member
Join Date: Mar 2009
Location: Braila,Romania
Old 07-08-2013 , 02:35   Re: random_num()
Reply With Quote #4

thanx,i'll update to the latest version.
__________________

Last edited by zi443r; 07-08-2013 at 02:36.
zi443r is offline
zi443r
Senior Member
Join Date: Mar 2009
Location: Braila,Romania
Old 07-08-2013 , 13:16   Re: random_num()
Reply With Quote #5

it's working very well on latest update:

PHP Code:
Protocol version 48
Exe version 1.1.2.7 
(cstrike)
Exe build17:46:18 Apr 25 2013 (6027
__________________
zi443r is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 07-08-2013 , 15:54   Re: random_num()
Reply With Quote #6

Sorry, we will not help people who try to get around Valve's blocks
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
tonykaram1993
Senior Member
Join Date: Mar 2013
Location: This World
Old 07-08-2013 , 18:34   Re: random_num()
Reply With Quote #7

I have question regarding this matter.
If cl_filterstuffcmd is set to 0, will it still block slow hacking? Or must it be set to 1?
__________________
My Plugins:
UltimatePlugin
UltimateSurf
UltimateAdmin
Code:
rcon version | rcon amxx version | rcon meta version
rcon amxx plugins | rcon meta list | rcon status
I AM INACTIVE ON THIS FORUM - For direct contact: [email protected]
tonykaram1993 is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 07-08-2013 , 19:06   Re: random_num()
Reply With Quote #8

Last I checked, still block it. I do not believe the implementation of cl_filterstuffcmd is done yet
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-08-2013 , 19:09   Re: random_num()
Reply With Quote #9

Quote:
Originally Posted by YamiKaitou View Post
Last I checked, still block it. I do not believe the implementation of cl_filterstuffcmd is done yet
I think there were some things permanently blocked regardless of the value of cl_filterstuffcmd, binds being one of them. I believe that connect is also one of them but I can't remember for sure.
__________________
fysiks is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 07-08-2013 , 19:11   Re: Re: random_num()
Reply With Quote #10

Quote:
Originally Posted by fysiks View Post
I think there were some things permanently blocked regardless of the value of cl_filterstuffcmd, binds being one of them. I believe that connect is also one of them but I can't remember for sure.
That could be it too. I know in a future update they are going to default it to 1 and setting it to 0 will disable the check.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
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

Forum Jump


All times are GMT -4. The time now is 06:30.


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