PM command
#9

Try this

pawn Код:
CMD:pm(playerid, params[])
{
   new id, str[128], str2[128], adminstr[128], YourName[24], OtherPlayerName[24];
   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)
           {
                GetPlayerName(playerid, YourName, sizeof(YourName));
                GetPlayerName(id, OtherPlayerName, sizeof(OtherPlayerName));

                format(str, sizeof(str),"PM to [%d]%s: %s", id, OtherPlayerName, str2);
                SendClientMessage(playerid, COLOR_YELLOW, str);
                format(str, sizeof(str),"PM from [%d]%s: %s", playerid, YourName, str2);
                SendClientMessage(id, COLOR_YELLOW, str);
                SendClientMessage(id, -1,"Use {FFFF33}/rpm [message] {FFFFFF}to reply to this PM");
                format(adminstr, sizeof(adminstr),"PM from %s[%d] to %s[%d]: %s", YourName, playerid, OtherPlayerName, 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)