I need dcmd pm command
#2

pawn Код:
dcmd_pm(playerid,params[])
{
  new playerid2;
  new string2[256];
  if(sscanf(params,"us[256]",playerid2,string2)) return SendClientMessage(playerid,COLOR_RED,"USAGE:/pm [ID] [Message]");
  if(!(IsPlayerConnected(playerid2))) return SendClientMessage(playerid,COLOR_RED,"Invalid ID");
  new string[256];
  new pName[MAX_PLAYER_NAME];
  GetPlayerName(playerid,pName,sizeof(pName));
  format(string,sizeof(string),"PM from %s(%d):%s",pName,playerid,string2);
  SendClientMessage(playerid,COLOR_YELLOW,string);
  PlayerPlaySound(playerid2,1054,0,0,0);
  return 1;
}
Then add on OnPlayerCommandText:
pawn Код:
dcmd(pm,2,cmdtext);
Reply


Messages In This Thread
I need dcmd pm command - by Uberanwar - 12.08.2012, 06:34
Re: I need dcmd pm command - by Cjgogo - 12.08.2012, 06:56

Forum Jump:


Users browsing this thread: 1 Guest(s)