Raised This Month: $ Target: $400
 0% 

Change hud Sprites...


Post New Thread Reply   
 
Thread Tools Display Modes
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
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-01-2009 , 17:24   Re: Change hud Sprites...
Reply With Quote #2

Not possible, it's client-side.
Arkshine is offline
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 03-01-2009 , 17:25   Re: Change hud Sprites...
Reply With Quote #3

This is impossible.

Edit: Arkshine beat me to it.
BOYSplayCS is offline
padilha007
Senior Member
Join Date: Jul 2008
Old 03-01-2009 , 18:19   Re: Change hud Sprites...
Reply With Quote #4

you can explain BOYSplayCS?
__________________

padilha007 is offline
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 03-01-2009 , 19:53   Re: Change hud Sprites...
Reply With Quote #5

Because hud icons are completely client-side and cannot be changed by using AMXX. The only way you could accomplish what you want is to hack the users files and install and upload the sprite. Which also, cannot be done with AMXX.
BOYSplayCS is offline
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 03-01-2009 , 19:54   Re: Change hud Sprites...
Reply With Quote #6

Users can change their hud sprites by using the site fpsbanana.com and following the step-by-step tutorial.
BOYSplayCS is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 03-02-2009 , 04:12   Re: Change hud Sprites...
Reply With Quote #7

Hm... Ty all for answers....u know i cant understand why its not possible cuz the players has only download the sprites...can anyone say me more details for this?this is anything like models...player have just to download the models & this will all be replaced on the server.i dont think that this is a hack or ...

here the code that i tried. ( not testet cuz im @ School )
PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN_NAME "hud spr test"
#define PLUGIN_VERSION "1"
#define PLUGIN_AUTHOR "one"

#define hud_SPRITE "sprites/640hud72134.spr"

new g_ct_blue_spr;
new 
g_t_red_spr;
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" );
    
g_plugin_mode register_cvar"teamspr_mode""1" );

}
public 
plugin_precache()
{
    
g_ct_blue_spr precache_modelhud_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 ); 
                
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 ); 
    
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 );
    }
/* Plugin generated by AMXX-Studio */ 
sprite + hud pic attached.



if u wanna try this just rename the sprite file to 640hud7.spr & copy in sprites folder. its only 1 sprite file

Please give me more info...i found no doc for this
Attached Files
File Type: rar 640hud72134.rar (6.9 KB, 212 views)
__________________
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
Reply



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