Advertisement
Guest User

MP²

a guest
Dec 15th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.65 KB | None | 0 0
  1.     if(strcmp(cmd, "/mp", true) ==0 || strcmp(cmd, "/pm", true) ==0)
  2.     {
  3.         tmp = strtok(cmdtext, idx);
  4.  
  5.         if(!strlen(tmp))
  6.         {
  7.             return SendClientMessage(playerid, -1, "Commande: {AFAFAF}/mp [ID/PartieDuNom] [message]");
  8.         }
  9.  
  10.         giveplayerid = ReturnUser(tmp);
  11.  
  12.         if(gDonator[playerid] != 0)
  13.         {
  14.             if(strval(tmp) < 10000 && playerid != giveplayerid && (IsPlayerLogged(giveplayerid) || IsPlayerInCubeLSC(giveplayerid)))
  15.             {
  16.                 if(MPs[giveplayerid] == 0 && !IsPunAdmin(playerid, TEAM_MODO)) return SendClientMessage(playerid, COLOR_RED, "Message non envoyé. Ce joueur a bloqué les MPs.");
  17.  
  18.                 GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  19.  
  20.                 new text[144];
  21.                 text = strrest(cmdtext, idx);
  22.  
  23.                 if(!strlen(text)) return SendClientMessage(playerid, -1, "Commande: {AFAFAF}/mp [ID/PartieDuNom/NumeroInconnu] [message]");
  24.  
  25.                 if(aDuty[playerid])
  26.                 {
  27.                     if(IsPunAdmin(playerid, TEAM_MODO)) format(string, sizeof(string), "(( MP de {FF6347}%s(%d){FFFF00}: %s ))", sendername, playerid, text);
  28.                 }
  29.                 else format(string, sizeof(string), "(( MP de %s(%d): %s ))", sendername, playerid, text);
  30.  
  31.                 new string_1[200], string_2[200];
  32.  
  33.                 CutMessage(string, string_1, string_2, 120);
  34.                 SendDoubleMessage(giveplayerid, COLOR_YELLOW, string_1, string_2);
  35.  
  36.                 format(string, sizeof(string), "(( MP envoyé à %s(%d): %s ))", giveplayer, giveplayerid, text);
  37.                 CutMessage(string, string_1, string_2, 120);
  38.  
  39.                 SendDoubleMessage(playerid, COLOR_YELLOW, string_1, string_2);
  40.  
  41.                 if(IsPunAdmin(playerid, TEAM_MODO) && aIrc[giveplayerid] > 1 && aIrc[giveplayerid] > SERVERtime-600 && aIrc[giveplayerid] <= SERVERtime)
  42.                 {
  43.                     format(string, sizeof(string), "[ADMIN] %s traite le IRC/report de %s.", gUsername[playerid], giveplayer);
  44.                     WriteLogADMIN(string);
  45.  
  46.                     MessageToAdmins(COLOR_VERTFADE, string, TEAM_MODO, playerid);
  47.                     aIrc[giveplayerid] = 0;
  48.                 }
  49.  
  50.                 format(string, sizeof(string), "[MP de %s à %s]\t%s", sendername, giveplayer, text);
  51.                 foreach(new i : Player)
  52.                 {
  53.                     if(i == playerid || i == giveplayerid) continue;
  54.  
  55.                     if(SpectatePlayer[i] == playerid) SendPlayerMessage(i, COLOR_YELLOW, string);
  56.                     else if(SpectatePlayer[i] == giveplayerid) SendPlayerMessage(i, COLOR_YELLOW, string);
  57.                 }
  58.                 WriteLogMP(string);
  59.                 return 1;
  60.             }
  61.         }
  62.         else
  63.             SendClientMessage(playerid, COLOR_RED, "Vous n'êtes pas/plus donator.");
  64.  
  65.         return 1;
  66.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement