Arrest Command Help
#1

I KNOW - that some might see this as a request, but I have the basics sorted out, just need it put together by someone more skilled than me.


I'd like for someone to script an arrest command for me using the pieces and info I supplied - I really need some help here, nowhere else I can get it...


KeyStateCode:

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if(GetPlayerColor(playerid) == COLOR_BLUE) //This checks if the Player is of the Blue Team (law enforcement)
	{
		if(IsPlayerInAnyVehicle(playerid)) // Is the player in a vehicle
		{
  		 	if((newkeys & KEY_SUBMISSION) && !(oldkeys & KEY_SUBMISSION)) // If he is, the Arrest key is "2"
			{
				// Arrest Code Here
			}
		}
		else
		{
	 		if((newkeys & KEY_LOOK_BEHIND) && !(oldkeys & KEY_LOOK_BEHIND)) // If he is on foot, arrest key is Middle Mouse Button
 	 		{
				// Copy of the Arrest Code Here
			}
		}
	}
	return 1;
}
I'd like the following included: Distance between cop and suspect must be short - like the distance of 2 cars. Also, it is only the nearest suspect (member of TEAM_WANTED or TEAM_HUNTED, colors COLOR_ORANGE and COLOR_RED) that will be affected by this. When arrested, the Hands Up animation should be applied to the suspect(and frozen with TogglePlayerControl, unfrozen when teleported) and after 3 secs he should be stripped of his weapons, then teleported into a random prison cell out of 4:

Код:
SetPlayerInterior(playerid, 10);
Код:
SetPlayerPos(playerid, 215.4444,111.5859,999.0156);
Код:
SetPlayerPos(playerid, 219.4444,111.5859,999.0156);
Код:
SetPlayerPos(playerid, 223.4444,111.5859,999.0156);
Код:
SetPlayerPos(playerid, 227.4444,111.5859,999.0156);
When the suspect is correctly placed in the cell, cop recieves 1250$ and SendClientMessageToAll says "Officer (copname) jailed suspect (Suspect name)."

After 3 minutes in Jail, the prisoner should be released and spawn at

Код:
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, -1605.8398,717.2311,12.0362);
If you could make it so that if the suspect is of TEAM_WANTED a DIALOG_STYLE_MSGBOX will give him the choice of Bribing the Officer(looses 750$, the cop earns them) or go to Jail, when the officer correctly uses the given key within distance.


PLEASE - This means a lot to me, so if someone would spend some of their precious time doing this for me, I'll be really happy and give you credit for my mod.

PS: Yes, I did search all over the forums and the webs for this but couldn't find something that I could apply to my mod.

Thanks in advance, sorry for posting it here, but had no clue where else to get help(script request thread = pointless to me).
Reply
#2

bump.
Reply
#3

Bump. I'll keep bumping.
Reply
#4

Bump. At least just give me some info on how I could do this myself? Anybody?
Reply
#5

b) Do not bump
Some people apparently think they are important enough to bump their own topic after 10 minutes.
You can bump topics when the last reply is at least 12 hours old.
Reply
#6

10 minutes? Take 9th grade too, that might help your math. I bump after it's on page 5 and many hours old.
Reply
#7

That is a quote from the rules page, read it http://forum.sa-mp.com/index.php?topic=67900.0

b) Do not bump
Some people apparently think they are important enough to bump their own topic after 10 minutes.
You can bump topics when the last reply is at least 12 hours old.

READ THE RED, and watch the attitude.
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)