SA-MP Forums Archive
commands /pm - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: commands /pm (/showthread.php?tid=442439)



commands /pm - 26_RUSSS - 07.06.2013

help me commands /pm


Re: commands /pm - Guest123 - 07.06.2013

go to your samp folder, > filerscripts> baseaf.amx just load that, its already have the Pm filerscripts


Re: commands /pm - Jarnu - 07.06.2013

pawn Код:
CMD:pm(playerid, params[])
{
   new str[128], str2[128], id, adminstr[128];
   if(sscanf(params,"ds[128]", id, str2)) return SendClientMessage(playerid, red,"USAGE: /pm [id] [message]");
   if(IsPlayerConnected(id))
   {
       if(id != playerid)
       {
                format(str, sizeof(str),"PM to [%d]%s: %s", id, PlayerName2(id), str2);
                SendClientMessage(playerid, yellow, str);
                format(str, sizeof(str),"PM from [%d]%s: %s", playerid, PlayerName2(playerid), str2);
                SendClientMessage(id, yellow, str);
                SendClientMessage(id, -1,"Use "cblue"/rpm [message] "cwhite"to reply to this PM");
                format(adminstr, sizeof(adminstr),"PM from %s[%d] to %s[%d]: %s", PlayerName2(playerid), playerid, PlayerName2(id), id, str2);
                MessageTo4(grey, adminstr);
                LastPm[id] = playerid;
           }
       else return SendClientMessage(playerid, red,"You cannot PM yourself");
   }
   else return SendClientMessage(playerid, red,"Player is not connected");
   return 1;
}
Example of PM command.