14.05.2012, 22:04
Sorry
pawn Код:
CMD:pm(playerid,params[])
{
new id;
new string[256];
new pName[MAX_PLAYER_NAME];
new pName2[MAX_PLAYER_NAME];
if(sscanf(params,"us[128]",id)) return SendClientMessage(playerid,COLOR_YELLOW,"Usage:/pm [ID] [Text]");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"Player ID Doesn't Exist");
{
GetPlayerName(playerid,pName,sizeof(pName));
GetPlayerName(id,pName2,sizeof(pName2));
format(string,sizeof(string),"Private Message Recived From: [%s]: %s",pName,params);
SendClientMessage(id,COLOR_YELLOW,string);
format(string,sizeof(string),"Private Message Sent To: [%s]: %s",pName2,params);
SendClientMessage(playerid,COLOR_YELLOW,string);
format(string,sizeof(string),"%s wrote a private message to: %s! Text: %s ",pName,pName2,params);
Log("logs/PMLog.log",string);
}
return 1;
}