Showing PM
#1

Hello. I have to do a command

PmOn and PmOff

PmOn have to show me a PM sending from one player to next player.

For Example

x (ID:2) -> y(ID:10): Hello!

I have this command:
Код:
CMD:pm(playerid, params[])
{
	new id, msg[128], format_msg[128];

	if(sscanf(params, "is[128]", id, msg))
		return SendClientMessage(playerid, 0xFFFFFFAA, SERWER_TAG": /pm [playerid] [text]");

	if(!IsPlayerConnected(id))
		return SendClientMessage(playerid, 0xFF0000AA, SERWER_TAG": nie znaleziono gracza o takim ID!");

	if(id == playerid)
		return SendClientMessage(playerid, 0xFF0000AA, SERWER_TAG": nie możesz pisać sam do siebie!");

	format(format_msg, sizeof format_msg, "Wysłałeś prywatną wiadomość do %s (ID: %d).", PlayerName(id), id);
	SendClientMessage(playerid, 0x8080C0AA, format_msg);

	format(format_msg, sizeof format_msg, "Otrzymałeś prywatną wiadomość od %s (ID: %d).", PlayerName(playerid), playerid);
	SendClientMessage(id, 0x3D7D02AA, format_msg);
	format(msg, sizeof msg, "Treść: %s", msg);
	SendClientMessage(id, 0x3D7D02AA, msg);

    GameTextForPlayer(id, "~n~~n~~n~~n~~n~~n~           ~g~Nowa Prywatna Wiadomosc!", 3000, 5);

    format(format_msg, sizeof format_msg, "Gracz %s (id: %d) -> %s (id: %d): %s", PlayerName(playerid), playerid, PlayerName(id), id, msg);
	for(new a; a != GetMaxPlayers(); a++)
        if(IsPlayerAdmin(a) && id != a && playerid != a)
            SendClientMessage(a, 0x800000AA, format_msg);

	return 1;
}
What have I do to make command to show PM for admin? I'm trying to do this command with PVar, but it doesn't work.
Reply


Messages In This Thread
Showing PM - by Kotera - 09.07.2010, 17:59
Re: Showing PM - by selten98 - 09.07.2010, 23:05
Re: Showing PM - by Kotera - 10.07.2010, 17:48
Re: Showing PM - by ReVo_ - 10.07.2010, 17:53

Forum Jump:


Users browsing this thread: 1 Guest(s)