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

get_user_team get name team not id :/


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ReD MaN
Member
Join Date: Jun 2014
Location: i dont Know --'
Old 07-31-2014 , 16:14   get_user_team get name team not id :/
Reply With Quote #1

hi all, i want to get_user_team with name team not id and thanks


sorry for bad english :/
__________________
Forum logo : No Steam = No Support
ReD MaN is offline
NikKOo31
Senior Member
Join Date: May 2013
Location: Home
Old 07-31-2014 , 16:25   Re: get_user_team get name team not id :/
Reply With Quote #2

Quote:
Originally Posted by ReD MaN View Post
hi all, i want to get_user_team with name team not id and thanks


sorry for bad english :/
Did you mean to get all players of a team?
PHP Code:
new players[32], num
get_players
(playersnum"e""CT"
__________________
Hey ^_^
NikKOo31 is offline
ReD MaN
Member
Join Date: Jun 2014
Location: i dont Know --'
Old 07-31-2014 , 16:29   Re: get_user_team get name team not id :/
Reply With Quote #3

Quote:
Originally Posted by NikKOo31 View Post
Did you mean to get all players of a team?
PHP Code:
new players[32], num
get_players
(playersnum"e""CT"
Yes, But i want to show Team Name With Hud !!
__________________
Forum logo : No Steam = No Support
ReD MaN is offline
NikKOo31
Senior Member
Join Date: May 2013
Location: Home
Old 07-31-2014 , 17:37   Re: get_user_team get name team not id :/
Reply With Quote #4

That's totally different :p

PHP Code:
    buffer[32]
    switch(
get_user_team(id))
    {
        case 
0copy(buffer31"unasigned")
        case 
1copy(buffer31"terrorist")
        case 
2copy(buffer31"counter-terrorist")
        case 
3copy(buffer31"spectator")
    } 
You can use the buffer in your hud
__________________
Hey ^_^
NikKOo31 is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 07-31-2014 , 17:39   Re: get_user_team get name team not id :/
Reply With Quote #5

I think he can make a constant with the names and use get_user_team(id) as an index.
Also, he can get the team name with a string from the same native:
PHP Code:
new szTeam[10]; get_user_team(idszTeamcharsmax(szTeam)) 
It will return: UNASSIGNED, TERRORIST, CT, SPECTATOR.
__________________

Last edited by Flick3rR; 07-31-2014 at 17:40.
Flick3rR is offline
Send a message via Skype™ to Flick3rR
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-31-2014 , 17:43   Re: get_user_team get name team not id :/
Reply With Quote #6

Quote:
Originally Posted by NikKOo31 View Post
That's totally different :p

PHP Code:
    buffer[32]
    switch(
get_user_team(id))
    {
        case 
0copy(buffer31"unasigned")
        case 
1copy(buffer31"terrorist")
        case 
2copy(buffer31"counter-terrorist")
        case 
3copy(buffer31"spectator")
    } 
You can use the buffer in your hud
While I think this is the best method to use for something like this, you should instead be using cs_get_user_team() along with the defined constants for teams (for the cases).
__________________
fysiks is offline
ReD MaN
Member
Join Date: Jun 2014
Location: i dont Know --'
Old 07-31-2014 , 18:20   Re: get_user_team get name team not id :/
Reply With Quote #7

Quote:
Originally Posted by NikKOo31 View Post
That's totally different :p

PHP Code:
    buffer[32]
    switch(
get_user_team(id))
    {
        case 
0copy(buffer31"unasigned")
        case 
1copy(buffer31"terrorist")
        case 
2copy(buffer31"counter-terrorist")
        case 
3copy(buffer31"spectator")
    } 
You can use the buffer in your hud
Thanks is works, i have Target Spectator :/ when i spec player i show my team not team player
can you Fix This problem ?
__________________
Forum logo : No Steam = No Support
ReD MaN is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 07-31-2014 , 18:23   Re: get_user_team get name team not id :/
Reply With Quote #8

You should use spectated player's index instead of 'id', which is probably your index.
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
ReD MaN
Member
Join Date: Jun 2014
Location: i dont Know --'
Old 07-31-2014 , 18:31   Re: get_user_team get name team not id :/
Reply With Quote #9

Ok
__________________
Forum logo : No Steam = No Support
ReD MaN is offline
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 19:23.


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