SA-MP Forums Archive
Double message - 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)
+--- Thread: Double message (/showthread.php?tid=589757)



Double message - Face9000 - 22.09.2015

This teamchat command sends double messages in chat:

First with Team Chat tag, and second like a normal chat message:

Код:
 if(text[0] == ';')
    {
        if(strlen(text) == 0 || strlen(text) > 128) return SCM(playerid,0xFF0000FF, "Write a message between 1 and 128 characters.");
    	new string[128];
    	GetPlayerName(playerid, string, sizeof(string));
    	format(string, sizeof(string), "[Team Chat] %s: %s", string, text[1]);
    	foreach (new i : Player)
		{
		    if(IsPlayerConnected(i) && gTeam[i] == gTeam[playerid])return SCM(i, GetPlayerColor(playerid), string);
    	}
    	return 1;
    }
Any help? Thanks.


Re: Double message - Sawalha - 22.09.2015

------