AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   server_cmd issue (https://forums.alliedmods.net/showthread.php?t=85732)

Jack86 02-15-2009 06:56

server_cmd issue
 
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.

Mlk27 02-15-2009 18:42

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

amx_banip <name or #userid> <minutes> [reason]

hleV 02-15-2009 18:53

Re: server_cmd issue
 
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.

Jack86 02-20-2009 06:20

Re: server_cmd issue
 
@ 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.


All times are GMT -4. The time now is 16:53.

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