05.02.2010, 22:22
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:
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:
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
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).
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; }
Код:
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);
After 3 minutes in Jail, the prisoner should be released and spawn at
Код:
SetPlayerInterior(playerid, 0); SetPlayerPos(playerid, -1605.8398,717.2311,12.0362);
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).