IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

Post mod/code requests in the Mod Requests topic

Post mod releases in the Mod Showroom

Read the Modding Rules BEFORE posting!

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


Pages: (2) 1 [2]   ( Go to first unread post ) Reply to this topicStart new topicStart Poll

 Scripting for GTA IV?

 
L0uNGeR  
Posted: Saturday, May 14 2011, 18:29
Quote Post


Ya, that's what I said.
Group Icon
Group: Members
Joined: Dec 3, 2008

nl.gif

XXXXX



Well the code was actually a straight copy/paste from a much bigger script....
You should probably check the TestScripts.cs from the ScriptHook.Net package, there's "private" and "this" in every class and my code is not much different.
I'm not saying I know best, I'm still learning and I appreciate the help.
PM
  Top
 

 
Donny78  
Posted: Saturday, May 14 2011, 23:31
Quote Post


Zombie
Group Icon
Group: Members
Joined: Jul 18, 2008

en.gif

XXXXX



I'm no expert either (by far!), it was just something I noticed so I thought I'd throw my two cents in dude icon14.gif

It's a good suggestion to look at the examples, not looked at them since a very early version of the scripthook.
PM
  Top
 

 
gavlar1992  
Posted: Thursday, Mar 29 2012, 16:16
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Mar 29, 2012

XXXXX



Could someone help me create this, i'm pretty much new to scripting/coding. i really would want this to work though

OK, so i have a really cool new idea. I've recently started adding extra (not replacing) vehicles into the game, and a few times i've added a car that is a tuned version of one i already have, and added the ext_rare tag to it.. so its kinda like a rare tuned version... eg i have a mercedes and the amg version.. bmw and the haman version etc

MY IDEA: seeing as theres lots of these car mods kicking around and i was thinking of making a mod whereby you would go to brucies garage with a certain car.. eg a sultan and you would pay so much money and it would give you a sultanrs... so thus 'tuning' the car.. even though its just swapping the model. so im guessing the script would check the car name, display a prompt somewhere or even a menu, asking if you want it pimped, if yes then destroy the car, take x amount of money and spawn the new car associated with that car.. i.e sultanrs if the players car is a sultan.. and in my case 'turismogt' if players car is 'turismo'... etc... i get the idea but i'm no good at coding.. i can read basic bits etc but not create a script really from scratch without some help... could someone please help me with this?

I think this mod would be pretty impressive.. hey it could even turn into a huge overhaull and come with its own IMG file of these extra modded vehicles.. gtaiv NEEDS some form of tuning cars, even if its not really doing so.

Any help is much appreciated.
PM
  Top
 

 
lamar_mustapha  
Posted: Thursday, Mar 29 2012, 19:53
Quote Post


Player Hater
Group Icon
Group: BUSTED!
Joined: Mar 17, 2012

XXXXX



i would assume u need the hash and then create using hash, try using the model name u added to vehicles.ide to get it's hash code

http://www.gtamodding.com/index.php?title=CREATE_CAR
http://www.gtamodding.com/index.php?title=GET_HASH_KEY

C#
CODE
int myAddedCarsHash = GTA.Native.Function.Call("GET_HASH_KEY", "ModelNameofCarAdded");
Vehicle myCar = null;

GTA.Native.Function.Call("CREATE_CAR", myAddedCarsHash, Game.LocalPlayer.Character.Position.X, (Game.LocalPlayer.Character.Position.Y + 5), Game.LocalPlayer.Character.Position.Z, myCar, true);

GTA.Native.Function.Call("SET_CAR_ON_GROUND_PROPERLY", myCar);
myCar.Heading = Game.LocalPlayer.Character.Heading;


im just taking a wild guess but try that, i positioned car on ground in front of u with car pointing the direction u r looking

This post has been edited by lamar_mustapha on Thursday, Mar 29 2012, 20:09
PM
  Top
 

 

0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)

0 Members:

Pages: (2) 1 [2] 

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG