a different idea?
#1

Hi all, I use that:

Код:
	new
	    szName[MAX_PLAYER_NAME],
	    szBuffer[250]
	;
	GetPlayerName(playerid, szName, MAX_PLAYER_NAME);
	format(szBuffer, sizeof(szBuffer), "{58FA82}[ID:%i]%s: "CC"Utilise "CC2"[/cmd]", playerid, szName, text);
	SendClientMessageToAll(GetPlayerColor(playerid), szBuffer);
example: Salim use /cmd

I put it in my commands but that's a lot of STRING
Reply
#2

You should only use 128 bits in your szBuffer string, that's the max for SCM.
Reply
#3

Quote:
Originally Posted by Saliim
Посмотреть сообщение
Hi all, I use that:

Код:
	new
	    szName[MAX_PLAYER_NAME],
	    szBuffer[250]
	;
	GetPlayerName(playerid, szName, MAX_PLAYER_NAME);
	format(szBuffer, sizeof(szBuffer), "{58FA82}[ID:%i]%s: "CC"Utilise "CC2"[/cmd]", playerid, szName, text);
	SendClientMessageToAll(GetPlayerColor(playerid), szBuffer);
example: Salim use /cmd

I put it in my commands but that's a lot of STRING
You can use a function instead of writing this in every command:

Код:
CommandUsed(playerid, text[])
{
	new szName[MAX_PLAYER_NAME], szBuffer[128];
	GetPlayerName(playerid, szName, MAX_PLAYER_NAME);
	format(szBuffer, sizeof(szBuffer), "{58FA82}[ID:%i]%s: "CC"Utilise "CC2"%s", playerid, szName, text);
	SendClientMessageToAll(GetPlayerColor(playerid), szBuffer);
}
Usage in commands:
Код:
CommandUsed(playerid, "/yourcommandname");
Reply
#4

Thanks
Reply
#5

Solved
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)