AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Doubt, pick up names times (https://forums.alliedmods.net/showthread.php?t=317587)

FeehSK 07-20-2019 14:51

Doubt, pick up names times
 
I wanted to know if this code is correct to get a player's name from each team.

if (cs_get_user_team (ibestplayerT) == CS_TEAM_T)
{
get_user_name (ibestplayerT, xPlayerNameT, 31)
}

if (cs_get_user_team (ibestplayerCT) == CS_TEAM_CT)
{
get_user_name (ibestplayerCT, xPlayerNameCT, 31)
}

edon1337 07-20-2019 14:55

Re: Doubt, pick up names times
 
Judging from variable name 'ibestplayerT', you know that he is a Terrorist, so why are you still checking his team? Same goes for ibestplayerCT.

FeehSK 07-20-2019 15:01

Re: Doubt, pick up names times
 
Quote:

Originally Posted by edon1337 (Post 2659889)
Judging from variable name 'ibestplayerT', you know that he is a Terrorist, so why are you still checking his team? Same goes for ibestplayerCT.

So I asked if it's correct, what would be the correct code?

thEsp 07-20-2019 15:06

Re: Doubt, pick up names times
 
It does not matter what team player is, you can still get his name in "universal" way.

FeehSK 07-20-2019 15:07

Re: Doubt, pick up names times
 
Quote:

Originally Posted by thEsp (Post 2659896)
It does not matter what team player is, you can still get his name in "universal" way.

Yes, but in case I want to get better from each team

edon1337 07-20-2019 15:09

Re: Doubt, pick up names times
 
You need to tell me what the purpose of the plugin is so I can judge the correctness.

FeehSK 07-20-2019 15:11

Re: Doubt, pick up names times
 
Quote:

Originally Posted by edon1337 (Post 2659900)
You need to tell me what the purpose of the plugin is so I can judge the correctness.

It is when to give x round, to show the best player of each team

edon1337 07-20-2019 15:27

Re: Doubt, pick up names times
 
Send the full code.

OciXCrom 07-20-2019 16:47

Re: Doubt, pick up names times
 
There is an entire section related for help about scripting. Why did you post in the plugin requests one?

FeehSK 07-20-2019 17:36

Re: Doubt, pick up names times
 
Quote:

Originally Posted by OciXCrom (Post 2659911)
There is an entire section related for help about scripting. Why did you post in the plugin requests one?

Sorry, I'm new to the forum.


All times are GMT -4. The time now is 04:19.

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