SA-MP Forums Archive
Help Me. - 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: Help Me. (/showthread.php?tid=335102)



Help Me. - RipLagger - 17.04.2012

Код:
//==============================================================================
// Gang Tag
//==============================================================================
	if(text[0])
	{
		new string[128];
		new gangid = 0;
		if(AccInfo[playerid][gang]) format(string, sizeof(string), "[ %s ] %s ( %d ): %s",GangInfo[gangid][GANG_NAME],GetPlayerName(playerid),playerid,text);
		else format(string, sizeof(string), "%s ( %d ) : %s",  GetPlayerName(playerid), playerid, text);
 		SendPlayerMessageToAll(GetPlayerColor(playerid), string);
 		return SendClientMessageToAll(GetPlayerColor(playerid), string);
	}
warning:
Quote:

D:\GTASAN~1\GAMEMO~1\SATDM_~1.PWN(2620) : warning 202: number of arguments does not match definition
D:\GTASAN~1\GAMEMO~1\SATDM_~1.PWN(2620) : warning 202: number of arguments does not match definition
D:\GTASAN~1\GAMEMO~1\SATDM_~1.PWN(2621) : warning 202: number of arguments does not match definition
D:\GTASAN~1\GAMEMO~1\SATDM_~1.PWN(2621) : warning 202: number of arguments does not match definition




Re: Help Me. - MP2 - 17.04.2012

SendPlayerMessageToAll needs a playerid.


Re: Help Me. - RipLagger - 17.04.2012

Quote:
Originally Posted by MP2
Посмотреть сообщение
SendPlayerMessageToAll needs a playerid.
the SendPlayerMessageToAll already have a playerid.


Re: Help Me. - skyline_GTR - 17.04.2012

SendPlayerMessageToAll needs a playerid.

MP2 Right


Re: Help Me. - Ironboy - 17.04.2012

https://sampwiki.blast.hk/wiki/SendPlayerMessageToAll


Re: Help Me. - aRoach - 17.04.2012

So:
pawn Код:
SendClientMessageToAll(GetPlayerColor(playerid), string);
Will be:
pawn Код:
SendClientMessageToAll(playerid, GetPlayerColor(playerid), string);



Re: Help Me. - RipLagger - 17.04.2012

solved by me . warning from the GetPlayerName XD


Re: Help Me. - MP2 - 17.04.2012

No. There is no color. Look at the wiki.


Re: Help Me. - aRoach - 17.04.2012

MP2, he has said GetPlayerName:
pawn Код:
format(string, sizeof(string), "%s ( %d ) : %s",  GetPlayerName(playerid), playerid, text);