string
#3

No, don't use MAX_PLAYERS. MAX_PLAYERS is not a variable, it's a define. The maximum number of players a server can hold (this by default is 500, even if you change the number in your server.cfg file). Therefore you're creating a new variable which has 500 characters. You only need to use 128 characters (Unless you need less or more). If you really want to save some bytes, Use a string counter. So:

pawn Код:
new mychar[128]; //Your 128 (or a lower character) character variable
format(mychar,sizeof(mychar), "Your text here"); //Formatting
SendClientMessage(playerid, -1, mychar); //Send the formatted message




Source Samp Wiki
Reply


Messages In This Thread
string - by audriuxxx - 14.03.2013, 22:22
Re: string - by Ryan_Bowe - 15.03.2013, 00:24
Re: string - by Neil. - 15.03.2013, 00:29
Re: string - by Glad2BeHere - 15.03.2013, 00:52

Forum Jump:


Users browsing this thread: 1 Guest(s)