Changes have been requested via PM.
Consider tagging your global variables with g_, p_ or some variant of those (depending on whether they're pointers, globals, etc.)
Indent your code some more and add some whitespace. Also, I generally frown upon this style:
Code:
public plugin_init() {
register_plugin("Chat Rooms","0.8","Sh!nE")
As opposed to:
Code:
public plugin_init()
{
register_plugin("Chat Rooms","0.8","Sh!nE")
Code:
new info[33],temp[192]
Make this static or global.
Code:
new players[32],num;get_players(players,num)
This is very bad form. Get rid of the semicolon and add a return.
Code:
format(player_chatroom[id],32,"")
Use this instead:
Code:
player_chatroom[id][0] = 0
Code:
stock get_user_chatroom(id) {
Read my article on stocks. Also, this name is not descriptive. You should consider calling it something like get_user_chatroom_index().
Code:
color_print(id,text[]) {
message_begin(MSG_ONE,msg_say,{0,0,0},id)
write_byte(id)
write_string(text)
message_end()
}
Use MSG_ONE_UNRELIABLE and consider replacing {0,0,0} with _.
Code:
onoff = register_cvar("amx_chatrooms","1")
dead_chat = register_cvar("amx_cr_deadchat","1")
min_to_open = register_cvar("amx_cr_min_open","2")
green_text = register_cvar("amx_cr_greentext","1")
Consider unifying your cvar names so they all have a certain prefix.
All in all, this plugin is not bad. It's difficult to read but for the most part it's relatively functional.
__________________