(Simple Cop System) [ Easy Add ]!

Started by Jutt, Dec 19, 2021, 05:03 AM

Previous topic - Next topic

Jutt

[noae][noae]======================================================================================

function onPickupPickedUp( player, pickup )
{
    if ( pickup.Model == 508 )
      {
player.Skin = 1;
player.Colour = RGB( 51, 51, 255 );
player.SetWeapon( 19, 70 );
player.SetWeapon( 102, 150 );
player.SetWeapon( 26, 150 );
player.SetWeapon( 100, 999 );
Message( " " + player.Name + " has joined the cop duty" );
}


===================================================================================

else if (cmd == "arrest") {
    if( !text ) MessagePlayer("[#ff0000]Error - /"+cmd+" Name/id", player );
    else if ( (player.Skin == 1) ||  ( player.Skin ==2 ) ) {
        local plr = text != "" ? IsNum( text ) ? FindPlayer( text.tointeger() ) : FindPlayer( text ) : player;
        if( !plr )MessagePlayer("Error - Unknown player", player );
       if (plr.Skin == 126 ) MessagePlayer(" This player is not surrender You can't arrest him ",player);  /// if this cmd is bug so remove this line .///
        else if ( plr.WantedLevel == 1 ) return MessagePlayer( RED+" This Player is Not Wanted",player );
            else if ( DistanceFromPoint( player.Pos.x, player.Pos.y , plr.Pos.x, plr.Pos.y ) < 5 ) {         //DistanceFromPoint( float x1, float y1, float x2, float y2 )
                plr.Pos = Vector(  380.759,-504.493, 9.39562 );
                NewTimer( "arresttime", 30000, 1, plr.ID );
plr.WantedLevel(0);
           
 
                Message( RED+"Cop "+player.Name+GREEN+" has Arrested "+LGREEN+plr.Name );
     MessagePlayer( RED+"You will be released from jail in thirty seconds",plr );
gate2.MoveTo(Vector(384.108, -505.87, 9.65089), 2500 );
               
                }
            else MessagePlayer(""+ plr.Name +" is far away.", player );
            }
            else MessagePlayer( " You need to be a cop",player );
        }

else if (cmd == "unarrest")
{
if ( (player.Skin == 1) ||  ( player.Skin ==2 ) )
{
if( !text ) MessagePlayer(" [#00ff00] Error - /"+cmd+" Name/id", player );
 local plr = text != "" ? IsNum( text ) ? FindPlayer( text.tointeger() ) : FindPlayer( text ) : player;
  if( !plr )MessagePlayer("Error - Unknown player", player );
plr.Pos = Vector(384.157, -506.481, 9.39822); Message(" [#ff0000]VCPD " + player.Name + " Released  " + plr.Name + "  From Jail");
}
else MessagePlayer(" [#00ff00] You need be in cop to use this cmd  ", player);
}

 
else if (cmd == "sus")
{
if ( (player.Skin == 1) ||  ( player.Skin ==2 ) )
{
if( !text ) MessagePlayer(" [#00ff00] Error - /"+cmd+" (Name/id)", player );
 local plr = text != "" ? IsNum( text ) ? FindPlayer( text.tointeger() ) : FindPlayer( text ) : player;
 if( !plr )MessagePlayer("Error - Unknown player", player );
 else if ( DistanceFromPoint( player.Pos.x, player.Pos.y , plr.Pos.x, plr.Pos.y ) < 250 ) {         //DistanceFromPoint( float x1, float y1, float x2, float y2 )
 Message(" [#00ffff] VCPD " + player.Name + " Suspected " + plr.Name + " ");
 Message(" (megaphone) [#0000ff] " + plr.Name + " surrender or we will open fire on you!! ");
 plr.WantedLevel(2);

 }
 else MessagePlayer(""+ plr.Name +" is far away.", player );
 }
 else MessagePlayer(" [#00ff00] You need be in cop to use this cmd  ", player);
}


else if ( cmd == "sur")
{
 player.IsFrozen = true;
 player.SetAnim(0,161);
player.Skin == 126;
Message(" [#0000ff] " + player.Name + " has surrendered at "+GetDistrictName( player.Pos.x, player.Pos.y )+",all cops are requested to arrest him ");
}
[/noae][/noae]
Jutt

UncleRus

I LoperkinDead.My brothers scripters TimyrSem,VladSem

Jutt

Jutt

Phantom

Lmao you just stole MarineForce's Cop system and reposted it