Raised This Month: $95 Target: $400
 23% 

Team Icon Spr [1.0.5] [CSDM Supported]


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff        Approver:   Hawk552 (427)
tuty
Veteran Member
Join Date: Jul 2008
Location: Romania
Old 02-07-2009 , 07:57   Team Icon Spr [1.0.5] [CSDM Supported]
Reply With Quote #1

Team Icon Spr
v1.0.5

Description:

- Plugin was requested here http://forums.alliedmods.net/showthread.php?t=85175
- Well, this plugin make a Team icon sprite up on your head when you type a command in chat ^^
- This plugin works in CS 1.6 and CZ

Commands:

- say /teamspr - make a sprite on your head
- say /delspr - delete the sprite if exists
- If
teamspr_mode is set to "2", the commands will be blocked.

Cvars:

-
teamspr_mode:

0 - plugin disabled
1 - players can activate/dezactivate the icon sprite
2 - on round start, all players will have icons up on head and can't be dezactivated with chat command, only changing cvar in 1 or 0.

- teamspr_sprite_time - 32767 (the time until sprite will be destroyed)


REUPDATED...

- Added support for csdm, optimised code, fixed some stuff (2015)


Recomandation's:

-
download the sprites archive and put the teamspr folder in sprites/ dir.
- put the teamspr.txt in data/lang dir.

Credits:

-
anakin_cstrike(for optimizations)


Images:



Added support for CSDM!

Attached Files
File Type: zip required_sprites.zip (899 Bytes, 6494 views)
File Type: sma Get Plugin or Get Source (Team_Spr.sma - 2966 views - 4.4 KB)
File Type: txt teamspr.txt (2.3 KB, 194 views)
File Type: sma Get Plugin or Get Source (Team_Spr_v105.sma - 878 views - 3.6 KB)
__________________
All my lifetime work is there (includin private big ass plugins and stuff) https://github.com/tutyamxx


Last edited by tuty; 12-20-2015 at 07:39. Reason: updated1
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 02-07-2009 , 08:02   Re: Team Icon Spr
Reply With Quote #2

Looks funny, although the code could be more optimized.
__________________
hleV is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: Romania
Old 02-07-2009 , 08:11   Re: Team Icon Spr
Reply With Quote #3

updated a bit ;/
__________________
All my lifetime work is there (includin private big ass plugins and stuff) https://github.com/tutyamxx

tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 02-07-2009 , 08:16   Re: Team Icon Spr
Reply With Quote #4

i suggest to do this like it done in Day Of Defeat, only your team will see this sprite, would be better
__________________
xPaw is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: Romania
Old 02-07-2009 , 08:17   Re: Team Icon Spr
Reply With Quote #5

i think is impossible
__________________
All my lifetime work is there (includin private big ass plugins and stuff) https://github.com/tutyamxx

tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-07-2009 , 08:26   Re: Team Icon Spr
Reply With Quote #6

Quote:
Originally Posted by tuty View Post
i think is impossible

message_begin(MSG_ALL, SVC_TEMPENTITY);

Possible with MSG_ONE_UNRELIABLE


You don't need to check is_user_connected if you have previously checked is_user_alive, also is_user_alive should return 0 with HLTVs

You misuse ResetHUD event.
__________________
- tired and retired -

Last edited by ConnorMcLeod; 02-07-2009 at 08:29.
ConnorMcLeod is offline
crazyeffect
Veteran Member
Join Date: Jul 2008
Location: Belgium
Old 02-07-2009 , 09:04   Re: Team Icon Spr
Reply With Quote #7

Cool
__________________
crazyeffect is offline
Send a message via MSN to crazyeffect
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 02-07-2009 , 09:14   Re: Team Icon Spr
Reply With Quote #8

PHP Code:
switch(get_user_team(id))
    {
        case 
1:
        {
            
write_short(g_t_red_spr);
        }
        case 
2:
        {
            
write_short(g_ct_blue_spr);
        }
    } 
->
PHP Code:
write_short( ( get_user_teamid )==1) ? g_t_red_spr g_ct_red_spr ); 
PHP Code:
public reset_hud()
{
    new 
id;
    for(
id 1id <= get_maxplayers(); id++) 
Cache the value in plugin_init, like this:
PHP Code:
new g_maxplayers;
// ..
public plugin_init() g_maxplayers get_maxplayers();

// and use like this
for(new id 1id <= g_maxplayersid++) 
Why ? because is not called at every loop
__________________

anakin_cstrike is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 02-07-2009 , 09:24   Re: Team Icon Spr
Reply With Quote #9

Quote:
Originally Posted by xPaw View Post
i suggest to do this like it done in Day Of Defeat, only your team will see this sprite, would be better
A possibility to use which one you want would be nice.
SnoW is offline
Send a message via MSN to SnoW
tuty
Veteran Member
Join Date: Jul 2008
Location: Romania
Old 02-07-2009 , 10:11   Re: Team Icon Spr
Reply With Quote #10

Quote:
Originally Posted by ConnorMcLeod View Post
message_begin(MSG_ALL, SVC_TEMPENTITY);

Possible with MSG_ONE_UNRELIABLE


You don't need to check is_user_connected if you have previously checked is_user_alive, also is_user_alive should return 0 with HLTVs

You misuse ResetHUD event.

i tryed .. fatal error ^^ lol

EDIT: updated
__________________
All my lifetime work is there (includin private big ass plugins and stuff) https://github.com/tutyamxx


Last edited by tuty; 02-07-2009 at 13:13.
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
Reply


Thread Tools
Display Modes

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 13:48.


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