Raised This Month: $ Target: $400
 0% 

About banip command


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
epic .
Senior Member
Join Date: Oct 2009
Location: China
Old 02-09-2010 , 02:25   About banip command
Reply With Quote #1

new szIp[32];
get_user_ip(id, szIp, charsmax(szIp), 1);
server_cmd("kick #%d;wait;wait;wait;addip %d ^"%s^";wait;wait;wait;writeip", get_user_userid(id), get_pcvar_num(g_iPcvar[CVAR_BANTIME]), szIp);

What is the "wait" means here? and why use "kick #%d" before addip ?


Thanks
__________________
Quote:
Destinies in my AWP sight are all alike;
Destinies out of my AWP sight in its own way.

Last edited by epic .; 02-09-2010 at 02:34.
epic . is offline
Send a message via ICQ to epic .
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 02-09-2010 , 07:36   Re: About banip command
Reply With Quote #2

addip doesn't kick, that's why it has kick there...

One wait means one frame, it waits as many frames as the waits are before executing the next command.
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
epic .
Senior Member
Join Date: Oct 2009
Location: China
Old 02-09-2010 , 19:06   Re: About banip command
Reply With Quote #3

Quote:
Originally Posted by DarkGod View Post
addip doesn't kick, that's why it has kick there...

One wait means one frame, it waits as many frames as the waits are before executing the next command.
Thank you

and, the last the question, if there are no "wait", what is the different ?



`
__________________
Quote:
Destinies in my AWP sight are all alike;
Destinies out of my AWP sight in its own way.
epic . is offline
Send a message via ICQ to epic .
NiQu
Veteran Member
Join Date: Nov 2009
Old 02-09-2010 , 19:21   Re: About banip command
Reply With Quote #4

As if you make a say script in CS without wait's ur CS will crash, so my guess is:

The server might crash if u dont use waits.
__________________
My Projects
  • RoTAPI V0.0.1 ------- Private
    • Progress - [||||||||||]
  • CashMod V0.0.6 ----- Public
    • Progress - [||||||||||]
  • CashMod V0.0.7 ----- Public
    • Progress - [||||||||||]
NiQu is offline
epic .
Senior Member
Join Date: Oct 2009
Location: China
Old 02-09-2010 , 19:26   Re: About banip command
Reply With Quote #5

Thanks!
two nice people
__________________
Quote:
Destinies in my AWP sight are all alike;
Destinies out of my AWP sight in its own way.
epic . is offline
Send a message via ICQ to epic .
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-09-2010 , 19:42   Re: About banip command
Reply With Quote #6

Quote:
Originally Posted by NiQu View Post
As if you make a say script in CS without wait's ur CS will crash, so my guess is:

The server might crash if u dont use waits.
Wrong.

You use waits to add a time interval between commands.

Example, if you have a series of 5 say commands without waits, it will only print one because you cannot say 5 messages that fast.
So, you add waits in between so the game allows them to work.

If you don't have waits, it won't make your server crash.

Example:
Code:
alias settings1 "alias settings settings2; cl_minmodels 1; cl_righthand 1; net_graph 3; cl_showfps 0;"
alias settings2 "alias settings settings1; cl_minmodels 0; cl_righthand 0; net_graph 0; cl_showfps 1;"
alias settings "settings1"

bind "k" "settings"

// Press k to toggle settings
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
NiQu
Veteran Member
Join Date: Nov 2009
Old 02-09-2010 , 19:51   Re: About banip command
Reply With Quote #7

True exolent, but still if your making two commands without any waits, it will crash..
i made a say script..

Without about 70 waits it would crash my cs.
__________________
My Projects
  • RoTAPI V0.0.1 ------- Private
    • Progress - [||||||||||]
  • CashMod V0.0.6 ----- Public
    • Progress - [||||||||||]
  • CashMod V0.0.7 ----- Public
    • Progress - [||||||||||]
NiQu is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-09-2010 , 19:54   Re: About banip command
Reply With Quote #8

Quote:
Originally Posted by NiQu View Post
True exolent, but still if your making two commands without any waits, it will crash..
i made a say script..

Without about 70 waits it would crash my cs.
Show an example.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
NiQu
Veteran Member
Join Date: Nov 2009
Old 02-09-2010 , 20:46   Re: About banip command
Reply With Quote #9

Code:
alias "w1" "wait;"
alias "w5" "w1;w1;w1;w1;w1;"
alias "w10" "w5;w5;"
alias "w15" "w10;w5;"
alias "w20" "w10;w10;"
alias "w25" "w15;w10;"
alias "w50" "w20;w20;w10;"
alias "w75" "w50;w25;"

alias "say1" "say Message 1"
alias "say2" "say Message 2"
alias "say3" "say Message 3"
alias "say4" "say Message 4"
alias "say5" "say Message 5"
//alias "say6" "say Add your message!"
//alias "say7" "say Add your message!"
//alias "say8" "say Add your message!"
//alias "say9" "say Add your message!"
//alias "say10" "say Add your message!"


alias "sayall" "say1; w75; say2; w75; say3; w75; say4; w75; say5; w75;" 
//Add say6, 7, 8 ,9 and 10 if you are using them to.

bind "k" "sayall"
This one without wait crashes my cs.
__________________
My Projects
  • RoTAPI V0.0.1 ------- Private
    • Progress - [||||||||||]
  • CashMod V0.0.6 ----- Public
    • Progress - [||||||||||]
  • CashMod V0.0.7 ----- Public
    • Progress - [||||||||||]
NiQu is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-09-2010 , 21:21   Re: About banip command
Reply With Quote #10

It shouldn't crash.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Reply



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 07:28.


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