GTA Modification Forums
[GTAIV|REL|SRC] C++ Script Hook IV Scripting via C++
 |
|
 |
| |
jitsuin  |
Posted: Thursday, Jan 19 2012, 22:26
|
Meat Popsicle

Group: BUSTED!
Joined: Dec 6, 2011


|
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Skorpro  |
Posted: Tuesday, Feb 28 2012, 04:50
|
GTAholiker

Group: Members
Joined: Jul 19, 2009


|
| QUOTE (MOrdecki @ Friday, Jan 20 2012, 10:29) | I tried already, but it returns only hashes which i have to convert in to text... |
Hi, | CODE | f32 plx, ply, plz; u32 place1, place2;
...
GetCharCoordinates(GetPlayerPed(), &plx, &ply, &plz); FindStreetNameAtPosition(plx, ply, plz, &place1, &place2);
const ch *ccPlace = GetStringFromHashKey(place1);
PrintStringWithLiteralStringNow("STRING", ccPlace, 2000,1);
|
Don't forget: with " FindStreetNameAtPosition" you get only the name of the closest street, NOT the name of the street u'r standing... Why? I have no idea Życzę dużo zabawy
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
MOrdecki  |
|
Scripter

Group: Members
Joined: Jul 10, 2006


|
| QUOTE (Skorpro @ Tuesday, Feb 28 2012, 04:50) | | QUOTE (MOrdecki @ Friday, Jan 20 2012, 10:29) | I tried already, but it returns only hashes which i have to convert in to text... |
Hi,
| CODE | f32 plx, ply, plz; u32 place1, place2;
...
GetCharCoordinates(GetPlayerPed(), &plx, &ply, &plz); FindStreetNameAtPosition(plx, ply, plz, &place1, &place2);
const ch *ccPlace = GetStringFromHashKey(place1);
PrintStringWithLiteralStringNow("STRING", ccPlace, 2000,1);
|
Don't forget: with "FindStreetNameAtPosition" you get only the name of the closest street, NOT the name of the street u'r standing... Why? I have no idea
Życzę dużo zabawy | Really helpfull, dzieki !!!
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Callum  |
|
Player Hater

Group: Members
Joined: Nov 1, 2011

|
Hey, I was hoping somebody would be able to help me with ScriptHook... I've compiled a .dll (and renamed it to .asi for GTA IV) using the ScriptHook development kit, and am using the latest version of aru's ScriptHook. At first, the game was constantly crashing on load (either not responding or the process terminates). After replacing the compiled ScriptHook.dll with the redistributable version, it works somewhat; the game loads, but the scripts do not appear to be executing. I then checked the ScriptHook.log file and found; | QUOTE | Log start: Sun Apr 29 22:55:46 2012 ----------------------------------------------- [INFO] GTA IV Script Hook 0.5.1 - © 2009, Aru - Initialized [INFO] Process base address: 0x400000 [INFO] Auto detecting game version [FATAL] Failed to detect game version
|
I am using the Steam version of GTA IV (so I presume the latest version). Does anybody know why I am experiencing the aforesaid problems, or am I missing something? Thanks, Callum
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Prof_Farnsworth  |
|
Ambient Modder

Group: Members
Joined: Feb 25, 2011

|
| QUOTE (Callum @ Monday, Apr 30 2012, 17:46) | Hey, I was hoping somebody would be able to help me with ScriptHook...
I've compiled a .dll (and renamed it to .asi for GTA IV) using the ScriptHook development kit, and am using the latest version of aru's ScriptHook. At first, the game was constantly crashing on load (either not responding or the process terminates). After replacing the compiled ScriptHook.dll with the redistributable version, it works somewhat; the game loads, but the scripts do not appear to be executing.
I then checked the ScriptHook.log file and found;
| QUOTE | Log start: Sun Apr 29 22:55:46 2012 ----------------------------------------------- [INFO] GTA IV Script Hook 0.5.1 - © 2009, Aru - Initialized [INFO] Process base address: 0x400000 [INFO] Auto detecting game version [FATAL] Failed to detect game version
|
I am using the Steam version of GTA IV (so I presume the latest version). Does anybody know why I am experiencing the aforesaid problems, or am I missing something?
Thanks, Callum | Why are you renaming it to ".asi"? You can compile your script as "myMod.net.dll" and place it in the scripts folder and it should work fine. In order to make an asi mod, I believe you have to compile it as such, not just rename it.
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Callum  |
|
Player Hater

Group: Members
Joined: Nov 1, 2011

|
| QUOTE (Prof_Farnsworth @ Monday, Apr 30 2012, 21:41) | | QUOTE (Callum @ Monday, Apr 30 2012, 17:46) | Hey, I was hoping somebody would be able to help me with ScriptHook...
I've compiled a .dll (and renamed it to .asi for GTA IV) using the ScriptHook development kit, and am using the latest version of aru's ScriptHook. At first, the game was constantly crashing on load (either not responding or the process terminates). After replacing the compiled ScriptHook.dll with the redistributable version, it works somewhat; the game loads, but the scripts do not appear to be executing.
I then checked the ScriptHook.log file and found;
| QUOTE | Log start: Sun Apr 29 22:55:46 2012 ----------------------------------------------- [INFO] GTA IV Script Hook 0.5.1 - © 2009, Aru - Initialized [INFO] Process base address: 0x400000 [INFO] Auto detecting game version [FATAL] Failed to detect game version
|
I am using the Steam version of GTA IV (so I presume the latest version). Does anybody know why I am experiencing the aforesaid problems, or am I missing something?
Thanks, Callum |
Why are you renaming it to ".asi"? You can compile your script as "myMod.net.dll" and place it in the scripts folder and it should work fine. In order to make an asi mod, I believe you have to compile it as such, not just rename it. | I've done what you've said, renamed it back to .dll and placed it within the 'scripts' directory, but still no luck.
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Pages:
(86) « First ... 82 83 [84] 85 86
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
| |
 |
|
 |
|