PM ADV BAN [HELP]
#7

Quote:
Originally Posted by Yaa
Посмотреть сообщение
PHP код:

new InvalidWords[][100] =
{
     
"0.",
     
"1.",
     
"2.",
     
"3.",
     
"4.",
     
"5.",
     
"6.",
     
"7.",
     
"8.",
     
"9."
};
COMMAND:pm(playeridparams[])
{
 if(
playerData[playerid][playerLoggedIn])
 {
  new 
input[120], message[250], message2[250], otherPlayer;
  if(
sscanf(params"us[100]"otherPlayerinput))
  {
   
SendClientMessage(playeridCOLOR_WHITE"{B7B7B7}[SERVER] {FFFF00}Usage: \"pm <player> <message>\"");
  }
  else
  {
   if(
strfind(inputInvalidWords[playerid], true) != -1) return SendClientMessage(playeridCOLOR_RED" Sharing Ip's is Adv and this isn't allowed !");
   if (
playerid == otherPlayer)
   {
    
// Cannot send yourself a PM
    
SendClientMessage(playeridCOLOR_WHITE"{FF0404}[ERROR] {FFFF00}You cannot send yourself a PM.");
   }
   else
   {
    
// Check if player is connected
    
if(IsPlayerConnected(otherPlayer))
    {
     if(
playerData[otherPlayer][playerLoggedIn])
     {
      if(!
playerData[otherPlayer][playerBlockPMs] || playerData[otherPlayer][playerBlockPMs] && playerData[playerid][playerLevel] >= 1)
      {
       new 
from[24], otherName[24];
       
GetPlayerName(otherPlayerotherNamesizeof(otherName));
       
format(messagesizeof(message), "{FFBF00}[PM] {FFFFFF}To %s(%i): %s"otherNameotherPlayerinput);
       
SendClientMessage(playeridCOLOR_WHITEmessage);
       
GetPlayerName(playeridfromsizeof(from));
       
format(message2sizeof(message2), "{FFBF00}[PM] {FFFFFF}From %s(%i): %s"fromplayeridinput);
       
SendClientMessage(otherPlayerCOLOR_WHITEmessage2);
             
PlayerPlaySound(otherPlayer1139,0.0,0.0,0.0);
       
playerData[playerid][lastRecipient] = otherPlayer;
       for(new 
0<= MAX_PLAYERSi++)
       {
        if(
IsPlayerConnected(i))
        {
         if(
playerData[i][playerLoggedIn])
         {
          if (
playerData[i][playerLevel] >= 4)
          {
           if (
playerData[i][pmSpy])
           {
            new 
spyText[200];
            
format(spyTextsizeof(spyText), "{FFBF00}[PM SPY] {FFFFFF}From %s(%i) to %s(%i): %s"playerData[playerid][playerNamee], playeridplayerData[otherPlayer][playerNamee], otherPlayerinput);
            
SendClientMessage(iCOLOR_WHITEspyText);
           }
          }
         }
        }
       }
       new 
loggingString[256];
       
format(loggingStringsizeof(loggingString), "%s PM'd %s: %s"playerData[playerid][playerNamee], playerData[otherPlayer][playerNamee], input);
       
writeInLog("privateMessages.html"loggingString);
      }
      else
      {
       
SendClientMessage(playeridCOLOR_WHITE"{FF0404}[ERROR] {FFFF00}The player your trying to PM has disabled private messages.");
      }
     }
     else
     {
      
SendClientMessage(playeridCOLOR_WHITE"{FF0404}[ERROR] {FFFF00}The player your trying to PM is not logged in.");
     }
    }
    else
    {
     
SendClientMessage(playeridCOLOR_WHITE"{FF0404}[ERROR] {FFFF00}The player your trying to PM isn't connected.");
    }
   }
  }
 }
 return 
1;

Thank you it works 100/100 .
Reply


Messages In This Thread
PM ADV BAN [HELP] - by RyderX - 06.12.2016, 17:26
Re: PM ADV BAN [HELP] - by Yaa - 06.12.2016, 17:36
Re: PM ADV BAN [HELP] - by Logic_ - 06.12.2016, 17:43
Re: PM ADV BAN [HELP] - by Bolex_ - 06.12.2016, 17:44
Re: PM ADV BAN [HELP] - by Yaa - 06.12.2016, 17:47
Re: PM ADV BAN [HELP] - by iLearner - 06.12.2016, 18:10
Re: PM ADV BAN [HELP] - by RyderX - 08.12.2016, 18:35

Forum Jump:


Users browsing this thread: 1 Guest(s)