SA-MP Forums Archive
MAX_PLAYER_NAME - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: MAX_PLAYER_NAME (/showthread.php?tid=175469)



MAX_PLAYER_NAME - Scarface~ - 10.09.2010

Instead of using MAX_PLAYER_NAME can i use [24]; as 24 is the max limit of player name allowed, will it use less CPU or stay the same ?


Re: MAX_PLAYER_NAME - Nero_3D - 10.09.2010

if you look in your a_samp.inc you will find out that MAX_PLAYER_NAME is defined as (24) and you would change nothing at all


Re: MAX_PLAYER_NAME - Scarface~ - 10.09.2010

Okay nevermind then, trying to reduce alota CPU


Re: MAX_PLAYER_NAME - Calgon - 10.09.2010

Changing the number to 24 from the macro really wouldn't change anything.


Re: MAX_PLAYER_NAME - Zamaroht - 10.09.2010

A #define is processed in compile-time. That is, when you press the compile button, the script searches every MAX_PLAYER_NAME in your script, and replaces it with a 24. Afterwards, it compiles.
It is advised to use the macros, because in case any sa-mp limit changes in a future version (for example, sa-mp might end up supporting a max player name of 30 characters), you would just need to recompile your script, and not change every single number in your whole script.