=RK=MarineForce

  • Sr. Member
  • WAR IS HELL!
  • Posts: 430
Cop System
«  »Last edited
Hello Guyz Today i m make a Cop System and some commands . so i m sharing it with You There are some more bugs i m sry for it .. i will remove that. i think its bad for you .. this is my first system its cop . its simple i think .

1. Commands

Code: [Select]
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 + " Relaise  " + 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 & 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 + " is surrendered ");
}

2. Functions
Code: [Select]
[code]function arresttime(p)
{
local plr = FindPlayer(p);
if (plr)
gate2.MoveTo(Vector(386.61, -503.117, 9.39561), 2500 );
MessagePlayer( RED+"**You have been released from jail",plr );
Message( RED+"** " + plr.Name + " Have been released From jail ");
}
On Player Pickup


Code: [Select]
    if ( pickup.Model == 375 )
      {
if ( player.WantedLevel > 1 )
{
player.Skin = 2;
player.Colour = RGB( 51, 51, 255 );
player.SetWeapon( 19, 70 );
player.SetWeapon( 25, 150 );
player.SetWeapon( 26, 150 );
}
else MessagePlayer(" You need to clean ur wanted level to join cop duty ", player);  // updated  there can be bug in new update i untested it so u can remove that if its called bug
}

    if ( pickup.Model == 508 )
      {
player.Skin = 2;
player.Colour = RGB( 51, 51, 255 );
player.SetWeapon( 19, 70 );
player.SetWeapon( 25, 150 );
player.SetWeapon( 26, 150 );
}

pickups put it on Scriptload

Code: [Select]
CreatePickup(375, Vector( -663.642, 755.534, 11.1044 ));
 CreatePickup(508, Vector( 508.699, 514.077, 12.109  ));
 CreatePickup(508, Vector( 399.177, -469.343, 11.7388 ));

Remember Put all in main.nut

untested i change admin cmd to wanted.

Code: [Select]
else if ( ( cmd == "wanted" ) || ( cmd == "admins" ) )
{
if( stats[ player.ID ].Log == false && stats[ player.ID ].Reg == false ) MessagePlayer( "You Need Login or Register First.", player );
else {
local plr, b;
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
plr = FindPlayer( i );
if ( ( plr ) && ( plr.WantedLevel >= 1 )
{
if ( b ) b = b + ", " + plr.Name + " - plr.WantedLevel"
else b = plr.Name + " - " + WantedLevel( plr ) + ""
}
}
if ( b ) Message( " Wanted Players: [#FF8C00]" + b + "  " );
else Message( " No one wanted player" );
Message( " Requested By " + player.Name +"" );
}
}

Argent cmds

Code: [Select]
else if ( cmd == "ckick")
{
local plr = FindPlayer(text);
if(!text) MessagePlayer(" /" + cmd + " <Nick> ", player);
if ( player.Skin == 2 ) MessagePlayer(" You need to be a swat to kick a cop from duty ",player);
if ( !plr.Skin == 1 ) MessagePlayer(" He's isn't in cop duty ", player);
else{
plr.Skin == 126;
MessagePlayer(" You have been kicked from cop duty by  argent " + player.Name + " ",player);
MessagePlayer(" You kicked " + plr.Name + " From Cop Duty ",plr);
plr.Disarm();
}
}



else if ( cmd == "cdisarm")
{
local plr = FindPlayer(text);
if(!text) MessagePlayer(" /" + cmd + " <Nick> ", player);
if ( player.Skin == 2 ) MessagePlayer(" You need to be a argent  to disarm a cop ",player);
if ( !plr.Skin == 1 ) MessagePlayer(" He's isn't in cop duty ", player);
else{
MessagePlayer(" You have been Disarmed from cop duty by  argent " + player.Name + " ",player);
plr.Disarm();
}
}

else if ( cmd == "cpromote")
{
local plr = FindPlayer(text);
if(!text) MessagePlayer(" /" + cmd + " <Nick> ", player);
if ( player.Skin == 2 ) MessagePlayer(" You need to be a argent  to Promote a cop ",player);
if ( !plr.Skin == 1 ) MessagePlayer(" He's isn't in cop duty ", player);
else{
MessagePlayer(" You have been Promoted to Swat by  argent " + player.Name + " ",player);
plr.Skin == 2;
plr.Cash == 15000;
}
}




You can Make a Rank Agent from admin levels.


i'm Updating System i thinks it got some bugs u can fix it i untested new update
Try to UnderStand ME!

GoldRick

Re: Cop System
« Reply #1,  »
bien, sigue asi! :D

=RK=MarineForce

  • Sr. Member
  • WAR IS HELL!
  • Posts: 430
Re: Cop System
« Reply #2,  »
Can u tell me their is bug?
Try to UnderStand ME!

VK.Jona83Killer

  • Jr. Member
  • Programmer of Mexico City
  • Posts: 62
Re: Cop System
« Reply #3,  »
Good work Marine!

=RK=MarineForce

  • Sr. Member
  • WAR IS HELL!
  • Posts: 430
Re: Cop System
« Reply #4,  »
their no bug Thanks
Try to UnderStand ME!

Mohamed

  • Full Member
  • Regards, We3da
  • Posts: 247
Re: Cop System
« Reply #5,  »
GooD JoB, You are now best.
Feel Free To PM Me For Any Support, I'm Care.
Anyway u can Contact Me Ingame!
Ingame Name: [AFt]We3da^
My Own Server: ViceEvil Server

=RK=MarineForce

  • Sr. Member
  • WAR IS HELL!
  • Posts: 430
Re: Cop System
« Reply #6,  »
can u make it BEST PLZ
Try to UnderStand ME!

Namir

  • Newbie
  • Posts: 11

John

  • Newbie
  • Ready for takeoff!
  • Posts: 6
Re: Cop System
« Reply #8,  »
After typing /arrest John It teleports me to the jail but it does not close the Jail cell door.

Xhefri

  • Newbie
  • Posts: 34
Re: Cop System
« Reply #9,  »Last edited
Well to move an object you first need to create it.
Code: [Select]
gate2 = CreateObject( 3685, 1, 384.173, -505.719, 9.69561, 255 );

=RK=MarineForce

  • Sr. Member
  • WAR IS HELL!
  • Posts: 430
Re: Cop System
« Reply #10,  »
i created it but i forget post it to vc-mp forum
Try to UnderStand ME!

Athanatos

  • Hero Member
  • Working on maybe the best VC:MP server ever
  • Posts: 755
Re: Cop System
« Reply #11,  »
Quote from Mohamed on July 23rd, 2018, 10:15 PM
GooD JoB, You are now best.
No shit sherlock, he just made a few cmds, and that's it, he's the best scripter over there.

 Let's see him make a zombie vcmp server with animated objects.

Mahmoud Tornado

  • Full Member
  • Posts: 220
Re: Cop System
« Reply #12,  »
Quote from Athanatos on January 21st, 03:43 PM
No shit sherlock, he just made a few cmds, and that's it, he's the best scripter over there.
Hey Athanatos, he was a newbie, we was telling him to make the scripts with himself, and he was asking us a lot.
So, it's nice to see him doing script with himself, Mohamed proud of him.
Quote from Mohamed on July 23rd, 2018, 10:15 PM
GooD JoB, You are now best.
There's a different in Best and The Best, you surely know it, so you used it here.
Quote from Athanatos on January 21st, 03:43 PM
he's the best scripter over there.
Finally, Your zombie server is cool i saw it.

Athanatos

  • Hero Member
  • Working on maybe the best VC:MP server ever
  • Posts: 755
Re: Cop System
« Reply #13,  »
Quote from Mahmoud Tornado on January 25th, 09:09 AM
Finally, Your zombie server is cool i saw it.
Thanks, I plan adding GUI interfaces and revival system too :P

Xhefri

  • Newbie
  • Posts: 34
Re: Cop System
« Reply #14,  »
Quote from Athanatos on January 25th, 09:26 AM
Quote from Mahmoud Tornado on January 25th, 09:09 AM
Finally, Your zombie server is cool i saw it.
Thanks, I plan adding GUI interfaces and revival system too :P
You should make random pickups like guns ,armour, health and things like that at the end of every wave.