04.07.2013, 05:18
(
Last edited by Aerotactics; 05/07/2013 at 07:25 PM.
)
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
Download the script:
http://www.mediafire.com/view/cgg541rlvk56cc6/BC.pwn
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;
}
http://www.mediafire.com/view/cgg541rlvk56cc6/BC.pwn