30/05/2019, 07:29 PM
Buenas estoy intentando implementar el rango a otro plugins de admin prefix para bloquear el hook say del sistema de rango ya que tiene bugs, pero no funciona hice lo siguiente.
al plugins adminprefix le agregue los siguientes código
no me compila me salta el siguiente error, no se si lo estoy implementado mal, si alguien sabe que estoy haciendo mal me podria explicar para lograr hacerlo bien.
ERROR AL COMPILAR
AMX Mod X Compiler 1.9.0.5241
Copyright © 1997-2006 ITB CompuPhase
Copyright © 2004-2013 AMX Mod X Team
Error: Undefined symbol "Rangos" on line 81
Warning: Expression has no effect on line 81
Error: Expected token: ";", but found "]" on line 81
Error: Invalid expression, assumed zero on line 81
Error: Too many error messages on one line on line 81
CÓDIGO SMA (SISTEMA DE RANGO)
CÓDIGO SMA DE ADMIN PREFIX
al plugins adminprefix le agregue los siguientes código
Código PHP:
new g_rango[33], rangosfile[200]
new rangos
enum _: CAMPO_RANGO}
rangos = file_size(rangosfile, 1)
en el formatex del say agregue
format(said, charsmax(said), "%s [%s]^x01 : %s", prefix, Rangos[g_rango[index]][NOMBRE], said)
no me compila me salta el siguiente error, no se si lo estoy implementado mal, si alguien sabe que estoy haciendo mal me podria explicar para lograr hacerlo bien.
ERROR AL COMPILAR
AMX Mod X Compiler 1.9.0.5241
Copyright © 1997-2006 ITB CompuPhase
Copyright © 2004-2013 AMX Mod X Team
Error: Undefined symbol "Rangos" on line 81
Warning: Expression has no effect on line 81
Error: Expected token: ";", but found "]" on line 81
Error: Invalid expression, assumed zero on line 81
Error: Too many error messages on one line on line 81
CÓDIGO SMA (SISTEMA DE RANGO)
Código PHP:
/* ===============================
Version Con Guardado adv_vault
================================*/
/* ====================================
|=* [INCLUDES] *=|
=====================================*/
#include <amxmisc>
#include <csstats>
#include <cstrike>
#include <fakemeta>
#include <adv_vault>
#include <jctf>
/* ====================================
|=* [PLUGIN / VERSION / AUTHOR] *=|
=====================================*/
new const PLUGIN[] = "RangoS"
new const VERSION[] = "1.1"
new const AUTHOR[] = "kikizon"
/* =============================================
|=* [EMPIEZA SECCION MODIFICABLE] *=|
==============================================*/
/* ====================================
|=* [CONSTANTES] *=|
=====================================*/
new const Prefijo[] = "FOS" // Prefijo en say
new const Sonido[] = "Rango/up.wav" // Sonido Rango UP
/* ====================================
|=* [CONST NOMBRES DE RANGOS] *=|
=====================================*/
enum _:DATA {
NOMBRE[32],
FRAGS,
ADRENALINA
}
new const Rangos[][DATA] = {
{ "Novato", 100 },
{ "Silver I", 200 },
{ "Silver II", 300 },
{ "Silver III", 500 },
{ "Silver IV", 700 },
{ "Silver Elite", 800 },
{ "Silver Elite Master", 900 },
{ "Gold Nova I", 1000 },
{ "Gold Nova II", 1200 },
{ "Gold Nova III", 1300 },
{ "Gold Nova Master", 1400 },
{ "Master Guardian I",1500 },
{ "Master Guardian II", 1700 },
{ "Master Guardian Elite", 1800 },
{ "Distinguido Master Guardian", 1900 },
{ "Legendary Eagle", 2000 },
{ "Legendary Eagle Master", 2100 },
{ "Supreme Master", 2200 },
{ "The Global Elite", 2500 }
}
/* ====================================
|=* [VARIABLES] *=|
=====================================*/
new g_rango[33], g_frags[33], g_playername[33][32], Data[255], Left[25], Right[50], configsdir[200], rangosfile[200]
new SyncHUD, g_maxplayers, g_msgTeamInfo, g_msgSayText, rangos, cvar_Hud, cvar_knifex2, cvar_hsx2, charnum;
new g_vault
/* ====================================
|=* [DEFINE] *=|
=====================================*/
#define TASK_HUD 2100
#define ID_HUD (taskid - TASK_HUD)
enum {
CAMPO_RANGO,
CAMPO_FRAG,
CAMPO_MAX
}
new g_campos[CAMPO_MAX]
/* ====================================
|=* [INIT] *=|
=====================================*/
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("DeathMsg", "Event_DeathMsg", "a")
register_logevent("logevent_round_end", 2, "1=Round_End")
register_clcmd("say", "message_saytext")
register_clcmd("say_team", "message_sayteam")
register_clcmd("say /rangos", "RangoSv")
register_clcmd("dar_frags", "cmd_frags", ADMIN_RCON, " ^"Nombre^" ^"Cantidad^"")
/* =============================================
|= [EMPIEZA SECCION MODIFICABLE] =|
==============================================*/
cvar_Hud = register_cvar("rangos_hud", "1") // 1 - Mostrar HUD | 0 - No Mostrar
cvar_knifex2 = register_cvar("rangos_knifex2", "1") // 1 - x2 frags con knife | 0 - NO :v
cvar_hsx2 = register_cvar("rangos_hsx2", "1") // 1 - x2 frags de HeadShot | 0 - NO :v
/* =============================================
|=* [TERMINA SECCION MODIFICABLE] *=|
==============================================*/
SyncHUD = CreateHudSyncObj()
g_maxplayers = get_maxplayers()
g_msgTeamInfo = get_user_msgid("TeamInfo")
g_msgSayText = get_user_msgid("SayText")
g_vault = adv_vault_open("data_rangos", false)
g_campos[CAMPO_RANGO] = adv_vault_register_field(g_vault, "RANGOS")
g_campos[CAMPO_FRAG] = adv_vault_register_field(g_vault, "FRAGS")
adv_vault_init(g_vault)
get_configsdir(configsdir, charsmax(configsdir))
format(rangosfile, charsmax(rangosfile), "%s/rango.cfg", configsdir)
rangos = file_size(rangosfile, 1)
}
/* ====================================
|=* [PRECACHE] *=|
=====================================*/
public plugin_precache()
precache_sound(Sonido)
/* ===================================
|=* [HUD] *=|
=====================================*/
public HUD(taskid)
{
new szMap[ 21 ]; get_mapname( szMap, charsmax( szMap ) );
new id = ID_HUD
new name[33]
get_user_name(id, name, charsmax(name))
new stats[8], body[8];
new rank = get_user_stats(id, stats, body)
new rank2 = get_statsnum()
if (!is_user_alive(id)) {
id = pev(id, pev_iuser2)
if (!is_user_alive(id)) return;
}
if(id != ID_HUD) {
set_hudmessage(242, 195, 43, 0.03, 0.14, 0, 0.0, 1.0, 0.01, 0.1)
ShowSyncHudMsg(ID_HUD, SyncHUD, "Nombre: %s^nFrags: %d^nRango: %s^n", name, g_frags[id], Rangos[g_rango[id]][NOMBRE])
} else {
set_hudmessage(242, 195, 43, 0.17, 0.0, 0, 0.0, 1.0, 0.01, 0.1)
ShowSyncHudMsg(ID_HUD, SyncHUD, "Frags: %d / %d^nRango: %s^nSig Rango: %s^nTop-Ranking: %d de %d^nAdrenalina: (%d/100)^nMapa: %s",
g_frags[id], Rangos[g_rango[id]][FRAGS] - g_frags[id], Rangos[g_rango[id]][NOMBRE], Rangos[g_rango[id]+1][NOMBRE], rank, rank2, jctf_get_adrenaline(id), szMap)
}
}
public RangoSv(id)
{
for(new i; i < rangos; i++) {
read_file(rangosfile, i, Data, charsmax(Data), charnum)
if(strlen(Data) < 2 || Data[0] == ';' || equali(Data, "//", 2))
continue
argbreak(Data, Left, charsmax(Left), Right, charsmax(Right))
remove_quotes(Left)
remove_quotes(Right)
client_print(id, print_console, "%s [%s]", Right, Left)
}
PrintText(id, "!g[!y%s!g] !yLa lista de !g/rangos !y se muestra en la !tconsola!g.", Prefijo)
}
/* ==================================
|=* [PUTINSERVER] *=|
===================================*/
public client_putinserver(id) {
get_user_name( id, g_playername[ id ], charsmax( g_playername[ ] ) );
g_rango[id] = 0
g_frags[id] = 0
Cargar(id)
if(get_pcvar_num(cvar_Hud))
set_task(1.0, "HUD", id+TASK_HUD, _, _, "b")
}
/* ==================================
|=* [DISCONNECT] *=|
===================================*/
public client_disconnected(id) {
Guardar(id);
remove_task(id+TASK_HUD)
}
/* ==================================
|=* [ROUND END] *=|
===================================*/
public logevent_round_end() {
for(new id = 1; id <= g_maxplayers; id++)
Guardar(id);
}
/* ==================================
|=* [DEATHMSG] *=|
===================================*/
public Event_DeathMsg() {
new attacker = read_data(1)
new victim = read_data(2)
new hs = read_data(3)
new weaponid = get_user_weapon(attacker)
if(victim == attacker) return;
if(is_user_alive(attacker)) {
g_frags[attacker]++
if(get_pcvar_num(cvar_knifex2)) {
if(weaponid == CSW_KNIFE)
g_frags[attacker]++
}
if(get_pcvar_num(cvar_hsx2)) {
if(hs) g_frags[attacker]++
}
AumentarRango(attacker)
}
}
/* ================================
|=* [UPDATE RANGO] *=|
=================================*/
AumentarRango(id) {
new Aumento = false
while(g_frags[id] >= Rangos[g_rango[id]][FRAGS]) {
Aumento = true
g_rango[id]++
}
if(Aumento) {
PrintText(id, "!g[!y%s!g] !yFelicidades subiste al rango!t: !g%s", Prefijo, Rangos[g_rango[id]][NOMBRE])
client_cmd(id, "spk %s", Sonido)
Aumento = false
}
}
/*=====================================
|=* [SAY] *=|
=====================================*/
public message_saytext(id) {
static said[192]
read_args(said, charsmax(said))
remove_quotes(said)
if (said[0] == '@' || said[0] == '%' || said[0] == '.' || said[0] == '!' || equal (said, ""))
return PLUGIN_HANDLED;
if (!ValidMessage(said, 1)) return PLUGIN_CONTINUE;
static color[11], name[32], alive[11]
get_user_team(id,color,charsmax(color))
get_user_name(id,name,charsmax(name))
if (is_user_alive (id)) {
alive = ""
} else {
alive = "^1*Muerto*"
}
/*=====================================
*[ACTIVAR ADM]*
ADMIN_LEVEL_B = n DUEÑO
ADMIN_LEVEL_C = o DUEÑA
ADMIN_LEVEL_E = q SUB DUEÑO
ADMIN_LEVEL_D = p ADMIN-VIP
=====================================*/
if (is_user_admin(id)) {
if (get_user_flags(id) & ADMIN_LEVEL_B)
format(said, charsmax(said), "^4[^1%s^4] ^4[^1%s^4] %s ^1(^4DUEÑO^1) ^3%s ^4: %s", Prefijo, Rangos[g_rango[id]][NOMBRE], alive, name, said)
if (get_user_flags(id) & ADMIN_LEVEL_C)
format(said, charsmax(said), "^4[^1%s^4] ^4[^1%s^4] %s ^1(^4DUEÑA^1) ^3%s ^4: %s", Prefijo, Rangos[g_rango[id]][NOMBRE], alive, name, said)
if (get_user_flags(id) & ADMIN_LEVEL_E)
format(said, charsmax(said), "^4[^1%s^4] ^4[^1%s^4] %s ^1(^4SUB^1-^4DUEÑO^1) ^3%s ^4: %s", Prefijo, Rangos[g_rango[id]][NOMBRE], alive, name, said)
if (get_user_flags(id) & ADMIN_LEVEL_D)
format(said, charsmax(said), "^4[^1%s^4] ^4[^1%s^4] %s ^1(^4ADMIN^1) ^3%s ^4: %s", Prefijo, Rangos[g_rango[id]][NOMBRE], alive, name, said)
} else {
format(said, charsmax(said), "^4[^1%s^4] %s^3 %s ^1: %s", Rangos[g_rango[id]][NOMBRE], alive, name, said)
}
static i, team[11]
for (i = 1; i <= g_maxplayers; i++) {
if (!is_user_connected(i)) continue
get_user_name(id,name,charsmax(name))
if (is_user_admin(i) || is_user_alive(id) && is_user_alive(i) || !is_user_alive(id) && !is_user_alive(i)) {
get_user_team(i, team, charsmax(team))
changeTeamInfo(i, color)
writeMessage(i, said)
changeTeamInfo(i, team)
}
}
return PLUGIN_HANDLED_MAIN;
}
public message_sayteam(id) {
static said[192]
read_args(said, charsmax(said))
remove_quotes(said)
if (said[0] == '@' || said[0] == '%' || said[0] == '/' || said[0] == '.' || said[0] == '!' || equal (said, ""))
return PLUGIN_HANDLED;
if (!ValidMessage(said, 1)) return PLUGIN_CONTINUE;
static playerTeam, playerTeamName[19]
playerTeam = get_user_team(id)
switch (playerTeam) {
case 1: copy (playerTeamName, 6, "^3[TE]")
case 2: copy (playerTeamName, 8, "^3[CT]")
default: copy (playerTeamName, 11, "^3[SPEC]")
}
static color[11], name[32], alive[11]
get_user_team(id,color,charsmax(color))
get_user_name(id,name,charsmax(name))
if (is_user_alive (id)) {
alive = ""
} else {
alive = "*Muerto* "
}
if (is_user_admin(id)) {
if (get_user_flags(id) & ADMIN_LEVEL_B)
format(said, charsmax(said), "^4[^1%s^4] ^4[^1%s^4] %s%s ^1(^4DUEÑO^1) ^3%s ^4: %s", Prefijo, Rangos[g_rango[id]], alive, playerTeam, name, said)
if (get_user_flags(id) & ADMIN_LEVEL_C)
format(said, charsmax(said), "^4[^1%s^4] ^4[^1%s^4] %s%s ^1(^4DUEÑA^1) ^3%s ^4: %s", Prefijo, Rangos[g_rango[id]], alive, playerTeam, name, said)
if (get_user_flags(id) & ADMIN_LEVEL_E)
format(said, charsmax(said), "^4[^1%s^4] ^4[^1%s^4] %s%s ^1(^4SUB^1-^4DUEÑO^1) ^3%s ^4: %s", Prefijo, Rangos[g_rango[id]], alive, playerTeam, name, said)
if (get_user_flags(id) & ADMIN_LEVEL_D)
format(said, charsmax(said), "^4[^1%s^4] ^4[^1%s^4] %s%s ^1(^4ADMIN^1) ^3%s ^4: %s", Prefijo, Rangos[g_rango[id]], alive, playerTeam, name, said)
} else {
format(said, charsmax(said), "^4[^1%s^4] %s%s ^3%s ^4: ^1%s", Rangos[g_rango[id]], alive, playerTeam, name, said)
}
static i, team[11]
for (i = 1; i <= g_maxplayers; i++) {
if (!is_user_connected(i)) continue;
get_user_name(id,name,charsmax(name))
if (get_user_team(i) == playerTeam || is_user_admin(i)) {
if (is_user_alive(id) && is_user_alive(i) || !is_user_alive(id) && !is_user_alive(i)) {
get_user_team(i, team, charsmax(team))
changeTeamInfo(i, color)
writeMessage(i, said)
changeTeamInfo(i, team)
}
}
}
return PLUGIN_HANDLED_MAIN;
}
public changeTeamInfo(player, team[]) {
message_begin(MSG_ONE, g_msgTeamInfo, _, player)
write_byte(player)
write_string(team)
message_end()
}
public writeMessage(player, message[]) {
message_begin(MSG_ONE, g_msgSayText, {0, 0, 0}, player)
write_byte(player)
write_string(message)
message_end()
}
/* ===================================
|=* [GUARDADO] *=|
=====================================*/
Guardar(id) {
adv_vault_set_start(g_vault)
adv_vault_set_field(g_vault, g_campos[CAMPO_RANGO], g_rango[id])
adv_vault_set_field(g_vault, g_campos[CAMPO_FRAG], g_frags[id])
adv_vault_set_end(g_vault, 0, g_playername[id])
}
Cargar(id) {
if(!adv_vault_get_prepare(g_vault, _, g_playername[id]))
return
g_rango[id] = adv_vault_get_field(g_vault, g_campos[CAMPO_RANGO])
g_frags[id] = adv_vault_get_field(g_vault, g_campos[CAMPO_FRAG])
}
/* ===================================
|=* [STOCKS - CHEMA] *=|
=====================================*/
stock PrintText ( const iIndex, const Text [ ], any:... ) {
new szText [ 192 ];
vformat ( szText, sizeof ( szText ), Text, 3 );
replace_all ( szText, sizeof ( szText ), "!y", "^1" );
replace_all ( szText, sizeof ( szText ), "!g", "^4" );
replace_all ( szText, sizeof ( szText ), "!t", "^3" );
static iLen = sizeof ( szText );
replace_all ( szText, iLen, "á", "á" );
replace_all ( szText, iLen, "Á", "Ã" );
replace_all ( szText, iLen, "é", "é" );
replace_all ( szText, iLen, "É", "É" );
replace_all ( szText, iLen, "í", "Ã*" );
replace_all ( szText, iLen, "Í", "Ã" );
replace_all ( szText, iLen, "ó", "ó" );
replace_all ( szText, iLen, "Ó", "Ó" );
replace_all ( szText, iLen, "ú", "ú" );
replace_all ( szText, iLen, "Ú", "Ú" );
replace_all ( szText, iLen, "ñ", "ñ" );
replace_all ( szText, iLen, "Ñ", "Ñ" );
message_begin ( iIndex ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, get_user_msgid ( "SayText" ), .player = iIndex );
write_byte ( iIndex ? iIndex : 33 );
write_string ( szText );
message_end ( );
}
/* =====================================================
|=* [Stock para Saber Si el mensaje es valido] *=|
======================================================*/
stock ValidMessage(text[], maxcount) {
static len, i, count
len = strlen(text)
count = 0
if (!len)
return false;
for (i = 0; i < len; i++) {
if (text[i] != ' ') {
count++
if (count >= maxcount)
return true;
}
}
return false;
}
public cmd_frags(id, nivel, cid) {
if (!cmd_access(id, nivel, cid, 3))
return PLUGIN_HANDLED;
new arg[33], arg2[10]
new name[32]; get_user_name(id, name, charsmax(name))
read_argv(1, arg, charsmax(arg))
read_argv(2, arg2, charsmax(arg2))
new Player = cmd_target(id, arg,CMDTARGET_ONLY_ALIVE)
new target[32]; get_user_name(Player, target, charsmax(target))
if (!Player)
{
client_print(id, print_console, "No se encuentra disponible el jugador")
return PLUGIN_HANDLED;
}
new amount = str_to_num(arg2)
g_frags[Player] += amount
// aca sumamos los frags
AumentarRango(Player) // aca tenes que poner tu checklevel asi cuando le de , checkea si puede subir de level
PrintText(id, "!g[!yAMXX!g] !yEl Admin !g%s !yte dio !g%d !t%s", name, amount, (amount > 1 ? "niveles" : "nivel"))
PrintText(id, "!g[!yAMXX!g] !yLe diste !g%d !t%s !yal jugador !g%s", amount, (amount > 1 ? "niveles" : "nivel"), target)
return PLUGIN_HANDLED;
}
CÓDIGO SMA DE ADMIN PREFIX
Código PHP:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
new g_rango[33], rangosfile[200]
new rangos
enum _:ADM_DATA { ADMIN_TYPE[ 30 ], ADMIN_FLAGS, CAMPO_RANGO }
new const Admins[][ADM_DATA] =
{
{ "[OFF]~[Dueño]", ADMIN_RCON },
{ "[OFF]~[Sub-Dueño]", ADMIN_CFG },
{ "[OFF]~[STAFF]", ADMIN_PASSWORD },
{ "[OFF]~[SOCIO-PREMIUN]", ADMIN_LEVEL_B},
{ "[OFF]~[VIP-PREMIUN]", ADMIN_LEVEL_D },
{ "[OFF]~[ADMIN-FULL]", ADMIN_LEVEL_C },
{ "[OFF]~[ADMIN-BASICO]", ADMIN_LEVEL_E }
};
new kAdminType[ 33 ][ 30 ], kMP, kPN[ 33 ][ 32 ], cvar_adminlisten, admlisten;
public plugin_init()
{
register_plugin( "Admin Say n Types" , "1.0" , "RAMBO" );
register_clcmd("say", "BlockSay")
register_clcmd("say_team", "BlockTeamSay")
// Cvar Definicion
// 0 = Los vivos no pueden leer a los muertos
// 1 = Los vivos no pueden leer a los muertos, Excepto los admins
// 2 = Todos se pueden leer
cvar_adminlisten = register_cvar( "amx_adminlisten", "2" );
admlisten = get_pcvar_num( cvar_adminlisten );
kMP = get_maxplayers();
rangos = file_size(rangosfile, 1)
}
public client_putinserver( index )
{
get_user_name( index, kPN[ index ], 31 );
kAdminType[ index ] = "^0";
if(is_user_admin( index ))
{
static i, flags; flags = get_user_flags( index );
for(i = 0 ; i < sizeof Admins ; i++ )
{
if(flags & Admins[i][ADMIN_FLAGS])
{
formatex(kAdminType[index], charsmax(kAdminType), "%s", Admins[i][ADMIN_TYPE]);
break;
}
}
}
}
public BlockSay( index )
{
static said[191];
read_args(said, charsmax(said));
remove_quotes(said);
replace_all(said, charsmax(said), "%", " "); replace_all(said, charsmax(said), "#", " ");
if (!ValidMessage(said, 1)) return PLUGIN_CONTINUE;
static color[11], prefix[91]
get_user_team(index, color, charsmax(color))
formatex(prefix, charsmax(prefix), "%s^x04%s^x03 %s",
is_user_alive( index ) ? "^x01" : "^x01*MUERTO* ", kAdminType[ index ], kPN[ index ])
if (is_user_admin(index)) format(said, charsmax(said), "^x04%s", said)
format(said, charsmax(said), "%s^x01 : %s", prefix, Rangos[g_rango[index]][NOMBRE], said)
static i, team[11];
for (i = 1; i <= kMP; i++)
{
if (!is_user_connected(i)) continue;
if( admlisten == 0 && ( is_user_alive( index ) && is_user_alive( i ) || !is_user_alive( index ) && !is_user_alive(i))
|| admlisten == 1 && (is_user_admin(i) || is_user_alive( index ) && is_user_alive( i ) || !is_user_alive( index ) && !is_user_alive(i))
|| admlisten == 2 )
{
get_user_team(i, team, charsmax(team))
changeTeamInfo(i, color)
writeMessage(i, said)
changeTeamInfo(i, team)
}
}
return PLUGIN_HANDLED_MAIN;
}
public BlockTeamSay( index )
{
static said[191];
read_args(said, charsmax(said));
remove_quotes(said);
replace_all(said, charsmax(said), "%", " "); replace_all(said, charsmax(said), "#", " ");
if (!ValidMessage(said, 1)) return PLUGIN_CONTINUE;
static playerTeam, teamname[19];
playerTeam = get_user_team(index);
switch (playerTeam)
{
case 1: formatex( teamname, 18, " ^x01[^x03 TT^x01 ] ");
case 2: formatex( teamname, 18, " ^x01[^x03 CT^x01 ] ");
default: formatex( teamname, 18, " ^x01[^x03 SPEC^x01 ] ");
}
static color[11], prefix[91]
get_user_team(index, color, charsmax(color))
formatex(prefix, charsmax(prefix), "%s%s^x04%s^x03 %s",
is_user_alive( index ) ? "^x01" : "^x01*MUERTO* ", teamname, kAdminType[ index ], kPN[ index ])
if (is_user_admin(index)) format(said, charsmax(said), "^x04%s", said)
format(said, charsmax(said), "%s^x01 : %s", prefix, said)
static i, team[11];
for (i = 1; i <= kMP; i++)
{
if (!is_user_connected(i)) continue;
if (get_user_team(i) == playerTeam)
{
if( admlisten == 0 && ( is_user_alive( index ) && is_user_alive( i ) || !is_user_alive( index ) && !is_user_alive(i))
|| admlisten == 1 && (is_user_admin(i) || is_user_alive( index ) && is_user_alive( i ) || !is_user_alive( index ) && !is_user_alive(i))
|| admlisten == 2 )
{
get_user_team(i, team, charsmax(team))
changeTeamInfo(i, color)
writeMessage(i, said)
changeTeamInfo(i, team)
}
}
}
return PLUGIN_HANDLED_MAIN;
}
public changeTeamInfo(player, team[])
{
message_begin(MSG_ONE, get_user_msgid( "TeamInfo" ), _, player)
write_byte(player)
write_string(team)
message_end()
}
public writeMessage(player, message[])
{
message_begin(MSG_ONE, get_user_msgid( "SayText" ), {0, 0, 0}, player)
write_byte(player)
write_string(message)
message_end()
}
stock ValidMessage(text[], maxcount)
{
static len, i, count;
len = strlen(text);
count = 0;
if (!len) return false;
for (i = 0; i < len; i++)
{
if (text[i] != ' ')
{
count++
if (count >= maxcount)
return true;
}
}
return false;
}
»» RENTA TU SERVIDOR EN EVOLUTIÓN-HOST ««
Si deseas contactarme para comprar tu servidor de counter-strike puedes enviar un M.P