AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Chat colour problem (https://forums.alliedmods.net/showthread.php?t=308731)

jonatat 07-01-2018 08:15

Chat colour problem
 
I have a simple plugin:

PHP Code:

/* Plugin generated by AMXX-Studio */ 

#include <amxmodx> 
#include <amxmisc> 
#include <cstrike> 
#include <engine> 

public plugin_init() { 
register_plugin(PLUGINVERSIONAUTHOR

register_clcmd "say" "hook_say" )


public 
hook_say id 

if ( ! 
is_user_admin id ) ) 
return 
PLUGIN_CONTINUE 

new someStr[128
read_argv someStr 127 


admin_chatall id someStr 

return 
PLUGIN_HANDLED 


stock admin_chatall (const id, const input[], any:...) 

static 
szMsg[768], Name[36
get_user_name id Name 35

vformat(szMsg768input3

if( ( 
get_user_flags(id) & ADMIN_RCON ) && ( get_user_flags(id) & ADMIN_IMMUNITY ) ) 
format szMsg768"^04[OWNER]^x03 %s^x01: %s"Name szMsg 

else if( ( 
get_user_flags(id) & ADMIN_BAN ) && ( get_user_flags(id) & ADMIN_MAP ) ) 
format szMsg768"^x04[ADMIN]^x03 %s^x01: %s"Name szMsg 

for( new 
player player 33 player ++ ) 

if ( ! 
is_user_connected player ) ) continue 

message_begin(MSG_ONEget_user_msgid("SayText"), {0,0,0}, player
write_byte(player
write_string(szMsg
message_end() 


return 
PLUGIN_HANDLED 


But its not good showing TEAM COLOUR and no *DEAD* tag..

Any help guys?

OciXCrom 07-01-2018 08:29

Re: Chat colour problem
 
If you're the author of the plugin and you wan't to know what's wrong with it - well, everything is.

If you aren't the author, then I STRONGLY suggest you DO NOT use that plugin because it's TERRIBLE. I can't find any piece of the code that is correctly written. Even the #includes are wrong.

If you want a plugin for admin prefixes/colorchat, use this - https://forums.alliedmods.net/showthread.php?t=297952


All times are GMT -4. The time now is 12:52.

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