AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   small edit help pleeze (https://forums.alliedmods.net/showthread.php?t=17033)

Riddick51 08-24-2005 19:01

small edit help pleeze
 
here is the change i want.
the following code section executes like this:

Given:
Playername: Gumby
Authority: Admin all acess

when Admin player "Gumby" executes the following command in the console:
amx_say guns [Enter]

the following is written to each players in the servers screen:
(ALL) Gumby: guns [Enter]

what i want is this:
(ALL): guns [Enter]

Code:
[1]public cmdSay(id,level,cid) { [2]  if (!cmd_access(id,level,cid,2)) [3]    return PLUGIN_HANDLED [4]  new message[192],name[32],authid[32],userid [5]  read_args(message,191) [6]  remove_quotes(message) [7]  get_user_authid(id,authid,31) [8]  get_user_name(id,name,31) [9]  userid = get_user_userid(id) [10]  client_print(0,print_chat,"%L",LANG_PLAYER, "PRINT_ALL",name,message) [11]  console_print(id,"%L",LANG_PLAYER,"PRINT_ALL",name,message) [12]  log_amx("Chat: ^"%s<%d><%s><>^" say ^"%s^"", name,userid,authid,message) [13]log_message("^"%s<%d><%s><>^" triggered ^"amx_say^" (text ^"%s^")",name,userid,authid,message) [14]  return PLUGIN_HANDLED [15]}

Zenith77 08-24-2005 19:03

Code:
[1]public cmdSay(id,level,cid) { [2]  if (!cmd_access(id,level,cid,2)) [3]    return PLUGIN_HANDLED [4]  new message[192],name[32],authid[32],userid [5]  read_args(message,191) [6]  remove_quotes(message) [7]  get_user_authid(id,authid,31) [8]  get_user_name(id,name,31) [9]  userid = get_user_userid(id) [10]  client_print(0,print_chat,"%L",LANG_PLAYER, "PRINT_ALL",message) [11]  console_print(id,"%L",LANG_PLAYER,"PRINT_ALL",message) [12]  log_amx("Chat: ^"%s<%d><%s><>^" say ^"%s^"", name,userid,authid,message) [13]log_message("^"%s<%d><%s><>^" triggered ^"amx_say^" (text ^"%s^")",name,userid,authid,message) [14]  return PLUGIN_HANDLED [15]}
if you could...
karma plz..as i am in need of it :(

Riddick51 08-24-2005 19:23

thx man! u got +1 karma from me :wink:

Zenith77 08-24-2005 19:29

yay karma :)

Riddick51 08-24-2005 21:03

gah!

hrm, well small glitch, nothing prints on clients screen. anything else u can think of?

:?

XxAvalanchexX 08-24-2005 23:27

Open up addons/amxmodx/data/lang/adminchat.txt and fine this line:

"PRINT_ALL = (ALL) %s : %s"
Change it to:
"PRINT_ALL = (ALL) %s"

Then change these lines:
Code:
[10]  client_print(0,print_chat,"%L",LANG_PLAYER, "PRINT_ALL",name,message) [11]  console_print(id,"%L",LANG_PLAYER,"PRINT_ALL",name,message)
to:
Code:
[10]  client_print(0,print_chat,"%L",LANG_PLAYER, "PRINT_ALL",message) [11]  console_print(id,"%L",LANG_PLAYER,"PRINT_ALL",message)

Riddick51 08-26-2005 14:22

thanks for taking a shot at this guys, i decided to keep my name visible to players :?

DataMatrix 08-26-2005 14:26

Can't you do this in amxx.cfg?


All times are GMT -4. The time now is 14:23.

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