I need dcmd pm command
#1

Hi, I need a dcmd pm command. I notice that the gamemode I am currently using doesn't have pm command.
Can someone give me a simple dcmd pm command?
I will give rep+
Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)