SA-MP Forums Archive
[Tool/Web/Other] Random Police Calls - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Tools and Files (https://sampforum.blast.hk/forumdisplay.php?fid=82)
+---- Thread: [Tool/Web/Other] Random Police Calls (/showthread.php?tid=286972)

Pages: 1 2


Random Police Calls - Money_Man - 01.10.2011

Admin and/or mods. if this isn't in the right place PLEASE pm me and tell me so i know what im doing wrong so i can put it in the right place
================================================== ====================================

This is one of the most asked for things i seen on SAMP. Ok what this does is gives law enforcement on ANY server something to do other then just drive around messing with people as they sometimes do. This has 34 calls to it and can be more if you wish it to be.

Q) Will this put up random messages to cops or just a id
A) This was made to send a message to any cop group on a server(LSPD, RCSD, SFPD, LVPD, BCSD ETC)

Q) Does it do what it says it will do
A) Yes just look at the photos

Q) Can it be made for a FS
A) Yes it can be. it can be made for anything

Q) Can i set up to give 50 random calls
A) Yes you can set it up to give a 1000 random calls

Q) What is it used for and why
A) what it does is send ANY & ALL law enforcement a call from dispatch telling them there is a problem some place. cops go to the call an check it out. calls can be anything from stolen cars to fights to suspicious people and/or vehicle. you pretty much set it up for what works best on your server.

Now the WHY. after being on a lot of RP servers and hearing all the time cops have nothing better to do then to mess with me/us. now they wont be and hopefully RP servers that use this will have better RPERS on the server because of this now

Photos of the calls






Codes for it
This Goes into your FORWARDS area
pawn Код:
forward StartRandomPolice();


This goes into your NEW area
pawn Код:
new RandomPoliceTimer;
new RandomPoliceActive;
new RandomPoliceCount;
new RandomPoliceLocations[256];
new RandomPoliceLocation[256];
new Float:RandomPolice_X;
new Float:RandomPolice_Y;
new Float:RandomPolice_Z;
new PoliceBadge;



the next 3 areas are for your text and other stuff they go into your jobs spawn area
pawn Код:
new Float:RandomPoliceSpawns[34][3] = {
{1317.7614,-1387.8906,13.5653}, // Suspicious Person, Los Angeles Taxi Company
{932.3104,-1389.6365,13.4667}, // Reckless Driver, Passadena Blvd
{976.3500,-976.4903,39.4948}, // Reckless Driver, W Broadway
{1350.0300,-1300.1746,15.6358}, // Reckless Driver, ST  Lawrance Blvd
{375.1496,-2011.9246,7.8359}, // Suspicious Person, The Big Wheel, Santa Maria Beach
{1950.0763,-1758.7596,13.5469}, // Wanted Felon, Vicinity Of Idlewood Gas Station
{2163.8889,-1206.9207,23.9688}, // Suspicious Person, Vicinity Of 24/7, Jefferson
{612.8145,-1227.9419,18.4063}, // Possible 211 In Progress, Rodeo Bank
{1722.5828,-1293.3348,13.5469}, // Possible 211 In Progress, Downtown Bank
{1710.6943,-559.2007,36.1844}, // Reckless Driver, Interstate 25 North Bound
{1298.4282,254.7171,19.5547}, // Reckless Driver, Montgomery
{1289.8003,-77.6576,36.5789}, // Suspected Gang Activity, Vicinity Of Montgomery
{1190.3635,-168.3433,40.6870}, // Suspected Stolen Vehicle Activity, Montgomery
{689.5113,-492.3813,16.3359}, // Suspected Stolen Vehicle Activity, Dillimore
{463.7082,-399.1773,27.6596}, // Reckless Driver, Vicinity Blueberry & Dillimore
{239.6076,-79.8813,1.5781}, // Suspicious Person, Blueberry
{2351.3176,98.4984,26.4766}, // Suspected Gang Activity, Vicinity Of Palomino Creek
{2765.6616,-31.6404,35.3274}, // Reckless Driver, Vicinity Of Interstate 425 East Bound
{2885.5742,-696.4890,10.8359}, // Reckless Driver, Vicinity Of Interstate 425 East Bound
{1724.0073,272.5658,18.0963}, // Reckless Driver, Vicinity Of Reagan Intersection
{757.5554,316.7169,20.2077}, // Suspicious Person, Vicinity Of Hampton Barns
{-771.6710,-106.3322,65.1750}, // Suspicious Person, Vicinity Of the panopticon
{-252.3721,-278.4352,1.4444}, // Suspicious Vehicle, Vicinity Of SR 13 and SR 9
{2148.3679,-1342.3268,23.6793}, // BOLO, Stolen Vehicle, Plate: 287UKL (Verify Plate Number)
{1947.4996,-2117.2244,13.6900}, // BOLO, Stolen Vehicle, Plate: 288QUE (Verify Plate Number)
{1277.2705,-1324.2887,13.4924}, // BOLO, Stolen Vehicle, Plate: 289ONT (Verify Plate Number)
{708.0647,-464.4996,16.4795}, // BOLO, Stolen Vehicle, Plate: 290XML (Verify Plate Number)
{670.4634,-620.6082,16.4791}, // SBOLO, Stolen Vehicle, Plate: 291PSD (Verify Plate Number)
{639.5999,-499.8471,16.4792}, // BOLO, Stolen Vehicle, Plate: 292BNP (Verify Plate Number)
{93.0120,-198.3522,1.6650}, // BOLO, Stolen Vehicle, Plate: 293ADQ (Verify Plate Number)
{2253.2766,22.3337,26.3008}, // BOLO, Stolen Vehicle, Plate: 294PCC (Verify Plate Number)
{2256.4255,-82.0737,26.6781}, // BOLO, Stolen Vehicle, Plate: 295REP (Verify Plate Number)
{1753.0812,-1013.9893,23.6558}, // BOLO, Stolen Vehicle, Plate: 296GOP (Verify Plate Number)
{1586.9752,-1050.9066,23.6010} // BOLO, Stolen Vehicle, Plate: 297FOX (Verify Plate Number)
};
pawn Код:
new RandomPoliceLocationsNames[][] = {
"Los Angeles Police Dept",
"Los Angeles Police Dept",
"Los Angeles Police Dept",
"Los Angeles Police Dept",
"Los Angeles Police Dept",
"Los Angeles Police Dept",
"Los Angeles Police Dept",
"Los Angeles Police Dept & Los Angeles Sheriff Dept",
"Los Angeles Police Dept & Los Angeles Sheriff Dept",
"Los Angeles Sheriff Dept",
"Montgomery Town Marshal",
"Montgomery Town Marshal & Los Angeles Sheriff Dept",
"Montgomery Town Marshal & Los Angeles Sheriff Dept",
"Dillimore Town Marshal",
"Dillimore Town Marshal & Blueberry Town Marshal",
"Blueberry Town Marshal",
"Palomino Creek Town Marshal & Los Angeles Sheriff Dept",
"Palomino Creek Town Marshal & Los Angeles Sheriff Dept",
"Los Angeles Sheriff Dept",
"Los Angeles Sheriff Dept",
"Los Angeles Sheriff Dept",
"Los Angeles Sheriff Dept",
"Los Angeles Sheriff Dept",
"All Law Enforcement Depts",
"All Law Enforcement Depts",
"All Law Enforcement Depts",
"All Law Enforcement Depts",
"All Law Enforcement Depts",
"All Law Enforcement Depts",
"All Law Enforcement Depts",
"All Law Enforcement Depts",
"All Law Enforcement Depts",
"All Law Enforcement Depts",
"All Law Enforcement Depts"
};
pawn Код:
new RandomPoliceLocationNames[][] = {
"Suspicious Person, Los Angeles Taxi Company",
"Reckless Driver, Passadena Blvd",
"Reckless Driver, W Broadway",
"Reckless Driver, ST  Lawrance Blvd",
"Suspicious Person, The Big Wheel, Santa Maria Beach",
"Wanted Felon, Vicinity Of Idlewood Gas Station",
"Suspicious Person, Vicinity Of 24/7, Jefferson",
"Possible 211 In Progress, Rodeo Bank",
"Possible 211 In Progress, Downtown Bank",
"Reckless Driver, Interstate 25 North Bound",
"Reckless Driver, Montgomery",
"Suspected Gang Activity, Vicinity Of Montgomery",
"Suspected Stolen Vehicle Activity, Montgomery",
"Suspected Stolen Vehicle Activity, Dillimore",
"Reckless Driver, Vicinity Blueberry & Dillimore",
"Suspicious Person, Blueberry",
"Suspected Gang Activity, Vicinity Of Palomino Creek",
"Reckless Driver, Vicinity Of Interstate 425 East",
"Reckless Driver, Vicinity Of Interstate 425 East Bound",
"Reckless Driver, Vicinity Of Reagan Intersection",
"Suspicious Vehicle/Person, Vicinity Of Hampton Barns",
"Suspicious Vehicle/Person, Vicinity Of The Panopticon",
"Suspicious Vehicle/Person, Vicinity Of SR 13 and SR 9",
"BOLO, Stolen Vehicle, Plate: 287UKL (Verify Plate Number)",
"BOLO, Stolen Vehicle, Plate: 288QUE (Verify Plate Number)",
"BOLO, Stolen Vehicle, Plate: 289ONT (Verify Plate Number)",
"BOLO, Stolen Vehicle, Plate: 290XML (Verify Plate Number)",
"BOLO, Stolen Vehicle, Plate: 291PSD (Verify Plate Number)",
"BOLO, Stolen Vehicle, Plate: 292BNP (Verify Plate Number)",
"BOLO, Stolen Vehicle, Plate: 293ADQ (Verify Plate Number)",
"BOLO, Stolen Vehicle, Plate: 294PCC (Verify Plate Number)",
"BOLO, Stolen Vehicle, Plate: 295REP (Verify Plate Number)",
"BOLO, Stolen Vehicle, Plate: 296GOP (Verify Plate Number)",
"BOLO, Stolen Vehicle, Plate: 297FOX (Verify Plate Number)"
};


This goes into your MISCELLANEOUS Area

pawn Код:
RandomPoliceActive = 0;


This goes into your server side jobs or jobs area
pawn Код:
//Random Police Dispatch

public StartRandomPolice()
{


    if(RandomPoliceCount == 0){

        new RAND = random(sizeof(RandomPoliceSpawns));
        RandomPolice_X = RandomPoliceSpawns[RAND][0];
        RandomPolice_Y = RandomPoliceSpawns[RAND][1];
        RandomPolice_Z = RandomPoliceSpawns[RAND][2];
        format(RandomPoliceLocations, 256, "%s", RandomPoliceLocationsNames[RAND]);
        format(RandomPoliceLocation, 256, "%s", RandomPoliceLocationNames[RAND]);

        PoliceBadge = CreateDynamicObject(1247,  RandomPolice_X,RandomPolice_Y,RandomPolice_Z-2,  0.000,00.000,18.00);

        format(erpstring, sizeof(erpstring), "-------------------------------------------------------------------------------------------------------------");
        SendMessageToALLLAWred(erpstring);
        format(erpstring, sizeof(erpstring), "LOS ANGELES CENTRAL LAW ENFORCEMENT DISPATCH");
        SendMessageToALLLAWred(erpstring);
        format(erpstring, sizeof(erpstring), "Be Advised. The following Report Below Was Taken By Dispatch.");
        SendMessageToALLLAWred(erpstring);
        format(erpstring, sizeof(erpstring), "Responding Department: %s", RandomPoliceLocations);
        SendMessageToALLLAWred(erpstring);
        format(erpstring, sizeof(erpstring), "Nature Of The Call & Location: %s", RandomPoliceLocation);
        SendMessageToALLLAWred(erpstring);
        format(erpstring, sizeof(erpstring), "ALL NEIGHBORING AGENCYS PLEASE STAND BY FOR BACK UP IF NEEDED.");
        SendMessageToALLLAWred(erpstring);
        format(erpstring, sizeof(erpstring), "ADDITIONAL INFORMATION: OFFICER SAFETY IS IMPORTANT.");
        SendMessageToALLLAWred(erpstring);
        format(erpstring, sizeof(erpstring), "ASK FOR ANOTHER UNIT TO RESPOND WITH YOU.");
        SendMessageToALLLAWred(erpstring);
        format(erpstring, sizeof(erpstring), "-------------------------------------------------------------------------------------------------------------");
        SendMessageToALLLAWred(erpstring);

        RandomPoliceTimer = SetTimer("StartRandomPolice",30000,1);
        RandomPoliceActive = 1;
        RandomPoliceCount++;
    }

    else if(RandomPoliceCount == 3){

        KillTimer(RandomPoliceTimer);
        RandomPoliceActive = 0;
        RandomPoliceCount = 0;
        DestroyDynamicObject(PoliceBadge);
       
        format(erpstring, sizeof(erpstring), "Central Dispatch. Situation Has Been Dealt With. All Units Are Code 4 From This Call."),
        SendMessageToALLLAW(erpstring);

        }else{

        RandomPoliceCount++;

    }
}


this goes into your MAINTENANCE area for all your stuff to work right. it works better if placed in MAINTENANCE_T4
pawn Код:
// AUTOMATED POLICE GENERATION SYSTEM
            if(RandomPoliceActive == 0){
            RandomPoliceCount = 0;
            StartRandomPolice();
            }



Re: Random Police Calls - Danny - 01.10.2011

This looks nice, but please use [pawn] tags for your code.


Re: Random Police Calls - Money_Man - 01.10.2011

Quote:
Originally Posted by -Danny-
Посмотреть сообщение
This looks nice, but please use [pawn] tags for your code.
everyone saying but no one is telling why.


Re: Random Police Calls - Danny - 02.10.2011

Quote:
Originally Posted by Money_Man
Посмотреть сообщение
everyone saying but no one is telling why.
Because that's easier to copy/read.


Re: Random Police Calls - Money_Man - 02.10.2011

done


Re: Random Police Calls - Kazuo - 03.10.2011

simple and awesome


Re: Random Police Calls - Steven82 - 04.10.2011

This actually seems pretty cool. Good job.


Re: Random Police Calls - Money_Man - 07.10.2011

i have been getting a lot of good feed back and even pm's on this. ok so let me answer a few questions

1Q) can you add more to it
1A) Yes you can add as many as you want to add. just make sure you add the right number up top if not you will get an error (new Float:RandomPoliceSpawns[34][3])

2Q) What if i only have 1 cop group or 2
2A) all you will need to do is just remove what you don't have and replace with what you do have

3Q) what scripts does this work in
3A) i don't know you tell me. it works fine in mine and i have a crazy script

Any other questions please feel free to ask in pm or in here i do check on it


Re: Random Police Calls - Kwarde - 07.10.2011

So this is actually a fake report? I mean, they get a report, but there is not actually a suspect or anything. Correct me if I'm wrong please.


Re: Random Police Calls - array13 - 07.10.2011

^^your correct, but correctly configurated for a rpg server, will work better


Re: Random Police Calls - Money_Man - 07.10.2011

Pretty much. it gives your law enforcement something to do. you can change it up to something that can be going on. i done this just to get it out there.

What you do with it is up to you. but if you was on my server which is beta at this time. most of the calls that is up there would be real calls if you had a server over 30+ people. it's just something could help and bring people to your server. if you don't like it or don't want to use it. that's up to you


Re: Random Police Calls - Lookin - 07.10.2011

any chance of a example filterscript?


Re: Random Police Calls - Money_Man - 08.10.2011

i don't have time to do one. i only get a few mins here and there to get on. so if you know how to do one go for it


Re: Random Police Calls - Lookin - 09.10.2011

aight ill put one together the next time im home n send ya a link if ya like


Re: Random Police Calls - Money_Man - 10.10.2011

that would be awesome man. good luck to you


Re: Random Police Calls - GrimR - 10.10.2011

Should add NPC's or actually detect common laws broken like cartheft, loitering, firing of guns etc.


Re: Random Police Calls - Zonoya - 22.10.2011

i compile this thing in my gamemode and i get a fuck load of errors and i take it out and its fine again O.o


Re: Random Police Calls - Money_Man - 23.10.2011

yeah as i said on the first page it set up for my server/script that you would have to fix it to get it to work in your script unless someone does it as a FS


Re: Random Police Calls - sherlock - 23.10.2011

Someone make it a FS please :P

I dont get why theres a part with co-ordinates surely its just the calls they get if they have to rp it why need co-ords?


Re: Random Police Calls - Money_Man - 07.11.2011

any updates on the FS?