Everything posted by LtFlash
-
why so many disregards?
Reduce your graphics settings, vehicle density and you'll see the difference.
-
Small programming questions - API
Yep, you got it right.
-
Small programming questions - API
Talking about new API functions; would it be possible to get all peds arrested by a player? It would let us to teleport LocalPlayer + partners + arrested peds (all we need), eg. from a roof of a bldg without an interior. ...and SetPursuitTactics() is something I definitely need for a new call. Thanks!
- Callout "Traffic Backup"
-
Small programming questions - API
OK, now I got it worked out. When I tried to locate the issue I've tried to use enum : int which gave me the same result as [Flags] - that where an idea of posting here comes from. With your tips I managed to understand the whole concept, it's damn genius. I wish I discovered it earlier I want to add one more thing to your explanation, maybe it turn our to be helpful for someone. 0x0..0x10 are numbers in hexadecimal notation. In this (already working) example: [Flags] internal enum EState { None = 0x0, Away = 0x1, Close = 0x2, Scenario = 0x4, Wait = 0x8, End = 0x10, MoreEnd = 0x20, EvenMoreEnd = 0x40, }; ...you can see powers of two which is easier to read in this form: [Flags] internal enum EState { None = 0, Away = 1, Close = 2, Scenario = 4, Wait = 8, End = 16, MoreEnd = 32, EvenMoreEnd = 64, }; ...and works the same way. Using bit flags you can have more than one State active: this.State = EState.Scenario | EState.End; //OR you can turn off one of active States with XOR: this.State = this.State ^ EState.Scenario; Once more thanks, it'll bring new quality into my simple scripts.
- The Wasteland - callouts for Bohan
- The Wasteland - callouts for Bohan
-
Street stories
-
Friday night #3
From the album: Street stories
05:46 [58PCT] Shit hit the fan, Central. Where's the cavalry? -
Friday night #4
From the album: Street stories
05:58 [58PCT] 58-Mike is requesting a bus in rush mode, situation is code 4. -
Friday night #2
From the album: Street stories
05:42 [58PCT] 10-13 in regards to shots being fired at police. -
Friday night #1
From the album: Street stories
05:35 [58PCT] Commercial alarm on Alcatraz Ave. -
Small programming questions - API
1) Let me show an example as I discovered where's the problem: [Flags] private enum EState { Away = 0x0, Close = 0x1, Scenario = 0x2, Wait = 0x3, End = 0x4, }; this.RegisterStateCallback(EState.Away, Away); this.RegisterStateCallback(EState.Close, Close); this.RegisterStateCallback(EState.Scenario, Scenario); this.RegisterStateCallback(EState.Wait, Wait); this.RegisterStateCallback(EState.End, StateEnd); this.State = EState.Away; private void Away() { if (LPlayer.LocalPlayer.Ped.Position.DistanceTo(spawn.Position) < 50.0f) { blipSpawn.Delete(); this.State = EState.Close; } Log.Info("Away()", "CallbackState"); } private void Close() { if (LPlayer.LocalPlayer.Ped.Position.DistanceTo(spawn.Position) < 15.0f && LPlayer.LocalPlayer.Ped.CanSeePed(pedSuspect)) { this.State = EState.Scenario; } Log.Info("Close()", "CallbackState"); } private void Scenario() { pedSuspect.Task.ClearAllImmediately(); pedSuspect.Task.FleeFromChar(LPlayer.LocalPlayer.Ped); this.State = EState.Wait; Log.Info("Scenario()", "CallbackState"); } private void Wait() { Log.Info("Wait()", "CallbackState"); this.State = EState.End; } private void StateEnd() { Log.Info("StateEnd()", "CallbackState"); } Here's the outcome in the log file when State == EState.End: [INFO - 4:59:41 PM] [CallbackState] Away() [INFO - 4:59:41 PM] [CallbackState] Close() [INFO - 4:59:41 PM] [CallbackState] Scenario() [INFO - 4:59:41 PM] [CallbackState] Wait() [INFO - 4:59:41 PM] [CallbackState] StateEnd() [INFO - 4:59:41 PM] [CallbackState] Away() [INFO - 4:59:41 PM] [CallbackState] Close() [INFO - 4:59:41 PM] [CallbackState] Scenario() [INFO - 4:59:41 PM] [CallbackState] Wait() [INFO - 4:59:41 PM] [CallbackState] StateEnd() That's how State is being changed without my control - on the stage of the last registered state all previous ones are being called = if any conditional clause returns true the current State is changed. Am I doing something wrong? 2) I hope you guys can fix in the next next update, I don't need nothing more about it xD. @Sam It seems to me that one or another Easton area was misspelled, I'm not sure though.
-
93 AUX
-
Small programming questions - API
LMS, I've got two issues I need your help with: 1) RegisterStateCallback + State I thought it work like an improved version of switch..case but the State property of my script changes without my "help". I guess it works on basis of if() scanning them in all registered functions am I right? I'd like to decide myself when I want to change State and do it in the predefined order, is there a way to do it without additional bools? 2) Functions.GetAreaStringFromPosition() It returns "Cervaza Heights" instead of "Cerveza Heights".
-
Noticed a sketchy thing today.
If they had plates I'd say they might be surveillance vans. You should write down every detail about cars and drivers you remember, it might be helpful for the police.
-
How the hell do I heal this cold sore?
Is it a blister full of transparent liquid? Cotton wool moistened with alcohol can help you to reduce the amount of liquid in the blister, ointment with acyclovir is helpful in an early stage of an illness. The total duration is like 7-14 days, depends on if it's your first time, other infections etc.
-
Pre 90's unmarked police vehicle.
Hystery gave you the best what we got ATM, Caprices were widely used by NYPD and Impala is just a cheaper version of it - you'll "keep it real" haha I can't recommend enough this pack: '?do=embed' frameborder='0' data-embedContent>> the included unmarked Caprice is the most beautiful Chevy ever created to GTA IV and it should blend it to 88 pack. Here's LTD: '?do=embed' frameborder='0' data-embedContent>> you can change it's livery to all-black and get a FBI car. Or Men in Black.
- GTA IV Police Dispatch Mod
-
.ini question
String.Split() is for sure the best way. A classic method is to cycle through a string, search for a given separator and, using positions of founded separator(s) copying shorter strings into an array. That's an overkill in times of libraries and stuff like that.
- LCPD
-
The Wasteland
- 97 comments
- 29 reviews
-
There are people..then there is this guy....
You gotta be kiddin' me... Seriously, it's a joke, right?
-
The Wasteland - callouts for Bohan
As an Officer you got a 6th sense to spot armed people, they walk differently, are nervous and stuff like that. Pics of wanted persons are shown on roll-calls. Now - after spotting a suspect which has that red arrow above his head you'll see a displayed text (subtitle-like) which tell you what's the reason of spotting this specific individual. While searching one you'll find a gun, it turns out (s)he is wanted or it appears you failed miserably and the person is innocent like a child. There are also some more or less obvious scenarios that could happen, you'll see tl;dr version: It's like drunk person but the person isn't drunk.
-
The Mind-Boggling Classic Cop Car Thread
RMPs with snow chains somewhere in NYC Photo by Allen Tenenbaum, 70's