SHARE
TWEET

Untitled

a guest Jul 21st, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function servercmdTeamMessageSent(%client,%text)
  2. {
  3.     if($Sim::Time - %client.lastChat > 2)
  4.     {
  5.         %text = StripMLControlChars(%text);
  6.         %text = trim(%text);
  7.         %text = getsubstr(%text,0,"120");
  8.         if(strlen(%text) < 2)
  9.             return MessageClient(%client,'',"\c6Your message was too short.");
  10.         if(CRPData.data[%client.bl_id].ValueJail)
  11.         {
  12.             if(CRPdata.data[%client.bl_id].valueMute)
  13.             {
  14.                 echo("[MUTE][Inmate]"@ %client.name @ ": "@ %text);
  15.                 logCRPChat("[MUTE][Inmate]"@ %client.name @ ": "@ %text);
  16.                 commandToClient(%client,'ChatMessage',%client,"","","\c6[<color:uummgg>Inmate\c6]\c3"@ %client.name @ "\c6: \c7"@ %text);
  17.             }
  18.             else
  19.             {
  20.                 echo("[Inmate]"@ %client.name @ ": "@ %text);
  21.                 logCRPChat("[Inmate]"@ %client.name @": "@ %text);
  22.                 for(%a = 0; %a < $Server::PlayerCount;%a++)
  23.                 {
  24.                     %subClient = ClientGroup.getObject(%a);
  25.                     if(CRPData.data[%subclient.bl_id].ValueJail || %subClient.isAdmin)
  26.                         commandToClient(%subclient,'ChatMessage',%client,"","","\c6[<color:uummgg>Inmate\c6]\c3"@ %client.name @ "\c6: \c7"@ %text);
  27.                 }
  28.             }
  29.         }
  30.         else
  31.         {
  32.             if(CRPdata.data[%client.bl_id].valueMute)
  33.             {
  34.                 echo("[MUTE]["@ CRPData.data[%client.bl_id].Job.name @"]"@ %client.name @ ": "@ %text);
  35.                 logCRPChat("[MUTE]["@ CRPData.data[%client.bl_id].Job.name @"]"@ %client.name @ ": "@ %text);
  36.                 commandToClient(%client,'ChatMessage',%client,"","","\c6["@ CRPData.data[%client.bl_id].ValueJob.color @ CRPData.data[%client.bl_id].Job.name @"\c6]\c3"@ %client.name @ "\c6: \c7"@ %text);
  37.             }
  38.             else
  39.             {
  40.                 echo("["@ CRPData.data[%client.bl_id].Job.name @"]"@ %client.name @ ": "@ %text);
  41.                 logCRPChat("["@ CRPData.data[%client.bl_id].Job.name @"]"@ %client.name @ ": "@ %text);
  42.                 for(%a = 0; %a < $Server::PlayerCount;%a++)
  43.                 {
  44.                     %subClient = ClientGroup.getObject(%a);
  45.                     if(CRPData.data[%subclient.bl_id].ValueCompany == CRPData.data[%client.bl_id].ValueCompany || %subClient.isAdmin)
  46.                         commandToClient(%subclient,'ChatMessage',%client,"","","\c6["@ CRPData.data[%client.bl_id].ValueJob.color @ CRPData.data[%client.bl_id].Job.name @"\c6]\c3"@ %client.name @ "\c6: \c7"@ %text);
  47.                 }
  48.             }
  49.         }
  50.         %client.lastChat = $Sim::Time;
  51.     }
  52.     else
  53.         MessageClient(%client,'',"\c6You must wait before using the chat again.");
  54. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top