Raised This Month: $ Target: $400
 0% 

Question about effiency


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 05-06-2011 , 02:30   Question about effiency
Reply With Quote #1

I use the native cs_get_user_team on every spawn and re spawn for my players as well as player death and in functions also called by the spawns.


So would it be more efficient to use an array in round_start looping the players and adding the "CS_TEAM_ID" to the array per player then accessing it to check each players team to give certain things?

or would it be better to use cs_get_user_team in like player spawn/death and then pass it to the different functions?
Doc-Holiday is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-06-2011 , 02:33   Re: Question about effiency
Reply With Quote #2

Spawn / Respawn / Death are not called very often, i would stick with the native.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 05-06-2011 , 02:56   Re: Question about effiency
Reply With Quote #3

Quote:
Originally Posted by ConnorMcLeod View Post
Spawn / Respawn / Death are not called very often, i would stick with the native.
Thanks..

PHP Code:
if(cs_get_user_team(id) == g_VIPteam && id != g_iVIPid);
{
      
ColorChat(idRED"[%s] ^4%s ^1is VIP this round. Stick together team!"PrefixNamevName);

How is that an Empty Statement
Doc-Holiday is offline
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 05-06-2011 , 05:17   Re: Question about effiency
Reply With Quote #4

; after if()
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 05-06-2011 , 14:20   Re: Question about effiency
Reply With Quote #5

Quote:
Originally Posted by DarkGod View Post
; after if()

LOL im blind.. i saw that when i woke... ive been trying to get this new mod done lol... good eye. im exhausted i havnt slept much.
Doc-Holiday 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 04:27.


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