[Map] "Bait-Cars" for Cops and Robbers Servers!
#1

"Bait-Cars" for Cops and Robbers Servers!


I know I added the wrong tag, apologies.

If you clicked this link, I'm sure you have heard of the tv show "Bait Car". If you haven't, it's about special groups of police officers using 'wired', or 'controlled' cars to stop carjackers from stealing any more cars on the streets. These cars can be remotely disabled, leaving the thief to wonder what happened.

I got the idea of adding Bait-Cars into SAMP after seeing the countless amount people dieing, just because the cops can't keep up with them, and seeing that it is difficult to use commands fast enough on running convicts.

What this script does is add Bait-Cars into your server to be used by police, or undercover cops. There are 6 models to choose from. For simplicity's sake, there is only 2 commands: /BC to bring up the Bait-Cars list, and /DIS to disable the Bait-Car's engine. When the Bait-Cars are disabled, they are also locked, preventing the thief from getting back in. Since I have no clue how permissions are set up in CnR servers, I just made these commands for Admin permission.

This script does not stop the robbers, but slows them down considerably, making it much easier to issue a command to the thief, since they don't have a car. There are a few minor things that an expert scripter may want to fix, but since I am not such a super scripter, I will list them down.

-Police can use it to spawn themselves a car.
=My response to this is that I believe this could be a good thing, since you never know where a thief could be. Maybe you see one come out of a recently robbed Burger Shot. You can park your Bait-Car, find a civilian vehicle, and start to drive away. Then you can turn around and go back after the thief takes your car, and disable it.

-Driver's can bail out of disabled vehicles.
=This may be true, but I don't think they will realize it's slowing down until too late, when you can run up to them as they are getting out.

-Police can spawn Bait-Cars, while already in a car.
=I agree this could be a problem, but I didn't get around to fixing it myself. Perhaps in an update, I think I can fix this one.

-Anything else?

Below is a video, a script and a text download. Enjoy.

http://*********/9mYrZYLTS-U


pawn Code:
//I couldn't make this work in a FS, so you'll have to add it to your gamemode.

//Put these after #includes
new BC1;
new BC2;
new BC3;
new BC4;
new BC5;
new BC6;

//This goes under OnPlayerCommandText(...)
    if(IsPlayerAdmin(playerid))
    {
        if (strcmp("/BC", cmdtext, true)==0)
        {
            DestroyVehicle(BC1);
            DestroyVehicle(BC2);
            DestroyVehicle(BC3);
            DestroyVehicle(BC4);
            DestroyVehicle(BC5);
            DestroyVehicle(BC6);
            ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Available Bait-Cars", "Huntley\nTurismo\nSultan\nBuffalo\nPatriot\nJetmax (boat)", "Select", "Cancel");
            return 1;
        }
        if (strcmp("/DIS", cmdtext, true)==0)
        {
            SendClientMessage(playerid, 0xFFFF00FF , "Bait-Car Disabled.");
            SetVehicleParamsEx(BC1, 0, 1, 0, 1, 0, 0, 0);
            SetVehicleParamsEx(BC2, 0, 1, 0, 1, 0, 0, 0);
            SetVehicleParamsEx(BC3, 0, 1, 0, 1, 0, 0, 0);
            SetVehicleParamsEx(BC4, 0, 1, 0, 1, 0, 0, 0);
            SetVehicleParamsEx(BC5, 0, 1, 0, 1, 0, 0, 0);
            SetVehicleParamsEx(BC6, 0, 1, 0, 1, 0, 0, 0);
            return 1;
        }
    }

//And the rest is our dialog request
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    new Float:x,Float:y,Float:z,Float:a;
    if(dialogid==1 &&response==1)
    {
        switch(listitem)
        {
            case 0:
            {
                SendClientMessage(playerid, 0xFFFF00FF , "Bait-Car 1 Initiated, find a spot to park it.");
                SendClientMessage(playerid, 0xFFFF00FF , "Type /DIS to disable the Bait-Car's engine after a theif takes it.");
                GetPlayerFacingAngle(playerid,a);
                GetPlayerPos(playerid,x,y,z);
                BC1=CreateVehicle(579, x, y, z,a, -1, -1, -1);
                PutPlayerInVehicle(playerid, BC1, 0);
            }
            case 1:
            {
                SendClientMessage(playerid, 0xFFFF00FF , "Bait-Car 2 Initiated, find a spot to park it.");
                SendClientMessage(playerid, 0xFFFF00FF , "Type /DIS to disable the Bait-Car's engine after a theif takes it.");
                GetPlayerFacingAngle(playerid,a);
                GetPlayerPos(playerid,x,y,z);
                BC2=CreateVehicle(451, x, y, z,a, -1, -1, -1);
                PutPlayerInVehicle(playerid, BC2, 0);
            }
            case 2:
            {
                SendClientMessage(playerid, 0xFFFF00FF , "Bait-Car 3 Initiated, find a spot to park it.");
                SendClientMessage(playerid, 0xFFFF00FF , "Type /DIS to disable the Bait-Car's engine after a theif takes it.");
                GetPlayerFacingAngle(playerid,a);
                GetPlayerPos(playerid,x,y,z);
                BC3=CreateVehicle(560, x, y, z,a, -1, -1, -1);
                PutPlayerInVehicle(playerid, BC3, 0);
            }
            case 3:
            {
                SendClientMessage(playerid, 0xFFFF00FF , "Bait-Car 4 Initiated, find a spot to park it.");
                SendClientMessage(playerid, 0xFFFF00FF , "Type /DIS to disable the Bait-Car's engine after a theif takes it.");
                GetPlayerPos(playerid,x,y,z);
                GetPlayerFacingAngle(playerid,a);
                BC4=CreateVehicle(402, x, y, z,a, -1, -1, -1);
                PutPlayerInVehicle(playerid, BC4, 0);
            }
            case 4:
            {
                SendClientMessage(playerid, 0xFFFF00FF , "Bait-Car 5 Initiated, find a spot to park it.");
                SendClientMessage(playerid, 0xFFFF00FF , "Type /DIS to disable the Bait-Car's engine after a theif takes it.");
                GetPlayerPos(playerid,x,y,z);
                GetPlayerFacingAngle(playerid,a);
                BC5=CreateVehicle(470, x, y, z,a, -1, -1, -1);
                PutPlayerInVehicle(playerid, BC5, 0);
            }
            case 5:
            {
                SendClientMessage(playerid, 0xFFFF00FF , "Bait-Car 6 Initiated, find a spot to park it.");
                SendClientMessage(playerid, 0xFFFF00FF , "Type /DIS to disable the Bait-Car's engine after a theif takes it.");
                GetPlayerPos(playerid,x,y,z);
                GetPlayerFacingAngle(playerid,a);
                BC6=CreateVehicle(493, x, y, z,a, -1, -1, -1);
                PutPlayerInVehicle(playerid, BC6, 0);
            }
        }
        return 1;
    }
    return 0;
}
Download
http://www.mediafire.com/?c4dpdz5615htdqt

I would really like a Cops and Robbers server to implement this code (or something like it) into their servers so that I can try it out. If you do, leave me an Ip address in a pm or a comment to this post.
Reply
#2

is that only car spawner ya?
Reply
#3

Quote:
Originally Posted by dEcooR
View Post
is that only car spawner ya?
I dont understand, too

Watched video twice and i guess its some ENGINEON/OFF
Reply
#4

lool ..
Reply
#5

Quote:
Originally Posted by BodyBoardVEVO
View Post
I dont understand, too

Watched video twice and i guess its some ENGINEON/OFF
Yes it's a Bait-Car Spawner. Police use them to catch criminals. Read the Description, it should explain everything.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)