Raised This Month: $ Target: $400
 0% 

Team color sprite!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Podarok
BANNED
Join Date: Jan 2011
Location: Narnia
Old 06-13-2011 , 15:13   Team color sprite!
Reply With Quote #1

Hello! Please help me! I wanted to make this sprite in team colors, but while compiling I got tag mismatch! Please help me fixing it!
PHP Code:
// Create the lightning
    
new id CS_TEAM_T
    
if ( cs_get_user_team(id) )
    
Create_TE_BEAMENTSiCasteriTargetg_iSprites[SPR_LIGHTNING], 01510iLineWidth100255255255);
    else 
    
Create_TE_BEAMENTSiCasteriTargetg_iSprites[SPR_LIGHTNING], 01510iLineWidth1002550255); 
Podarok is offline
Clauu
Senior Member
Join Date: Feb 2008
Location: RO
Old 06-13-2011 , 15:57   Re: Team color sprite!
Reply With Quote #2

Code:
new id = CS_TEAM_T 
    if ( cs_get_user_team(id) )

wth is this? id is a player index.
Clauu is offline
Podarok
BANNED
Join Date: Jan 2011
Location: Narnia
Old 06-13-2011 , 16:03   Re: Team color sprite!
Reply With Quote #3

Yes, I know, but, if i write just without new id = CS_TEAM_T , then I will get undefined symbol!
Podarok is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 06-13-2011 , 16:07   Re: Team color sprite!
Reply With Quote #4

Don't forget to include cstrike.

Code:
new players[ 32 ] , num , i , id get_players( players , num ) for( i = 0; i < num; i++ ) {      id = players[ i ]      new CsTeams:team = cs_get_user_team( id )      switch( team )      {           case CS_TEAM_T: // blabla           case CS_TEAM_CT: //blabla      } }
__________________
You can do anything you set your mind to, man.

Devil259 is offline
Clauu
Senior Member
Join Date: Feb 2008
Location: RO
Old 06-13-2011 , 16:08   Re: Team color sprite!
Reply With Quote #5

Because you must have that id, it depends of what kind of function do you have.

LE:
see Devil259's posted code.

Last edited by Clauu; 06-13-2011 at 16:13.
Clauu is offline
Podarok
BANNED
Join Date: Jan 2011
Location: Narnia
Old 06-13-2011 , 16:19   Re: Team color sprite!
Reply With Quote #6

Omfg, you're my hero! IT WORKS! THANKS A LOT! (@ - Devil259 )
Podarok is offline
Podarok
BANNED
Join Date: Jan 2011
Location: Narnia
Old 06-13-2011 , 16:30   Re: Team color sprite!
Reply With Quote #7

But, again problem, in game it mixses two colors together whether the team is T or CT...
Podarok is offline
Podarok
BANNED
Join Date: Jan 2011
Location: Narnia
Old 06-13-2011 , 16:31   Re: Team color sprite!
Reply With Quote #8

Maybe that is because all the plugin uses get_user_team and here I insered cs_get_user_team? Can you make it with get_user_team please?
Podarok is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 06-14-2011 , 03:30   Re: Team color sprite!
Reply With Quote #9

I don't think using get_user_team will work better...
__________________
You can do anything you set your mind to, man.

Devil259 is offline
Podarok
BANNED
Join Date: Jan 2011
Location: Narnia
Old 06-14-2011 , 07:11   Re: Team color sprite!
Reply With Quote #10

So, then why is he mixing up this two colors? I have made blue for CT and red for T, and in result my sprite has mixed up and now it is violet... Any idea?
Podarok is offline
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 23:23.


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