Showing PM
#2

Quote:

enum PlayerData
{
Admin,
};
new PlayerInfo[MAX_PLAYERS][PlayerData];

command like this
Quote:

CMDm(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);
if(PlayerInfo[playerid][Admin] == 1; SendClientMessage(playerid,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;
}

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: 2 Guest(s)