Raised This Month: $12 Target: $400
 3% 

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: UK
Old 02-07-2009 , 06: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, 6888 views)
File Type: sma Get Plugin or Get Source (Team_Spr.sma - 3578 views - 4.4 KB)
File Type: txt teamspr.txt (2.3 KB, 516 views)
File Type: sma Get Plugin or Get Source (Team_Spr_v105.sma - 1508 views - 3.6 KB)
__________________

Last edited by tuty; 12-20-2015 at 06: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 , 07: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: UK
Old 02-07-2009 , 07:11   Re: Team Icon Spr
Reply With Quote #3

updated a bit ;/
__________________
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 , 07: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: UK
Old 02-07-2009 , 07:17   Re: Team Icon Spr
Reply With Quote #5

i think is impossible
__________________
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 , 07: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 -

- my plugins -

Last edited by ConnorMcLeod; 02-07-2009 at 07:29.
ConnorMcLeod is offline
crazyeffect
Veteran Member
Join Date: Jul 2008
Location: Belgium
Old 02-07-2009 , 08: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 , 08: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 , 08: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: UK
Old 02-07-2009 , 09: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
__________________

Last edited by tuty; 02-07-2009 at 12: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 12:09.


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