
 // in this file, there is just a whole bunch of functions that deals with pokemod a lot, but has no specific place

 /////////////////////////////////////
 //  Determines the pokemon's name  //
 /////////////////////////////////////
 PokeToName(const pid, name[]="", len=0)
 {
	static _name[NAME_LENGTH];
	if( !ValidPoke(pid) )
		copy(_name, NAME_LENGTH-1, POKENAMES[0]);
	else
		copy(_name, NAME_LENGTH-1, POKENAMES[pid]);

	if(len)	copy(name, len, _name);
	return _name;
 }
 ////////////////////////////////////////////
 //  Returns the number that a pokemon is  //
 ////////////////////////////////////////////
 NameToPoke(const pname[], bool:check_full=false, id=0)
 {
	static pid, pokename[NAME_LENGTH];
	copy( pokename, NAME_LENGTH-1, pname);

	replace_all(pokename, NAME_LENGTH-1, "_", EMPTY);
	replace_all(pokename, NAME_LENGTH-1, " ", EMPTY);
	pokename[0] = toupper(pokename[0]);

	if( check_full ){
		for( pid = 0; pid <= PokesCreated; pid++ )
			if( equali( pokename, POKENAMES[pid] ) )
				return pid;
	}
	else{
		static current_comp, largest[2], poke[2];
		largest[0] = largest[1] = poke[0] = poke[1] = 0;

		if( id ){
			for( pid = 0; pid < MAX_POKES; pid++ ){
				current_comp = NameCompare( pokename, NAME_LENGTH-1, POKENAMES[ PlayersPoke[id][pid] ] )
				if( current_comp >= largest[0] ){
					largest[0] = current_comp;
					poke[0] = PlayersPoke[id][pid];
					if( largest[0] > largest[1] ){
						largest[1] = largest[0];
						poke[1] = poke[0];
						poke[0] = 0;
					}
				}
			}
		}
		else{
			for( pid = 0; pid <= PokesCreated; pid++ ){
				current_comp = NameCompare( pokename, NAME_LENGTH-1, POKENAMES[pid] )
				if( current_comp >= largest[0] ){
					largest[0] = current_comp;
					poke[0] = pid;
					if( largest[0] > largest[1] ){
						largest[1] = largest[0];
						poke[1] = poke[0];
						poke[0] = 0;
					}
				}
			}
		}
		if( !poke[0] || largest[1] > largest[0] )
			return poke[1];
	}

	return 0;
 }

 
 ///////////////////////////////////
 //  Determines the name of item  //
 ///////////////////////////////////
 ItemToName(item, name[]="", len=0)
 {
	static _name[NAME_LENGTH];
	if( ValidItem(item) )
		copy(_name , NAME_LENGTH-1 , ItemName[item]);
	else
		copy(_name , NAME_LENGTH-1 , "None");

	if(len)	copy(name, len, _name);
	return _name;
 }
 
 ///////////////////////////////////
 //  Determines the item by name  //
 ///////////////////////////////////
 NameToItem(const iname[], bool:check_full=true)
 {
	static i, itemname[NAME_LENGTH], tempname[NAME_LENGTH];
	copy( itemname, NAME_LENGTH-1, iname);
	replace_all(itemname, NAME_LENGTH-1, "_", EMPTY);
	replace_all(itemname, NAME_LENGTH-1, " ", EMPTY);

	static current_comp, largest[2], items[2];
	largest[0] = largest[1] = items[0] = items[1] = 0;

	for(i=0; i < ItemsCreated; i++){
		copy(tempname, NAME_LENGTH-1, ItemName[i]);
		replace_all(tempname, NAME_LENGTH-1, "_", EMPTY);
		replace_all(tempname, NAME_LENGTH-1, " ", EMPTY);

		if(check_full){
			if( equali(itemname, tempname) )
				return i;
		}
		else{
			current_comp = NameCompare( itemname, NAME_LENGTH-1, tempname );
			if( current_comp >= largest[0] ){
				largest[0] = current_comp;
				items[0] = i;
				if( largest[0] > largest[1] ){
					largest[1] = largest[0];
					items[1] = items[0];
					items[0] = 0;
				}
			}
		}
	}

	if( !check_full && (!items[0] || largest[1] > largest[0] ) )
		return items[1];
	return MAX_ITEMS;
 }
 
 ///////////////////////////////////
 //  Determines the item by name  //
 ///////////////////////////////////
 NameToSkill(const name[])
 {
	static skill, i, _name[NAME_LENGTH], tempname[NAME_LENGTH];
	copy( _name, NAME_LENGTH-1, name);
	skill = -1;

	replace_all(_name, NAME_LENGTH-1, "_", EMPTY);
	replace_all(_name, NAME_LENGTH-1, " ", EMPTY);

	for(i=0; i < SkillsCreated; i++){
		copy(tempname, NAME_LENGTH-1, SkillName[i]);
		replace_all(tempname, NAME_LENGTH-1, "_", EMPTY);
		replace_all(tempname, NAME_LENGTH-1, " ", EMPTY);

		if(equali(_name, tempname)){
			skill = i;
			break;
		}
	}

	return skill;
 }

 ////////////////////////////////////////////////////
 //  Determines the name of a skill without any _  //
 ////////////////////////////////////////////////////
 SkillToName(skill, name[]="", len=0, bool:remove_scores=true)
 {
	static _name[NAME_LENGTH];
	if(skill > -1 && skill < SkillsCreated)
		copy(_name , NAME_LENGTH-1 , SkillName[skill]);
	else
		copy(_name , NAME_LENGTH-1 , "None");

	if(remove_scores)	replace_all(_name, NAME_LENGTH-1, "_", " ");
	if(len)	copy(name, len, _name);
	return _name;
 }
 
 ///////////////////////////////////////
 //  Determines the category by name  //
 ///////////////////////////////////////
 NameToCat(catname[])
 {
	for( new i=0; i<MAX_ITYPE; i++ )
		if(equali(catname, ItemCatName[i]))
			return i;
	return MAX_ITYPE;
 }

 //--Thing im using so i dont have to use get_user_team each time--//
 Team(id)
 {
	if( id > MAX_PLAYERS && EntIsPC( id ) )
		return pev(id, pev_team);

	if( !is_user_connected(id) )
		return 0;

	#if MOD == CS
		return _:cs_get_user_team(id);
	#else
		#if MOD == NS
			return pev(id, pev_team);
		#else
			return get_user_team(id);
		#endif
	#endif
 }
 //--Thing im using so i dont have to use set_user_health each time--//
 Heal(id, amm)
 {
	new old = Health(id);
	if( PlayerStat[id][STAT_MAXHP] <= 1 )
		CheckMaxHP(id);
	if( (PlayerStat[id][STAT_MAXHP] < old && PlayerStat[id][STAT_MAXHP] > 0) || !amm )
		return 0;
	set_user_health(id, clamp(old+amm, 1, abs( PlayerStat[id][STAT_MAXHP] ) ) );
	return 1;
 }
 //--Thing im using so i dont have to use cs_set_user_money each time--//
 Pay(id, amm, do_forward=1)
 {
	if(do_forward && PokePayForward > -1)
	{
		new functionReturn
		ExecuteForward(PokePayForward, functionReturn, id, amm)

		// Forward will return the highest value, don't return 1 or 2 in function cause of return handled or handled_main
		// and 0 is used by continue and invalid return.
		if(functionReturn==PLUGIN_HANDLED)	//if something else did handle it, let's stop here.
		{
				return PLUGIN_HANDLED;
		}
	}
	#if MOD==CS
		new old = cs_get_user_money(id);

		//update their money, because i... i don't want to explain it right now, but for some reason cs_set_user_money doesn't send the message to other plugins, so we'll manually send the message

		new newmoney = clamp(old+amm, 0, MAX_MONEY);

		if( is_user_alive(id) && !is_user_bot(id) ){
			//display total
			emessage_begin( MSG_ONE_UNRELIABLE  , gmsgMoney , _, id );
			ewrite_long(newmoney);
			ewrite_byte(0);
			emessage_end();
		}

		cs_set_user_money(id, newmoney , 1);
		money[id] = newmoney;
	#else
		money[id] += amm;
		clamp(money[id], 0, MAX_MONEY);
	#endif
	return PLUGIN_HANDLED;
 }
 Money(id)
 {
	#if MOD==CS
		money[id] = cs_get_user_money(id);
	#endif
	return money[id];
 }
 //--Thing im using so i dont have to use set_user_armor each time--//
 Repair(id, amm)
 {
	new old = get_user_armor(id);
	new repair = clamp(old+amm, 0, abs(PlayerStat[id][STAT_MAXAP]) );

	for(new i=0; i < ItemsCreated; i++)
		if( ItemInfo[i] & II_ARMOR && HasPokeItem(id, i) )
			repair += ItemArmor[i]*PlayersItem[id][i];

	repair = clamp(repair, 0, abs(PlayerStat[id][STAT_MAXAP]) );

	if(repair < old)
		return;

	#if MOD==CS
		if( repair )
			cs_set_user_armor(id, repair, (repair >= 50) ? CS_ARMOR_VESTHELM : CS_ARMOR_KEVLAR );
		else
			cs_set_user_armor(id, repair, CS_ARMOR_NONE);
	#else
		set_user_armor(id, repair);
	#endif
 }

 //--thing so you can remove ent after time--//
 public poke_remove_entity(ent)
 {
	ent -= REMOVE_TASK;
	if( pev_valid(ent) && ent )
		fm_remove_entity( ent );
 }

 public DelayedSetSpeed(id)
	SetSpeed(id)
 //--Sets Speed Correctly--//
 SetSpeed(id)
 {
	if( !PMon() ) return

	//thanks to a plugin i wrote and used
	static Float:speed, Float:toadd, clip, ammo, weapon, i;
	speed=0.0;
	toadd=0.0;
	weapon = get_user_weapon(id, clip, ammo);
	switch(weapon)
	{
		#if MOD==CS
			case	CSW_P228,CSW_HEGRENADE,CSW_C4,CSW_MAC10,CSW_SMOKEGRENADE,
					CSW_ELITE,CSW_FIVESEVEN,CSW_UMP45,CSW_USP,CSW_GLOCK18,CSW_MP5NAVY,
					CSW_TMP,CSW_FLASHBANG,CSW_DEAGLE,CSW_KNIFE: speed = 250.0
			case	CSW_SCOUT: speed = 260.0
			case	CSW_XM1014,CSW_AUG,CSW_GALI,CSW_FAMAS: speed = 240.0
			case	CSW_SG550,CSW_AWP,CSW_G3SG1: speed = 210.0
			case	CSW_M249: speed = 220.0
			case	CSW_M3,CSW_M4A1: speed = 230.0
			case	CSW_SG552: speed = 235.0
			case	CSW_AK47: speed = 221.0
			case	CSW_P90: speed = 245.0

			default: speed = 240.0	//if for some reason it aint here, this is the average speed
		#endif
		#if MOD==DOD
			default: speed = 100.0 //all weapons in dod have 600, but were setting stamina, so lets set to 100.0 (default stamina)
		#endif
		#if MOD==NS
			default:{
				speed = float(ns_get_maxspeed(id))
				ns_set_speedchange(id)
				toadd = float(ns_get_speedchange(id))
			}
		#endif
	}

	PlayerStat[id][STAT_SPEED] = 0;

	if(PM_disabled == 0){
		skills_handler(id, SI_SPEED);
	}

	toadd += PlayerStat[id][STAT_SPEED];

	//Items that affect speed
	for( i=0; i < ItemsCreated; i++){
		if( !HasPokeItem(id, i) )
			continue
		if( ItemInfo[i] & II_BIKE && g_Status[id][STATUS_BIKE])
			toadd += ItemSpeed[i]*PlayersItem[id][i]
		else if( ItemInfo[i] & II_SPEED )
			toadd += ItemSpeed[i]*PlayersItem[id][i]
	}

	//Statuses that affect speed
	if(g_Status[id][STATUS_SLOW] || g_Status[id][STATUS_FROZEN])
		toadd -= SLOWSPEED
	if(FreezeTime || g_Status[id][STATUS_PARALYZE] || g_Status[id][STATUS_ASLEEP] || g_Status[id][STATUS_OAK_STOP]){
		#if MOD==CS || MOD==DOD
			speed = 1.0
			toadd = 0.0
		#endif
		#if MOD==NS
			toadd = -1.0*MAX_SPEED
			speed = 1.0
		#endif
	}
	if(toadd>MAX_SPEED)
		toadd = 1.0*MAX_SPEED

	if(is_user_alive(id)){
	#if MOD==CS
		set_user_maxspeed(id, speed+toadd)
	#endif
	#if MOD==DOD
		dod_set_stamina(id, STAMINA_SET, clamp( floatround(toadd), 0, 99 ), clamp( floatround(speed+toadd), 1, 100 ))
	#endif
	#if MOD==NS
		ns_set_speedchange(id, floatround(toadd))
		set_user_maxspeed(id, speed)
	#endif
	}
 }
 
 register_pokeadmincmd(const cmd[],const function[],flags=-1, info[]="")
 {
	new final_cmd[51];
	#if PM_ADMIN_COMMANDS==1
	formatex(final_cmd, 50, "pm_%s",cmd);
	#else
	formatex(final_cmd, 50, "amx_%s",cmd);
	#endif
	return register_concmd(final_cmd,function,flags,info);
 }

 register_pokecvar(const cvar_num,const string[],flags = 0,Float:fvalue = 0.0)
	return pcvars[cvar_num] = register_cvar(get_pokecvar_name(cvar_num),string,flags,fvalue);
 get_pokecvar_name(const cvar_num, bool:prefix = true)
 {
	new cvar[51];
	if(prefix){
		#if PM_CVAR_PREFIX==1
		formatex(cvar, 50, "pm_%s",cvars[cvar_num]);
		#else
		formatex(cvar, 50, "amx_%s",cvars[cvar_num]);
		#endif
	}
	else
		copy(cvar, 50, cvars[cvar_num]);
	return cvar;
 }
 get_pokecvar(const cvar_name[], check_both = false)
 {
	for(new i=0; i<MAX_CVARS; i++)
		if(	( equal(get_pokecvar_name(i), cvar_name) )
		||	( check_both && equal(get_pokecvar_name(i, false), cvar_name) ) )
			return i;
	return MAX_CVARS;
 }
 #define get_ppcvar_flags(%1)			get_pcvar_flags(pcvars[%1])
 #define get_ppcvar_num(%1)				get_pcvar_num(pcvars[%1])
 #define get_ppcvar_float(%1)			get_pcvar_float(pcvars[%1])
 #define get_ppcvar_string(%1,%2,%3)	get_pcvar_string(pcvars[%1],%2,%3)
 #define set_ppcvar_flags(%1,%2)		set_pcvar_flags(pcvars[%1],%2)
 #define set_ppcvar_num(%1,%2)			set_pcvar_num(pcvars[%1],%2)
 #define set_ppcvar_float(%1,%2)		set_pcvar_float(pcvars[%1],%2)
 #if AMXX_VERSION_NUM < 180
	#define set_ppcvar_string(%1,%2)	set_cvar_string(get_pokecvar_name(%1),%2)
 #else
	#define set_ppcvar_string(%1,%2)	set_pcvar_string(pcvars[%1],%2)
 #endif

 get_ppcvar_line(const cvar_num)
 {
	new PokeFile[128];
	Poke_FileName( F_ModConfig, PokeFile);
	new Left[NAME_LENGTH], Right[151];
	new i, charnum, size = file_size(PokeFile, 1);

	for(i=0; i<=size; i++){
		read_file(PokeFile,i,Right,150,charnum)
		strbreak(Right, Left, NAME_LENGTH-1, Right, 1)

		if( equal(Left, get_pokecvar_name(cvar_num) ) )
			return i;
	}

	return -1;
 }
 set_ppcvar_line(const cvar_num, const new_cvar[])
 {
	new PokeFile[128];
	Poke_FileName( F_ModConfig, PokeFile);
	new writeme[256], iLen;
	iLen += formatex(writeme[iLen], (255-iLen), "%-20s ", get_pokecvar_name(cvar_num));
	iLen += formatex(writeme[iLen], (255-iLen), "%-15s //", new_cvar);
	iLen += formatex(writeme[iLen], (255-iLen), ppcvar_description(cvar_num) );
	write_file(PokeFile, writeme, get_ppcvar_line(cvar_num));
 }
 ppcvar_description(const cvar_num)
 {
	new data[256];
	switch(cvar_num)
	{
		case pm_pokemod:			copy(data, 255, "turns pokemod on and off (1=on, 0=off)");
		case pm_admin:				copy(data, 255, "what accessflag admins need to mess with PokeMod");
		case pm_save:				copy(data, 255, "save players xp (1=on, 0=off)");
		case pm_xpsavedays:			copy(data, 255, "how many days to save xp for before erasing it");
		case pm_safari_mode:		copy(data, 255, "turns safari mode on and off (1=on, 0=off)");
		case pm_debug:				copy(data, 255, "turns pokemod debug messages on and off (1=on, 0=off)");
		case pm_debug_key:			copy(data, 255, "only shows debug messages with this in it");
#if ALLOW_WILD==1
		case pm_wild:				copy(data, 255, "how many people needed to be wild");
		case pm_wild_level:			copy(data, 255, "max level that wild pokemon will be (set to 0 to disable)");
#endif
		case pm_maxhp:				copy(data, 255, "max hp that someone can get with bonuses");
		case pm_maxarmor:			copy(data, 255, "max armor that someone can get with bonuses");
		case pm_botsays:			copy(data, 255, "turns on bot radio commands when they choose/buy a pokemon/item");
		case pm_pokecenter:			copy(data, 255, "set to 0 if you dont want the npcs to be spawned. otherwise this is the distance you can be from pokecenter to use it");
		case pm_oak:				copy(data, 255, "prof oak properties (a = pokemart, b = heal, c = team specific)");
		case pm_oakhp:				copy(data, 255, "how much hp oak has (set to 0 for godmode)");
		case pm_pokeballs:			copy(data, 255, "spawn pokeballs with pokemon in them at spawns (1=yes, 0=no)");
		case pm_buytime:			copy(data, 255, "minutes that you can buy things from pokemart, set to 0 for infinite time");
		case pm_itemtime:			copy(data, 255, "items disappear after this time, set to 0 to remove at end of round");
		case pm_pokemart_open:		copy(data, 255, "allow buying from pokemart");
		case pm_burntime:			copy(data, 255, "how long until players are no longer on fire");
		case pm_burndamage:			copy(data, 255, "how much damage per half second burn does");
		case pm_waterheal:			copy(data, 255, "how much hp is healed per second in water (if using a water pokemon)");
		case pm_poisontime:			copy(data, 255, "how long until players are no longer poisoned");
		case pm_poisondamage:		copy(data, 255, "how much damage per second poison does");
		case pm_sleeptime:			copy(data, 255, "players will fall asleep for this amount of time");
#if SAVE==SAVE_SQLX || SAVE==SAVE_MYSQL
		case pm_mysql_host:			copy(data, 255, "domain or ip for the mysql server");
		case pm_mysql_user:			copy(data, 255, "user login name for the mysql server");
		case pm_mysql_pass:			copy(data, 255, "password for the user login for the mysql server");
		case pm_mysql_db:			copy(data, 255, "database to save pokemod data in the mysql server");
#endif
#if SAVE==SAVE_MYSQL
		case pm_mysql_persistent:	copy(data, 255, "only connect to mysql server once (if saving problems, set to 0)");
#endif
	}

	return data;
 }
 SkillDescription( skill )
 {
	new data[256], bool:added = false;

	if( skill == -1 || !SkillInfo[skill] || SkillInfo[skill] & SI_DISABLE )
		copy( data, 255, "Skill is disabled." );
	else {
		copy( data, 255, SkillDesc[skill] );

		if( SkillInfo[skill] & SI_ATTACK )
			add( data, 255, " gdy zaatakujesz kogos" );
		if( SkillInfo[skill] & SI_BIND ){
			if( added )	add( data, 255, " /" );
			add( data, 255, " gdy nacisniesz +pokeskill" );
			added = true;
		}
		if( SkillInfo[skill] & SI_TOUCH ){
			if( added )	add( data, 255, " /" );
			add( data, 255, " gdy kogos dotkniesz" );
			added = true;
		}
		if( SkillInfo[skill] & SI_DAMAGED ){
			if( added )	add( data, 255, " /" );
			add( data, 255, " kiedys otrzymujesz obrazenia" );
			added = true;
		}
		if( SkillInfo[skill] & SI_LOOP ){
			if( added )	add( data, 255, " /" );
			add( data, 255, " kazda sekunde" );
			added = true;
		}
		if( SkillInfo[skill] & SI_SPAWN ){
			if( added )	add( data, 255, " /" );
			add( data, 255, " kiedy jestes spawnowany" );
			added = true;
		}
		if( SkillInfo[skill] & SI_DEAD ){
			if( added )	add( data, 255, " /" );
			add( data, 255, " gdy giniesz" );
			added = true;
		}
		if( SkillInfo[skill] & SI_PATTACK ){
			if( added )	add( data, 255, " /" );
			add( data, 255, " gdy atakujesz kogos z PokeSkillem" );
			added = true;
		}
		if( SkillInfo[skill] & SI_PDAMAGED ){
			if( added )	add( data, 255, " /" );
			add( data, 255, " kiedy otrzymujesz obrazenia PokeSkillem" );
			added = true;
		}
		if( SkillInfo[skill] & SI_LOOK ){
			if( added )	add( data, 255, " /" );
			add( data, 255, " gdy na kogos patrzysz" );
			added = true;
		}
		if( SkillInfo[skill] & SI_SPEED ){
			if( added )	add( data, 255, " /" );
			add( data, 255, " gdy zmieniasz bron" );
			added = true;
		}
		if( SkillInfo[skill] & SI_STATUS ){
			if( added )	add( data, 255, " /" );
			add( data, 255, " gdy zmienia ci sie stan" );
			added = true;
		}
		if( SkillInfo[skill] & SI_ADMIN )
			add( data, 255, " (tylko Admin)" );
	}

	return data;
 }
 
 SetAction( id, action=AC_NONE )
 {
	debugMessage(id,6,"set Action=%s, was %s", ActionToName( action ), ActionToName( Action[id] ) )
	Action[id] = action;
 }
 ActionToName( action, name[]="", len=0 )
 {
	static _name[NAME_LENGTH];
	switch( action )
	{
		case AC_START:				copy( _name, NAME_LENGTH-1, "START");
		case AC_MAIN:				copy( _name, NAME_LENGTH-1, "MAIN");
		case AC_MART:				copy( _name, NAME_LENGTH-1, "MART");
		case AC_GO:					copy( _name, NAME_LENGTH-1, "GO");
		case AC_RELEASE:			copy( _name, NAME_LENGTH-1, "RELEASE");
		case AC_PC_GIVE:			copy( _name, NAME_LENGTH-1, "PC_GIVE");
		case AC_PC_TAKE:			copy( _name, NAME_LENGTH-1, "PC_TAKE");
		case AC_ITEM:				copy( _name, NAME_LENGTH-1, "ITEM");
		case AC_HELP:				copy( _name, NAME_LENGTH-1, "HELP");
		case AC_SKILL:				copy( _name, NAME_LENGTH-1, "SKILL");
		case AC_GIVE_ITEM:			copy( _name, NAME_LENGTH-1, "GIVE_ITEM");
		case AC_SAFARI:				copy( _name, NAME_LENGTH-1, "SAFARI");
		case AC_PC:					copy( _name, NAME_LENGTH-1, "PC");
		default:					copy( _name, NAME_LENGTH-1, "NONE");
	}
	if(len)	copy(name, len, _name);
	return _name;
 }

 NameCompare( const name[], const len, const name2[], const bool:case_sens=false )
 {
	new i;
	while( i < len ){
		if( name2[i] == '\0' )
			return i+1;
		if( name[i] == '\0' )
			return i;
		if( case_sens ?
			( name[i] != name2[i] ) :
			( tolower(name[i]) != tolower(name2[i]) )
		)
			return i;
		i++;
	}
	return len;
 }
 
 ActionPrint( id, print_type, apples, verb[] )
 {
	if( !apples )
		return false;
	if( apples == 1 )
		poke_print(id, print_type, "Ty %s kogos", verb);
	else
		poke_print(id, print_type, "Ty %s %d ludzi", verb, apples);
	return true;
 }
 
 CheckerNumber( CHECK_POKES:checker, bool:max )
 {
	switch( checker )
	{
		case CHECK_ACTIVE:	return (max) ? MAX_ACTIVE_POKES : 0 ;
		case CHECK_PC:		return (max) ? MAX_POKES : MAX_ACTIVE_POKES ;
		case CHECK_ALL:		return (max) ? MAX_POKES : 0 ;
	}
	return 0;
 }
 
 poke_print(index, type, const message[], any:...)
 {
	new msg[256];
	vformat(msg, 255, message, 4);
	if( type == print_center )
		client_print(index, type, msg);
	else
		client_print(index, type, "%s %s", PREFIX, msg);
 }
