Raised This Month: $32 Target: $400
 8% 

Team Balancer by Low Frags v4.0 [+CSDM Support]


Post New Thread Reply   
 
Thread Tools Display Modes
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-03-2012 , 05:22   Re: Team Balancer by Low Frags v4.0 [+CSDM support]
Reply With Quote #21

Don't remember your old code.

About :

g_bCsdmEnabled = g_iCsdmConVarPointer && get_pcvar_num( g_iCsdmConVarPointer );

That's something you should put where it's used. The cvar could be changed anytime.

You should avoid set_task for task with "b" flag. Creating a dummy entity and let it think would be more appropriate.
__________________

Last edited by Arkshine; 05-03-2012 at 05:24.
Arkshine is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 05-03-2012 , 05:24   Re: Team Balancer by Low Frags v4.0 [+CSDM support]
Reply With Quote #22

Okay, but is not better to get csdm_enabled's value instead of hooking it using get_cvar_pointer?
__________________
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-03-2012 , 05:35   Re: Team Balancer by Low Frags v4.0 [+CSDM support]
Reply With Quote #23

It's what you do already with get_pcvar_num( g_iCsdmConVarPointer ).

get_cvar_pointer retrieves just the pointer of the cvar. It's kind of same value what returns register_cvar for example. But here, such cvar is already registered with csdm, therefore we get it's pointer so we can use get_pcvar_* natives to retrieve the value.
You could have use get_cvar_num() one time in plugin_init() for example, but since you need call it where it's used, get_cvar_num will be inefficient (remember, such get_cvar_* natives loops on all the registered cvars and check the name to return it's pointer). In this case, more efficient to retrieve one time the cvar pointer, so we can get the value like you do with your others cvars.

In others words :

- If you need to get/set one time (like in plugin_init function) an external cvar value : use [set|get]_cvar_*() natives.
- If you need to get/set several times an external cvar value : use get_cvar_pointer in plugin_init() and use [set|get]_pcvar*() natives in your code.
__________________

Last edited by Arkshine; 05-03-2012 at 05:40.
Arkshine is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-18-2012 , 08:26   Re: Team Balancer by Low Frags v4.0 [+CSDM support]
Reply With Quote #24

No changed done. Author seems inactive. Unapproved.
__________________
Arkshine is offline
vladhks
Junior Member
Join Date: May 2012
Location: VA DAU MUIE
Old 05-20-2012 , 05:03   Re: Team Balancer by Low Frags v4.0 [+CSDM support]
Reply With Quote #25

would be nice if you add a message to players that are transferred not tell if it works
vladhks is offline
C3NsUr3
Member
Join Date: Aug 2011
Location: Romania,Resita
Old 11-26-2012 , 05:30   Re: Team Balancer by Low Frags v4.0 [+CSDM support]
Reply With Quote #26

nice plugin
C3NsUr3 is offline
Send a message via Yahoo to C3NsUr3 Send a message via Skype™ to C3NsUr3
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 01-02-2023 , 19:11   Re: Team Balancer by Low Frags v4.0 [+CSDM support]
Reply With Quote #27

Quote:
Originally Posted by Arkshine View Post
No changed done. Author seems inactive. Unapproved.
I've renewed it, I was asked by a private message and wanted to fix it.
__________________
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
iclassdon
AlliedModders Donor
Join Date: May 2006
Old 01-08-2023 , 13:47   Re: Team Balancer by Low Frags v4.0 [+CSDM Support]
Reply With Quote #28

Excellent! Looking forward to the next update.
iclassdon is offline
Send a message via MSN to iclassdon
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:19.


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