Raised This Month: $ Target: $400
 0% 

Change hud Sprites...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 03-01-2009 , 17:15   Change hud Sprites...
Reply With Quote #1

i found this plugin here: http://forums.alliedmods.net/showthr...sprite+players

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN_NAME "Team Icon Spr"
#define PLUGIN_VERSION "1.0.4"
#define PLUGIN_AUTHOR "tuty"

#define CT_SPRITE "sprites/teamspr/ct_blue.spr"
#define T_SPRITE "sprites/teamspr/t_red.spr"

new g_ct_blue_spr;
new 
g_t_red_spr;
new 
g_sprtime;
new 
g_plugin_mode;
new 
g_cvarvalue;

public 
plugin_init()
{
    
register_pluginPLUGIN_NAMEPLUGIN_VERSIONPLUGIN_AUTHOR );
    
register_event"DeathMsg""remove_spr""a" );
    
register_logevent"logevent_round_start"2"1=Round_Start" );
    
register_clcmd"say /teamspr""CreateSprite" );
    
register_clcmd"say_team /teamspr""CreateSprite" );
    
register_clcmd"say /delspr""RemoveSprite" );
    
register_clcmd"say_team /delspr""RemoveSprite" );
    
g_sprtime register_cvar"teamspr_sprite_time""32767" );
    
g_plugin_mode register_cvar"teamspr_mode""1" );
    
register_dictionary"teamspr.txt" );
}
public 
plugin_precache()
{
    
g_ct_blue_spr precache_modelCT_SPRITE );
    
g_t_red_spr precache_modelT_SPRITE );
}
public 
logevent_round_start()
{
    
g_cvarvalue get_pcvar_numg_plugin_mode );
    new 
players32 ], numi;
    
get_playersplayersnum );
    for( 
0numi++ ) 
    {
        if( !
is_user_aliveplayers] ) )
            continue;
        
        switch( 
g_cvarvalue )
        {
            case 
0: return PLUGIN_HANDLED;
            case 
1Removeplayers] );
            case 
2:
            {
                
message_beginMSG_ALLSVC_TEMPENTITY );
                
write_byteTE_PLAYERATTACHMENT );
                
write_byteplayers] );
                
write_coord45 );
                
write_short( ( get_user_teamplayers] ) == ) ? g_t_red_spr g_ct_blue_spr ); 
                
write_shortget_pcvar_numg_sprtime ) );
                
message_end();
            }
        }
    }
    return 
PLUGIN_CONTINUE;
}
public 
CreateSpriteid )
{
    
g_cvarvalue get_pcvar_numg_plugin_mode );
    if( 
g_cvarvalue == )
    {
        
client_printidprint_chat"%L"id"CANNOT_CREATE" );
        
client_cmdid"speak buttons/blip1.wav" );
        
Removeid );
        return 
PLUGIN_HANDLED;
    }
    else if( 
g_cvarvalue != )
    {
        
client_printidprint_chat"%L"id"ALLREADY_HAVE" );
        
client_cmdid"speak buttons/blip1.wav" );
        return 
PLUGIN_HANDLED;
    }
    
message_beginMSG_ALLSVC_TEMPENTITY );
    
write_byteTE_PLAYERATTACHMENT );
    
write_byteid );
    
write_coord45 );
    
write_short( ( get_user_teamid ) == ) ? g_t_red_spr g_ct_blue_spr ); 
    
write_shortget_pcvar_numg_sprtime ) );
    
message_end();
    
    
client_printidprint_chat"%L"id"SUCCESSFULLY_CREATED" );
    
client_cmdid"speak fvox/activated.wav" );
    return 
PLUGIN_CONTINUE;
}
public 
RemoveSpriteid )
{
    
g_cvarvalue get_pcvar_numg_plugin_mode );
    if( 
g_cvarvalue == )
    {
        
client_printidprint_chat"%L"id"CANNOT_CREATE" );
        
client_cmdid"speak buttons/blip1.wav" );
        return 
PLUGIN_HANDLED;
    }
    else if( 
g_cvarvalue != )
    {
        
client_printidprint_chat"%L"id"MUST_STAY_UP" );
        
client_cmdid"speak buttons/blip1.wav" );
        return 
PLUGIN_HANDLED;
    }    
    
Removeid );
    
client_printidprint_chat"%L"id"SUCCESSFULLY_DELETED" );
    
client_cmdid"speak fvox/deactivated.wav" );
    return 
PLUGIN_CONTINUE;
}
public 
remove_spr()
{
    
Removeread_data) );
    return 
PLUGIN_CONTINUE;
}
Removeindex )
{
    
message_beginMSG_ALLSVC_TEMPENTITY );
    
write_byteTE_KILLPLAYERATTACHMENTS );
    
write_byteindex );
    
message_end();
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/ 
i thinked when we can replace the speak icone with another icons,why we cant replace a hud icone?

i posted this in script help cuz, idk when its poss. how can i change this?!
& 2. question : is this poss. to make it in fakemeta?
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:53.


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