The Big House
-
Joined
-
Last visited
Posts posted by The Big House
-
-
Edited by The Big House
Hi folks,
I am starting to learn to write scripts for Rage and am struggling as a beginner. It is a little bit intimidating just to print a Hello, World text.
I mean, I have figured out how to use Game.DisplayNotification, Game.DisplayHelp, etc, but I am trying to figure out how to draw text to the screen.
For my first script, I want to write a simple speedometer, with nothing fancy that just displays my player's current vehicle, with no other features. Here's my code:
I am able to load the plugin into Rage, but my speedometer handle isn't being called at all.
Attached is my code:
public static void Main() { GameFiber.StartNew(delegate { if(Game.LocalPlayer.Character.IsInAnyVehicle(false)) { Game.FrameRender += Speedometer; } while (true) { GameFiber.Yield(); } }); } private static void Speedometer(object sender, GraphicsEventArgs e) { Ped playerPed = Game.LocalPlayer.Character; Game.LogTrivial("Speedometer is being called."); Vehicle vehicle = playerPed.CurrentVehicle; Rectangle drawRect = new Rectangle(1, 250, 230, 117); e.Graphics.DrawRectangle(drawRect, Color.FromArgb(200, Color.Black)); e.Graphics.DrawText(vehicle.Speed.ToString(), "Arial Bold", 20.0f, new PointF(0f, 0f), Color.White, drawRect); }I have looked at the Rage Plugin hook documentation, but it does not really explain much on Drawing text. I have watched Albo1125's videos on C#, and have also looked at his source code on git hub for days, but I still have no idea what I'm doing wrong.
Any help is much appreciated. Also will appreciate better places to learn more about Rage development.
Thanks!!
-
Edited by dumbrabbit
I have your problem - it never finishes loading, running via the ragehook.
Eventually got a "LSPDFR was terminated because it caused the launcher to freeze" error while the game was loading.
I posted here because mine kind of relates to your problem with almost similar reports, so that's why I didn't create my own thread.
[6/19/2015 8:47:42 PM.863]
[6/19/2015 8:47:42 PM.873]
[6/19/2015 8:47:42 PM.873]
[6/19/2015 8:47:42 PM.873] ====================================================================================================
[6/19/2015 8:47:42 PM.873] Started new log on 6/19/2015 8:47:42 PM.863
[6/19/2015 8:47:42 PM.873] ====================================================================================================
[6/19/2015 8:47:42 PM.861] Log path: C:\Games\Rockstar Games\RagePluginHook.log
[6/19/2015 8:47:42 PM.874] Log verbosity: Verbose
[6/19/2015 8:47:42 PM.875] ================ RAGE Plugin Hook ================
[6/19/2015 8:47:43 PM.055] Product name: Grand Theft Auto V
[6/19/2015 8:47:43 PM.055] Product version: 1.0.372.2
[6/19/2015 8:47:43 PM.055] Is steam version: False
[6/19/2015 8:47:43 PM.936] Supported version detected
[6/19/2015 8:47:43 PM.936] ==================================================
[6/19/2015 8:47:43 PM.940] Patched IsDebuggerPresent
[6/19/2015 8:47:43 PM.940] Patched low level keyboard hook
[6/19/2015 8:47:43 PM.940] Unhooked low level keyboard hook
[6/19/2015 8:47:43 PM.940] Waiting for game initialization
[6/19/2015 8:47:50 PM.547] Initializing hook
[6/19/2015 8:47:50 PM.547] Completing interoperability
[6/19/2015 8:47:50 PM.547] Initialization code 1.
[6/19/2015 8:47:50 PM.547] Initialization code 2.
[6/19/2015 8:47:50 PM.547] Initialization code 3.
[6/19/2015 8:47:50 PM.547] Initialization code 4.
[6/19/2015 8:47:50 PM.547] Initialization code 5.
[6/19/2015 8:47:50 PM.548] Initialization code 6.
[6/19/2015 8:47:50 PM.548] Initialization code 7.
[6/19/2015 8:47:50 PM.548] Initializing DirectX
[6/19/2015 8:47:50 PM.579] Initializing Direct3D
[6/19/2015 8:47:50 PM.985] Swap Chain created: 0x568545F240
[6/19/2015 8:47:50 PM.985] Swap Chain VTable: 0x568545F240
[6/19/2015 8:47:50 PM.985] Swap Chain VTable_2: 0x7F976BC83A0
[6/19/2015 8:47:50 PM.985] D3D11Present: 0x7F976BBED00
[6/19/2015 8:47:50 PM.990] D3D11ResizeBuffers: 0x7F976BCCE70
[6/19/2015 8:47:50 PM.990] D3D11ResizeTarget: 0x7F976BE7E14
[6/19/2015 8:47:50 PM.990] Getting device
[6/19/2015 8:47:50 PM.990] Retrieved device
[6/19/2015 8:47:50 PM.990] Creating wrapper
[6/19/2015 8:47:50 PM.990] D3D11SetFullscreenState: 0x7F976BCC3B0
[6/19/2015 8:47:50 PM.998] Direct3D initialized
[6/19/2015 8:47:51 PM.004] Initialized DirectX
[6/19/2015 8:47:51 PM.345] Wrapper created
[6/19/2015 8:47:51 PM.364] Effect created
[6/19/2015 8:47:51 PM.364] Creating buffer
[6/19/2015 8:47:51 PM.365] Created buffer
[6/19/2015 8:47:51 PM.365] Creating blend state
[6/19/2015 8:47:51 PM.365] Created blend state
[6/19/2015 8:47:51 PM.365] Done with creation
[6/19/2015 8:47:51 PM.761] Pixel Shader 5.0 not supported. Falling back to 4.0.
[6/19/2015 8:49:49 PM.713]
[6/19/2015 8:49:49 PM.757] Console variable 'WarnOnPluginLoad' is false, returning true.
[6/19/2015 8:49:49 PM.757] Loading plugin from path: C:\Games\Rockstar Games\Plugins\LSPD First Response.dll
[6/19/2015 8:49:52 PM.106] UNLOADED: Initializing input system
[6/19/2015 8:49:52 PM.125] UNLOADED: Initializing game console
[6/19/2015 8:49:52 PM.133] UNLOADED: Initializing forms manager
[6/19/2015 8:49:54 PM.199] ---------------------------------------------------------------------
[6/19/2015 8:49:54 PM.199] LSPD FIRST RESPONSE
[6/19/2015 8:49:54 PM.199] Version 0.1 Beta
[6/19/2015 8:49:54 PM.199] A G17 Media Modification
[6/19/2015 8:49:54 PM.200] - Developed by LMS & Sam
[6/19/2015 8:49:54 PM.200] - Special thanks to Cyan, Lt.Caine, Alexander Blade & MulleDK19
[6/19/2015 8:49:54 PM.200] © Copyright 2015, G17 Media, www.lspdfr.com
[6/19/2015 8:49:54 PM.200] ---------------------------------------------------------------------
[6/19/2015 8:49:54 PM.201] LSPD First Response: Running LSPD First Response 0.1 Beta
[6/19/2015 8:49:54 PM.201] LSPD First Response: Copyright © 2015, G17 Media, www.lspdfr.com
[6/19/2015 8:49:55 PM.243] LSPD First Response: WARNING! Plugin "LSPD First Response" was terminated because it caused the game to freeze.'Edit: Think this was wrong thread...
-
Edited by dumbrabbit
Recently had to re-install GTA V because of some problems and now I'm having difficulty with the pre-launcher.
I'm having issues with the "connection to server lost" problem. This happens pretty much every minute. It gets t around 1.5 MB per second and then the connection gets lost and gets slow again. Repeat.
I've tried deleting the .rpf part files as suggested on the rockstar forums, but unfortunately it hasn't really had much effect. Anyone have any other suggestions for workarounds or solutions to this problem, besides stopping/starting/closing/starting again the launcher? Apologies if this has been discussed already here(would love to be pointed to some links that also talk about this issue), but I can't find anything that works for me, unless I just have to deal with it.
Appreciate the help!
-
-
Edited by dumbrabbit
I'm sure that you guys have had problems with the updates...
But, am I the only one who has had no problems using the Native trainer/scripthook lately? I am using offline mode. I ran GTA with the latest update yesterday and a couple days ago, but have had none of the problems that has been said. I must be missing something, right?
-
Been playing GTA V for a while now, and here is one thought I can take away from playing GTA V vs GTA IV.
I can't tell you whether they're "better" than GTA IV, but man they're sure fun as hell to try to get away from, it's by far my favorite gameplay part in GTA V.
In GTA IV you simply had to get away from the wanted circle for a few seconds and then you are done. That really made getting away from 6-stars impossible unless you have really good skills. And even when you were in hiding, the cops always knew the area where you are hiding, so you can't lose them just by hiding, which made it insanely difficult to get away from 6 stars(only the very good few can do it)
In GTA V though, each cop has a field of view new, and you must not be seen by the cop for a while. It takes longer to lose them, which means you have to hide somewhere fast, because they know where your area is, but you just have to stay out of the line of sight for a while(It sounds more difficult than it really is, tbh). It's definitely easier to lose them in hiding, as it's easier when the helicopters come to help, because they too have a field of view, and if you manage to stay away from the cops' view and the helicopter's view for a while, you're free. Be warned though, the cops do search the area and there is a small chance that they will find you in a corner, unless you are hiding like say, behind a large vehicle, like a van.
By far my favorite part of the cops is driving away from them. in GTA IV their goal was to wreck you at any cost. In GTA V, their new goal is to ram you. You let them, and your tires will lock, making it insanely difficult to turn the vehicle. What makes this part fun is, right when they're about to ram you, you make a sharp turn and then watching them crash into another vehicle, repeat. Even if it's just changing lanes on the road when they're about to ram you they'll swerve and lose position. It's definitely more fun than GTA IV cops to try to lose them. Thee cop cars have a lot more horsepower in this game, and I mean a LOT more horsepower, which I just really enjoy watching them gain on me, only to get so close to ram me, I change lanes on my motorcycle(life support basically, if you are on a motorcycle, when they ram you it'll take a while for your character to gain conscious, and they will shoot you until you're dead, so don't let them ram you on a motocycle!) and watch them skid on the ground and crash into another cop car.
That's all I have to say. What's your guys's thoughts?,
-
-
Edited by dumbrabbit
Argh! The issues are back!
Well, not the issues I had before, but now the trainer is freezing my car by default, and now there's no way of getting it unfreezed. The "unfreeze car" option doesn't work because I never froze it.
Edit: Hold on a sec
Edit #2: I am having the same type of issues as before, except they are different. I haven't pushed any button and now there's text at the bottom of the screen that says "No previous object spawned". Another issue: When I select an option from the main menu, for instance, Car options, it always goes back to the first page. re-installing didn't help.
Edit #3: Yep, they're all coming back now, one GTA re-start after another. the car in reverse now, etc.
edit #4: Most of the issues are fixed now, but I still have the menu navigation problems. Any suggestions? I'm using the latest patch.
-
-
-
-
-
-
Edited by dumbrabbit
Nope, just tried it again, and unfortunately that didn't do the trick either. The annoying stuff came back.
Just tried uninstalling LCPDFR and that didn't work. Thought that perhaps a configuration had been conflicted between the trainer and FR but no, sadly.
So right now I just have to hope that I have good luck every time the game loads so that I can enjoy the SNT the way I want to.
Oh, and for those wondering, I use the Speed Up key, my favorite in the trainer, but I cannot edit the code in the trainer unfortunately.
One more edit: Any chance the SNT is different when ran via the launchGTA.exe vs GTAIV.exe?
-
-
Sorry it took so long to get back. I tried reducing settings, but alas, it didn't work.
Sometimes when I enable keys my car drives in reverse, hitting and crashing into everything in my path and will never let me drive normally unless I disable the keys.
Any other ideas or am I stuck because of the crap port that GTA is?
-
-
-
-
Just figured out what's causing the problem of the delay in the keyboard responsiveness in the SNT menu: it's not the SNT, but the game itself. Sometimes when the game loads when I want to turn right or left in the game it takes several seconds for it to respond to my keyboard. Anybody here know how to solve this? I'm using the latest patch, 1.0.7.0
-
-
I have an Asus laptop, I bought it specifically for gaming - it can handle pretty high-end gaming very well, but here's my specs:
Intel Core i5 -3230M CPU @ 2.60 GHz
Installed Memory: 8.00 GB
System type: 64-bit OS, 64 bit based operating processor
I have tried re-installing SNT but that hasn't worked, as it can still spawn peds whenever I press SNT enter.
Thanks for the advice, I will try it soon.
-
-
Simple Speedometer help
in GTA V Discussion & Media
Pardon the bump, but I would like a little help on this, just to get the basics down.