SA-MP Forums Archive
What the problem?! - 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: What the problem?! (/showthread.php?tid=470224)



What the problem?! - Another1 - 16.10.2013

Код:
public OnPlayerText(playerid, text[])
{
	new chat[200]; new name[MAX_PLAYER_NAME];
	GetPlayerName(playerid, name,sizeof (name));
	format(chat,sizeof (chat),"%s (%d): %s",name, playerid, text);
	SendPlayerMessageToAll(playerid, chat);
	return 0;
}




Re: What the problem?! - Scenario - 16.10.2013

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

You don't know what the function does, do you?


Re: What the problem?! - DanishHaq - 16.10.2013

I doubt he does...

pawn Код:
public OnPlayerText(playerid, text[])
{
    new chat[200], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(chat, sizeof(chat), "%s (%d): %s", name, playerid, text);
    SendClientMessageToAll(0xFFFFFFFF, chat);
    return 0;
}
I never even knew that the SendPlayerMessageToAll function existed.


Re: What the problem?! - Patrick - 16.10.2013

Use SendClientMessageToAll instead of SendPlayerMessageToAll, I suggest you reading the sa-mp wikipedia before you start scripting.


Re: What the problem?! - Another1 - 16.10.2013

Quote:
Originally Posted by pds2k12
Посмотреть сообщение
Use SendClientMessageToAll instead of SendPlayerMessageToAll, I suggest you reading the sa-mp wikipedia before you start scripting.
i will do =)

and thanks DanishHaq