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

Bait-Car Prototype 2.0


Update 1.0: added locked doors, so the crook can get out, but not back in, and removed /clearbc since it is now useless and the car will either despawn or be removed when a new one spawns.

Update 2.0: Added 2 more cars and a boat, set all commands to admin permission only.

I'm sure most people that clicked on this post knew that I was talking about the TV show "Bait Car", but if you didn't, basically theres special police groups that have a remote control car that they can shutdown whenever a crook tries to steal it.

I was playing on a Cops and Robbers server today and noticed that the cops were more or less just killing most people because it is too difficult to stop them on the run. So, today I want to bring a new element to the cop's arsenal. The Bait-Car.

There are 6 bait-car models to choose from. Then, you park your car on the side of the road, or wherever criminals tend to boost cars (or place your boat near a dock and wait on the shore or in another boat). Then you hide in the shadows, waiting for someone to hop in your car and drive off. Then when the car takes off, you disable the engine with a simple command, bringing it slowly to a stop, making it easier to catch the thief.

What it needs to have happen is to be re-written in a Cops and Robbers environment and probably only used by undercover cops. The following is the code and a download for you to use. If you do add it to your CnR server, I would like to check it out. leave me a PM of your IP.
Here's an intro video also. All commands are in CAPS.

http://*********/6QKTuGKk_bk


Код:
//Bait-Car prototype

#define FILTERSCRIPT

#include <a_samp>

new BC1;
new BC2;
new BC3;
new BC4;
new BC5;
new BC6;

public OnVehicleDeath(vehicleid, killerid)
{
	DestroyVehicle(BC1);
	DestroyVehicle(BC2);
	DestroyVehicle(BC3);
	DestroyVehicle(BC4);
	DestroyVehicle(BC5);
	DestroyVehicle(BC6);
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if(IsPlayerAdmin(playerid))
	{
		if (strcmp("/BC", cmdtext, true)==0)
		{
			SendClientMessage(playerid, 0x00FFFFFF, "Commands: Huntley = /BC1 | Turismo = /BC2 | Sultan = /BC3");
			SendClientMessage(playerid, 0x00FFFFFF, "Commands: Buffalo = /BC4 | Patriot = /BC5 | Jetmax (boat) = /BC6 ");
			SendClientMessage(playerid, 0x00FFFFFF, "Commands: /DIS -Disable the Bait-Car's motor, bringing the car to a stop.");
			return 1;
		}
		if (strcmp("/BC1", cmdtext, true)==0)
		{
			SendClientMessage(playerid, 0x00FFFFFF, "Bait-Car 1 Initiated, find a spot to park it.");
			DestroyVehicle(BC1);
			DestroyVehicle(BC2);
			DestroyVehicle(BC3);
			DestroyVehicle(BC4);
			DestroyVehicle(BC5);
			DestroyVehicle(BC6);
			new Float:x,Float:y,Float:z,Float:a;
			GetPlayerFacingAngle(playerid,a);
			GetPlayerPos(playerid,x,y,z);
			BC1=CreateVehicle(579, x, y, z,a, -1, -1, -1);
			PutPlayerInVehicle(playerid, BC1, 0);
			return 1;
		}
		if (strcmp("/BC2", cmdtext, true)==0)
		{
			SendClientMessage(playerid, 0x00FFFFFF, "Bait-Car 2 Initiated, find a spot to park it.");
			DestroyVehicle(BC1);
			DestroyVehicle(BC2);
			DestroyVehicle(BC3);
			DestroyVehicle(BC4);
			DestroyVehicle(BC5);
			DestroyVehicle(BC6);
			new Float:x,Float:y,Float:z,Float:a;
			GetPlayerFacingAngle(playerid,a);
			GetPlayerPos(playerid,x,y,z);
			BC2=CreateVehicle(451, x, y, z,a, -1, -1, -1);
			PutPlayerInVehicle(playerid, BC2, 0);
			return 1;
		}
		if (strcmp("/BC3", cmdtext, true)==0)
		{
			SendClientMessage(playerid, 0x00FFFFFF, "Bait-Car 3 Initiated, find a spot to park it.");
			DestroyVehicle(BC1);
			DestroyVehicle(BC2);
			DestroyVehicle(BC3);
			DestroyVehicle(BC4);
			DestroyVehicle(BC5);
			DestroyVehicle(BC6);
			new Float:x,Float:y,Float:z,Float:a;
			GetPlayerPos(playerid,x,y,z);
			GetPlayerFacingAngle(playerid,a);
			BC3=CreateVehicle(560, x, y, z,a, -1, -1, -1);
			PutPlayerInVehicle(playerid, BC3, 0);
			return 1;
		}
		if  (strcmp("/BC4", cmdtext, true)==0)
		{
			SendClientMessage(playerid, 0x00FFFFFF, "Bait-Car 4 Initiated, find a spot to park it.");
			DestroyVehicle(BC1);
			DestroyVehicle(BC2);
			DestroyVehicle(BC3);
			DestroyVehicle(BC4);
			DestroyVehicle(BC5);
			DestroyVehicle(BC6);
			new Float:x,Float:y,Float:z,Float:a;
			GetPlayerPos(playerid,x,y,z);
			GetPlayerFacingAngle(playerid,a);
			BC4=CreateVehicle(402, x, y, z,a, -1, -1, -1);
			PutPlayerInVehicle(playerid, BC4, 0);
			return 1;
		}
		if  (strcmp("/BC5", cmdtext, true)==0)
		{
			SendClientMessage(playerid, 0x00FFFFFF, "Bait-Car 5 Initiated, find a spot to park it.");
			DestroyVehicle(BC1);
			DestroyVehicle(BC2);
			DestroyVehicle(BC3);
			DestroyVehicle(BC4);
			DestroyVehicle(BC5);
			DestroyVehicle(BC6);
			new Float:x,Float:y,Float:z,Float:a;
			GetPlayerPos(playerid,x,y,z);
			GetPlayerFacingAngle(playerid,a);
			BC5=CreateVehicle(470, x, y, z,a, -1, -1, -1);
			PutPlayerInVehicle(playerid, BC5, 0);
			return 1;
		}
		if  (strcmp("/BC6", cmdtext, true)==0)
		{
			SendClientMessage(playerid, 0x00FFFFFF, "Bait-Car 6 Initiated, find a spot to park it.");
			DestroyVehicle(BC1);
			DestroyVehicle(BC2);
			DestroyVehicle(BC3);
			DestroyVehicle(BC4);
			DestroyVehicle(BC5);
			DestroyVehicle(BC6);
			new Float:x,Float:y,Float:z,Float:a;
			GetPlayerPos(playerid,x,y,z);
			GetPlayerFacingAngle(playerid,a);
			BC6=CreateVehicle(493, x, y, z,a, -1, -1, -1);
			PutPlayerInVehicle(playerid, BC6, 0);
			return 1;
		}
		if (strcmp("/DIS", cmdtext, true)==0)
		{
			SendClientMessage(playerid, 0x00FFFFFF, "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;
		}
	}
	else
	{
		SendClientMessage(playerid, 0x00FFFF, "You must be an admin/police.");
		return 1;
	}
	return 0;
}
Download
http://www.mediafire.com/?tqv6uyb1j25bli5
What I want from this script is to be known as the guy who added the bait car to all the greatest servers! Also, give me your honest opinions!
Reply
#2

C'mon guys. is anybody interested? Does anybody like it?
Reply
#3

I love the show Bait car! Nice work!
Reply
#4

Quote:
Originally Posted by NoahF
Посмотреть сообщение
I love the show Bait car! Nice work!
Thank you for for your input! I enjoy the show myself, and thought it needed to be in a couple CnR servers.
Reply
#5

Quote:
Originally Posted by NoahF
Посмотреть сообщение
I love the show Bait car! Nice work!
I also just did a minor update, and I think the next update I will add more car models to choose from.
Reply
#6

The bait car to be more realistic should have the option to lock the vehicle, and unlock when the police was near, but in general is an awesome FS
Reply
#7

pawn Код:
if (strcmp("/DIS", cmdtext, true)==0)
    {
        SendClientMessage(playerid, 0x00FFFFFF, "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);
        return 1;
    }
This will turn off the engine for all the vehicles and I suggest to use a command proccecor to add params feature and use to advence your script,then you can make for example /dis [bcid(1-3)] instead of one command that turns off the engine for all the vehicles.
pawn Код:
DestroyVehicle(BC1);
DestroyVehicle(BC2);
DestroyVehicle(BC3);
For that case I suggest to check if the vehicle exist and/or destroy only one vehicle,the one that the command is used on.
for example /bc1 will destroy only vehicle BC1.

anyhow,nice idea.
Reply
#8

Quote:
Originally Posted by Delta 4
Посмотреть сообщение
The bait car to be more realistic should have the option to lock the vehicle, and unlock when the police was near, but in general is an awesome FS
I thought of using SetPlayerControllable(or something like that) but it wasn't working the way I needed it to. I'm sure someone with more skill can fix that to their needs.

Quote:
Originally Posted by xkirill
Посмотреть сообщение
pawn Код:
if (strcmp("/DIS", cmdtext, true)==0)
    {
        SendClientMessage(playerid, 0x00FFFFFF, "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);
        return 1;
    }
This will turn off the engine for all the vehicles and I suggest to use a command proccecor to add params feature and use to advence your script,then you can make for example /dis [bcid(1-3)] instead of one command that turns off the engine for all the vehicles.
pawn Код:
DestroyVehicle(BC1);
DestroyVehicle(BC2);
DestroyVehicle(BC3);
For that case I suggest to check if the vehicle exist and/or destroy only one vehicle,the one that the command is used on.
for example /bc1 will destroy only vehicle BC1.

anyhow,nice idea.
If you read the script, you will know that only one vehicle can spawn at any time. Having said that, the code I used still works efficiently and can be rewritten by anyone who wants it. I like having things simpler too, but this is working for me. Thank you for the advice though

This comment is also to inform that I just finished up another update, this one adding 2 more cars and a boat, and set all commands to Admin permission. If anyone thinks it's something they want to add to their server, send me an Ip please.
Reply
#9

So you really think we're gonna add this to our Cops and Robbers servers?
Reply
#10

Quote:
Originally Posted by Kar
Посмотреть сообщение
So you really think we're gonna add this to our Cops and Robbers servers?
Honestly yes, right now I'm developing a dialog for the car spawns, but in the mean time, I think servers should add it to their script and see what the public opinion is towards it. I think I might make a CnR server myself and figure out how to add this if nobody entirely wants it. And as I said before, you are welcome to change anything in it to fit your needs. It probably needs to be recoded anyways because Idk how CnR servers script their 'permissions'.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)