[FilterScript] Bait-Car Prototype Version 2 (New Idea for CnR!)
#1

If you clicked the link, I think you knew where I was going with this. If not, here's a short clip of the television show "Bait Car".

http://*********/op8AI95S2Vc

I came up with this script one day playing on a CnR server, and I was thinking, "Do you know how much easier it would be if a special group of cops had this kind of tool?" So, I figured someone should make a FS and add it to their server. I spent one night thinking about it and couldn't sleep. So, I got up and started on it.

Perhaps you may have see the first prototype, but it was crudely made and put together overnight while I was tired but couldn't sleep. The second attempt wasn't much better. THIS TIME. This time I had compacted the script as far as I could with my knowledge, and put everything in dialogs, so there is only 1 command, and that is /BC. This command brings up a dialog for the Bait-Car Commands. In the following short video, I show you basically how the script works (yes I'm playing both parts).

http://*********/ab1LWCMeJ9o

To walk you through it:
1: The "Bait Team" unit (suggested new class) finds a suitable position for a Bait-Car.
2: Once the player finds a suitable place, probably a place where lots of cars are taken, then the unit spawns the car.
3: The player goes back to his police unit, and finds a hidden place nearby, and parks.
4: He opens his /BC dialog and watches the car from a distance, until a crook takes the car, then goes back to Normal Cam (using the dialog).
5: After catching up to the Bait-Car, he opens the dialog and Disables the car.
6: As the car slows down, the crook realizes he is now trapped by the cop, who runs up and cuffs him. (not seen in video)

As I said, I suggest adding a new player class to the server as well, and adding this code only for that class. It would be called "Bait Team" or similar. The player would use casual ped skins or undercover skins, and would not be able to be seen on radar. On another note, this script would be very useful in a RP server as well.

If you like the idea, try to use it. If you do use it, or if you know of a server that has bait cars in it, leave me an IP address. I would like to try it out.

Update 1: Minor Script Edit

pawn Code:
//Bait-Car Prototype Version 2 Update 1

#define BCars 751
#define BCmds 752

#include <a_samp>

native IsValidVehicle(vehicleid);

new BC;

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/BC", cmdtext, true)==0)
    {
        ShowPlayerDialog(playerid, 752, DIALOG_STYLE_LIST, "Available Bait-Car Commands", "Spawn Bait-Car\nBait-Car Cam\nNormal Cam\nDisable Bait-Car", "Select", "Cancel");
        return 1;
    }
    return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    new Float:x,Float:y,Float:z,Float:a;
    if(dialogid==751 &&response)
    {
        switch(listitem)
        {
            case 0:
            {
                DestroyVehicle(BC);
                SendClientMessage(playerid, 0xFFFF00FF , "Bait-Car Initiated, find a spot to park it.");
                GetPlayerFacingAngle(playerid,a);
                GetPlayerPos(playerid,x,y,z);
                BC=CreateVehicle(579, x, y, z,a, -1, -1, -1);
                PutPlayerInVehicle(playerid, BC, 0);
            }
            case 1:
            {
                DestroyVehicle(BC);
                SendClientMessage(playerid, 0xFFFF00FF , "Bait-Car Initiated, find a spot to park it.");
                GetPlayerFacingAngle(playerid,a);
                GetPlayerPos(playerid,x,y,z);
                BC=CreateVehicle(451, x, y, z,a, -1, -1, -1);
                PutPlayerInVehicle(playerid, BC, 0);
            }
            case 2:
            {
                DestroyVehicle(BC);
                SendClientMessage(playerid, 0xFFFF00FF , "Bait-Car Initiated, find a spot to park it.");
                GetPlayerFacingAngle(playerid,a);
                GetPlayerPos(playerid,x,y,z);
                BC=CreateVehicle(560, x, y, z,a, -1, -1, -1);
                PutPlayerInVehicle(playerid, BC, 0);
            }
            case 3:
            {
                DestroyVehicle(BC);
                SendClientMessage(playerid, 0xFFFF00FF , "Bait-Car Initiated, find a spot to park it.");
                GetPlayerPos(playerid,x,y,z);
                GetPlayerFacingAngle(playerid,a);
                BC=CreateVehicle(402, x, y, z,a, -1, -1, -1);
                PutPlayerInVehicle(playerid, BC, 0);
            }
            case 4:
            {
                DestroyVehicle(BC);
                SendClientMessage(playerid, 0xFFFF00FF , "Bait-Car Initiated, find a spot to park it.");
                GetPlayerPos(playerid,x,y,z);
                GetPlayerFacingAngle(playerid,a);
                BC=CreateVehicle(470, x, y, z,a, -1, -1, -1);
                PutPlayerInVehicle(playerid, BC, 0);
            }
            case 5:
            {
                DestroyVehicle(BC);
                SendClientMessage(playerid, 0xFFFF00FF , "Bait-Car Initiated, find a spot to park it.");
                GetPlayerPos(playerid,x,y,z);
                GetPlayerFacingAngle(playerid,a);
                BC=CreateVehicle(493, x, y, z,a, -1, -1, -1);
                PutPlayerInVehicle(playerid, BC, 0);
            }
        }
        return 1;
    }
    if(dialogid==752 &&response)
    {
        switch(listitem)
        {
            case 0:
            {
                if (IsPlayerInAnyVehicle(playerid))
                {
                    SendClientMessage(playerid, 0xFFFF00FF , "Leave your vehicle before spawning a Bait-Car.");
                    return 1;
                }
                else
                {
                    ShowPlayerDialog(playerid, 751, DIALOG_STYLE_LIST, "Available Bait-Cars", "Huntley\nTurismo\nSultan\nBuffalo\nPatriot\nJetmax (boat)", "Select", "Cancel");
                    return 1;
                }

            }
            case 1:
            {
                if (IsValidVehicle(BC))
                {
                    SendClientMessage(playerid, 0xFFFF00FF , "Bait-Car View Enabled.");
                    new Float:X, Float:Y, Float:Z;
                    GetVehiclePos(BC, X, Y, Z);
                    SetPlayerCameraPos(playerid, X, Y, Z + 15);
                    SetPlayerCameraLookAt(playerid, X, Y, Z);
                    return 1;
                }
                else
                {
                    SendClientMessage(playerid, 0xFFFF00FF , "Bait-Car doesn't exist.");
                    return 1;
                }
            }
            case 2:
            {
                SendClientMessage(playerid, 0xFFFF00FF , "Normal Cam Enabled.");
                SetCameraBehindPlayer(playerid);
                return 1;
            }
            case 3:
            {
                if (IsValidVehicle(BC))
                {
                    if (IsPlayerInVehicle(playerid,BC))
                    {
                        SendClientMessage(playerid, 0xFFFF00FF , "Bait-Car Disabled.");
                        SetVehicleParamsEx(BC, 0, 1, 0, 1, 0, 0, 0);
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid, 0xFFFF00FF , "Nobody in Bait-Car.");
                        return 1;
                    }
                }
                else
                {
                    SendClientMessage(playerid, 0xFFFF00FF , "Bait-Car doesn't exist.");
                    return 1;
                }
            }
        }
    }
    return 0;
}
public OnVehicleDeath(vehicleid)
{
    if(vehicleid==BC)
    {
        DestroyVehicle(BC);
        return 1;
    }
    return 0;
}
Download the script:
http://www.mediafire.com/view/cgg541rlvk56cc6/BC.pwn
Reply
#2

Very nice filterscript you have released! I'll keep this in my filterscripts folder for my future Cops and Robbers scripts if I ever decide to make one.
Reply
#3

Quote:
Originally Posted by DJTunes
View Post
Very nice filterscript you have released! I'll keep this in my filterscripts folder for my future Cops and Robbers scripts if I ever decide to make one.
I'm really glad you like it. If you ever make a CnR script, and use it on a server, leave me an Ip address, cant wait to try it out!
Reply
#4

Nice work for second script
Reply
#5

Quote:
Originally Posted by Team_PRO
View Post
Nice work for second script
Thank you very much. If I can figure out how to improve on it, I will try.
Reply
#6

Nice FS, but how about more than 1 bait-car? ^^

and

pawn Code:
public OnVehicleDeath(vehicleid)
{
    if(vehicleid==BC){
        DestroyVehicle(BC);
        return 1;
    }
    return 1;
}
not

pawn Code:
public OnVehicleDeath(vehicleid)
{
     DestroyVehicle(BC);
     return 1;
}
the bait-car would dissappear everytime when a car explodes ^^
Reply
#7

Quote:
Originally Posted by Carlito
View Post
Nice FS, but how about more than 1 bait-car? ^^

and

pawn Code:
public OnVehicleDeath(vehicleid)
{
    if(vehicleid==BC){
        DestroyVehicle(BC);
        return 1;
    }
    return 1;
}
not

pawn Code:
public OnVehicleDeath(vehicleid)
{
     DestroyVehicle(BC);
     return 1;
}
the bait-car would dissappear everytime when a car explodes ^^
There should only be one bait-car at a time because that's all you need (and that's what the tv show provides). If there's a team of maybe 3 Bait Team, then they could all each spawn a Bait-Car near each other, and watch it from a distance. Then when 1 person takes it, they can all go after the one.

And yes you're right, that was the last thing added to the script and I wasn't thinking about it much. will update.
Reply
#8

Quote:
Originally Posted by Aerotactics
View Post
There should only be one bait-car at a time because that's all you need (and that's what the tv show provides). If there's a team of maybe 3 Bait Team, then they could all each spawn a Bait-Car near each other, and watch it from a distance. Then when 1 person takes it, they can all go after the one.

And yes you're right, that was the last thing added to the script and I wasn't thinking about it much. will update.
at least 3 bait-cars, there are 3 citys ^^, but its ok thx for the idea, will be another feature in my gamemode, i will rewrite it, include policescript (only cops can use the command) and other scripts like vehicleproduction, not just spawning a car, mining materials and building the car first
Reply
#9

Quote:
Originally Posted by Aerotactics
View Post
Thank you very much. If I can figure out how to improve on it, I will try.
well good luck
Reply
#10

Quote:
Originally Posted by Team_PRO
View Post
well good luck
Thank you!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)