|
 |
|
|
|
|
|
GTA Modification Forums
Help with script for new game unlock map, delete cutscenes
 |
|
 |
| |
Don Wasyl  |
|
Player Hater

Group: Members
Joined: Jun 22, 2007


|
Hi I'm a begginer in scripting for gta iv (i know c++ language), but needs your help. I would like to write script in which I could: 1. unlock map (I can't find function which is responsible for this) 2. delete startup cutscenes 3. disable peds 4. place custom object in map, and rotate it when I get closer Can I do it in C# script without interference in scripts.img (1.-2.)? Maybe, this is easy, but I think I'm not the only who can take advantage of your help
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Skorpro  |
Posted: Wednesday, May 30 2012, 20:06
|
GTAholiker

Group: Members
Joined: Jul 19, 2009


|
| QUOTE (Don Wasyl @ Friday, May 25 2012, 21:40) | 1. unlock map (I can't find function which is responsible for this) 2. delete startup cutscenes 3. disable peds 4. place custom object in map, and rotate it when I get closer
|
Dzien dobry, try the following codes (for aru's C++ Script Hook Version 0.4.0 (Development Kit)! 1. Unlock all bridges/islands| QUOTE | SetIntStat(STAT_ISLANDS_UNLOCKED, 3); // STAT_ISLANDS_UNLOCKED = 363
| 2. I have no idea!3. Disable peds| QUOTE | f32 x, y, z; GetCharCoordinates(GetPlayerPed(), &x, &y, &z); ClearAreaOfChars(x, y, z, 400.0f); ClearAreaOfCops(x, y, z, 400.0f); SetPedDensityMultiplier(0.0); // Switch all peds OFF
| 4. Create object and rotate| QUOTE | Object object; // GLOBAL!
.........
eModel model = 185750165; // CJ_NF_GARAGE_DOOR => 185750165 => 0x0B125295 // Set your coords here f32 x = -420.245f; f32 y = 1137.605f; f32 z = 12.530f; f32 a = 90.0f; // angle = 90°
RequestModel(model); while(!HasModelLoaded(model)) { Wait(0); } CreateObject(model, x, y, z, &object, 1); SetObjectCollision(object, 1); SetObjectVisible(object, 1); SetObjectHeading(object, a);
.........
while(IsThreadAlive()) { if (IsCharInArea3D(GetPlayerPed(), 900.0f, 700.0f, 20.0f, 999.0f, 799.0f, 29.0f, 0)) // This are example coords only!!! { RotateObject(object, 90.0f, 10.f, 1); } Wait(0); }
| IMPORTANT: Add this to scripting.h| CODE | static void RotateObject(Object obj, float angle, float rotSpeed, b8 unknown) { NativeInvoke::Invoke<NATIVE_ROTATE_OBJECT, ScriptVoid>(obj, angle, rotSpeed, unknown); } static void SetPedDensityMultiplier(f32 pedDensity) { NativeInvoke::Invoke<NATIVE_SET_PED_DENSITY_MULTIPLIER, ScriptVoid>(pedDensity); }
|
| QUOTE | | Can I do it in C# script without interference in scripts.img (1.-2.)? |
Yes (point 1,3 and 4)! Convert my codes to C#. Point 2: I don't know! Good luck
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
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.
| |
 |
|
 |
|
|
|
|