PM command
#7

Line 1992
Код:
format(str, sizeof(str),"PM to [%d]%s: %s", id, GetPlayerName(id), str2);
Line 1994
Код:
format(str, sizeof(str),"PM from [%d]%s: %s", playerid, GetPlayerName(playerid), str2);
Line 1997
Код:
	format(adminstr, sizeof(adminstr),"PM from %s[%d] to %s[%d]: %s", GetPlayerName(playerid), playerid, GetPlayerName(id), id, str2);
Full CODE

Код:
CMD:pm(playerid, params[])
{
   new str[128], str2[128], id, adminstr[128];
   if(sscanf(params,"ds[128]", id, str2)) return SendClientMessage(playerid, COLOR_YELLOW,"USAGE: /pm [id] [message]");
   if(IsPlayerConnected(id))
   {
	   if(id != playerid)
	   {
		   if(DND[id] == 0)
		   {
		   		format(str, sizeof(str),"PM to [%d]%s: %s", id, GetPlayerName(id), str2);
		   		SendClientMessage(playerid, COLOR_YELLOW, str);
		   		format(str, sizeof(str),"PM from [%d]%s: %s", playerid, GetPlayerName(playerid), str2);
		   		SendClientMessage(id, COLOR_YELLOW, str);
		   		SendClientMessage(id, -1,"Use "cyellow"/rpm [message] "cwhite"to reply to this PM");
		   		format(adminstr, sizeof(adminstr),"PM from %s[%d] to %s[%d]: %s", GetPlayerName(playerid), playerid, GetPlayerName(id), id, str2);
		   		SendClientMessageToAll(COLOR_WHITE, adminstr);
		   		LastPm[id] = playerid;
		   }
		   else return SendClientMessage(playerid, COLOR_RED,"That player is in do not disturb mode!");
	   }
	   else return SendClientMessage(playerid, COLOR_RED,"You cannot PM yourself");
   }
   else return SendClientMessage(playerid, COLOR_RED,"Player is not connected");
   return 1;
}
Reply


Messages In This Thread
PM command - by KamalBa - 23.06.2015, 08:56
Re: PM command - by Hessu - 23.06.2015, 09:24
Re: PM command - by KamalBa - 23.06.2015, 09:41
Re: PM command - by KamalBa - 23.06.2015, 10:06
Re: PM command - by AndySedeyn - 23.06.2015, 10:11
Re: PM command - by KamalBa - 23.06.2015, 10:50
Re: PM command - by KamalBa - 23.06.2015, 10:54
Re: PM command - by KamalBa - 23.06.2015, 11:01
Re: PM command - by Hessu - 23.06.2015, 11:07
Re: PM command - by Threshold - 23.06.2015, 11:19

Forum Jump:


Users browsing this thread: 1 Guest(s)