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

Solved set_lights in cvar


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 06-30-2020 , 06:23   Re: set_lights in cvar
Reply With Quote #13

PHP Code:
new buffer[size]
get_pcvar_string(cvarbuffercharsmax(buffer))
//do something with buffer 
This is more or less pseudocode, adapt it to your situation. The idea is you do not pass the size of a string manually, you use charsmax() to determine it automatically. This way, you don't pass a wrong value and if you ever change the string size then you do not need to change it in every function that uses it.
__________________

Last edited by HamletEagle; 06-30-2020 at 06:25.
HamletEagle is offline
 



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:13.


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