Raised This Month: $ Target: $400
 0% 

server_cmd issue


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jack86
Veteran Member
Join Date: Dec 2008
Location: Belgrade, Serbia
Old 02-15-2009 , 06:56   server_cmd issue
Reply With Quote #1

I guess the real issue is my lack of knowledge, but i cant get this to work. When i type

server_cmd( "addip ^"999^" ^"%s^";wait;wait;writeip", ip)

it works, but when i change it to

server_cmd( "amx_banip ^"%s^" ^"999^" ^"-ban message here-^"", ip);

it doesnt, i will use this in plugin for banning users with certain binds when they try to connect to server, first command bans them, but second one is better cause users dont get timeout when connecting to server and can see reason for ban.
Jack86 is offline
Mlk27
Veteran Member
Join Date: May 2008
Old 02-15-2009 , 18:42   Re: server_cmd issue
Reply With Quote #2

server_cmd( "amx_banip ^"%s^" ^"999^" ^"-ban message here-^"", name);

amx_banip <name or #userid> <minutes> [reason]
Mlk27 is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 02-15-2009 , 18:53   Re: server_cmd issue
Reply With Quote #3

Code:
new szBan[128]; formatex(szBan, 127, "amx_banip ^"%s^" 999 ^"-ban message here-^"", ip);   server_cmd(szBan);
BTW if you want to ban player permanently, use 0 instead of 999.
__________________

Last edited by hleV; 02-15-2009 at 18:55.
hleV is offline
Jack86
Veteran Member
Join Date: Dec 2008
Location: Belgrade, Serbia
Old 02-20-2009 , 06:20   Re: server_cmd issue
Reply With Quote #4

@ mik
Hehe tnx man, i forgot that command cant ban ips directly, anyway i tried with name and userid and still it doesnt work, but it works with kick komand, so i wrote it with kick command with ban reason and addip command after that, it displays same results as banip command.
Jack86 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 16:53.


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