AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   banning reason (https://forums.alliedmods.net/showthread.php?t=25430)

begg4merrcy 03-13-2006 20:00

banning reason
 
is there a code i counld put in the lang file to say the reason y they got banned like, Admin:U[p]S_|PurpleHaze|- ban Hello Reason:Hacking....i tried Reason:%reason% but it doesnt work.....any ideas?

Kraugh 03-13-2006 20:27

go to admincmd.sma and find this code:

Code:
if (reason[0])     server_cmd("kick #%d ^"%s (%s %s)^" ... )

then change it to this:

Code:
if (reason[0])     server_cmd("kick #%d ^"REASON: %s (%s %s)^" ... )

the dots are only place-holders for the rest of the code on that line.

begg4merrcy 03-13-2006 20:38

can you do it for me?.....it is not working for me.....please? thank you very much

begg4merrcy 03-14-2006 07:02

or some1 else?

begg4merrcy 03-15-2006 21:02

Your plugin failed to compile! Read the errors below:

Welcome to the AMX Mod X 1.70-300 Compiler.
Copyright (c) 1997-2005 ITB CompuPhase, AMX Mod X Team

/home/users/amxmodx/tmp3/phpO6m2fU.sma(120) : error 037: invalid string (possibly non-terminated string)
/home/users/amxmodx/tmp3/phpO6m2fU.sma(120 -- 121) : error 001: expected token: ",", but found "else"

2 Errors.
Could not locate output file /home/groups/amxmodx/public_html/websc3/phpO6m2fU.amx (compile failed).

slmclarengt 03-15-2006 22:19

It's not as easy as it sounds. To display a reason, you must first ask the admin for the reason. Then, it must be stored for later use (in data file perhaps?). Next, you can modify the admincmd.sma to add reason: syntax. I recommend just using amxbans instead of the default banning mechanism.

http://amxbans.net

Kraugh 03-16-2006 02:02

actually, it is that simple‼ amx_ban already has a built-in syntax that allows you to display a reason when banning someone.

i assumed from his original post that he simply wanted "REASON: " prepended to the reason, but it appears that maybe all he wanted was the ability to display a reason. amx_ban can already do this.


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

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