Lorenzo3024 Posted August 15, 2012 Share Posted August 15, 2012 sorry, how can I spawn a vehicle and warp niko inside? this is my code: Public Class SpawnHoverCar Inherits Script Public Sub New() BindKey(Keys.PageUp, AddressOf SpawnCar) End Sub Public Sub SpawnCar() Dim v As Vehicle = World.CreateVehicle("INFERNUS", Player.Character.Position.Around(0.0F)) v.NoLongerNeeded() End Sub End Class PS: Sorry for my bad engish Link to comment Share on other sites More sharing options...
pavelsoft Posted August 17, 2012 Share Posted August 17, 2012 really useful Link to comment Share on other sites More sharing options...
wapeddell Posted August 22, 2012 Share Posted August 22, 2012 How do I figure out what functions do what that is the only thing holding me back from writing my own scripts. Link to comment Share on other sites More sharing options...
carolynross09 Posted August 24, 2012 Share Posted August 24, 2012 Nice script..It works well Link to comment Share on other sites More sharing options...
pedro2555 Posted September 8, 2012 Share Posted September 8, 2012 I appreciate all the time you took to do this, but unfortunately this is worthless for people like me who don't know C# already. It's probably hard for someone who already knows it all, but from my perspective, this is nearly impossible. I can read it five times over and still not understand it, at all. I mean, I understand variables, strings, variable and string operations, but I don't understand the structure encased around them one bit. It's a shame because I have a logical mind for programming, but nobody has come along yet who is really capable of teaching me how to actually program successfully. Like what's a method? What's "public class tutScriptVS : Script" do? What is "(object sender, GTA.KeyEventsArgs e)" all this stuff for? What does any of it mean? It looks like gibberish to me. Arg is the sound I make when I take a huge crap, and that's all I know. It's all the little things like this that coders take for granted when they're trying to teach and gloss over or ignore them, but that seriously make me feel confused and unable to learn any of this. I will try yo give a full starter tutorial for C#. Next week should be ready Link to comment Share on other sites More sharing options...
123iamking Posted December 24, 2012 Share Posted December 24, 2012 can u teach me how to write the code "flip car" and "warp to previous car"(in case player fly out of the car after crashing) ? thanks , I don't know where to find those command Link to comment Share on other sites More sharing options...
tobu24 Posted December 24, 2012 Share Posted December 24, 2012 I cannot seem to open any .NET scripts even with visual studio. I'm very confused. Is there a format I'm missing. I have a former .NET file created by someone who left the scene and I'm simply trying to open it to clean up the scripts and learn in the process. Link to comment Share on other sites More sharing options...
123iamking Posted January 10, 2013 Share Posted January 10, 2013 can u teach me how to write the code "flip car" and "warp to previous car"(in case player fly out of the car after crashing) ? thanks , I don't know where to find those command don't have to find how to do those things anymore , I have find it out by myself . I have made "Be a driver" mod and upload it to GTAgarage.com Link to comment Share on other sites More sharing options...
SecondEmeraldMaster Posted February 9, 2013 Share Posted February 9, 2013 Am I able to use this with Visual C# 2010? I saw that the one of the lines requires this: using System.Windows.Forms But C#2010 doesn't recognize this. Maybe I don't need it for this version...? Link to comment Share on other sites More sharing options...
GaryRoachSanderson Posted May 8, 2013 Share Posted May 8, 2013 Is there a function in .net scripting similar to the below cleo opcode? 00FE: actor $PLAYER_ACTOR sphere 0 in_sphere -2883.06 -2921.75 4.5529 radius 299.0 299.0 299.0 Basically a method to detect if the player is in a certain radius from a point. Link to comment Share on other sites More sharing options...
lilmcnessy Posted May 9, 2013 Share Posted May 9, 2013 Is there a function in .net scripting similar to the below cleo opcode? 00FE: actor $PLAYER_ACTOR sphere 0 in_sphere -2883.06 -2921.75 4.5529 radius 299.0 299.0 299.0 Basically a method to detect if the player is in a certain radius from a point. if(Player.Character.Position.DistanceTo(new Vector3(-2883.06f, -2921.75f, 4.5529f) < 300) Link to comment Share on other sites More sharing options...
GaryRoachSanderson Posted May 9, 2013 Share Posted May 9, 2013 Is there a function in .net scripting similar to the below cleo opcode? 00FE: actor $PLAYER_ACTOR sphere 0 in_sphere -2883.06 -2921.75 4.5529 radius 299.0 299.0 299.0 Basically a method to detect if the player is in a certain radius from a point. if(Player.Character.Position.DistanceTo(new Vector3(-2883.06f, -2921.75f, 4.5529f) < 300) Amazing, thanks! Link to comment Share on other sites More sharing options...
Silent_Waffle Posted June 5, 2013 Share Posted June 5, 2013 Can someone help me find out when the character kicks someone? I'm making a disarming mod and I want a kick to knock a gun away. And also, how do you add weapons to the characters inventory? I know there is "Player.Character.Weapons.Select()" but how to ADD a weapon? Thanks in advance. Link to comment Share on other sites More sharing options...
Silent_Waffle Posted June 5, 2013 Share Posted June 5, 2013 I cannot seem to open any .NET scripts even with visual studio. I'm very confused. Is there a format I'm missing. I have a former .NET file created by someone who left the scene and I'm simply trying to open it to clean up the scripts and learn in the process. That't because that script has been compiled. You can't read dll code. Try a decompiler like .net reflector. But, it doesn't always work very well. Better than nothing though I suppose. Happy modding Link to comment Share on other sites More sharing options...
DRUZZRIN12296 Posted July 20, 2013 Share Posted July 20, 2013 (edited) Hi I have a message saying "The name 'Color' does not exist in the current context" How do I reference for fonts I can't seem to find... Using Visual Studio Express 2012 Nvm got it Edited July 23, 2013 by DRUZZRIN12296 Link to comment Share on other sites More sharing options...
ticofa2 Posted December 18, 2013 Share Posted December 18, 2013 (edited) Hi, i need help, i actually dont understand all the C# language, but i know some code parts because its close to english, and i wanted to edit a Script, .dll file, obvously a mod for GTA IV, but i always get errors, between 20 to 999 of them :S They are errors like: - 'Object' is an ambiguous reference between 'GTA.Object' and 'object' - Error 8 'Graphics' is an ambiguous reference between 'GTA.Graphics' and 'System.Drawing.Graphics' - Error 17 'KeyEventArgs' is an ambiguous reference between 'GTA.KeyEventArgs' and 'System.Windows.Forms.KeyEventArgs' ETC... Edited December 18, 2013 by ticofa2 Link to comment Share on other sites More sharing options...
Wiebrendh Posted March 22, 2014 Share Posted March 22, 2014 (edited) Am I able to use this with Visual C# 2010? I saw that the one of the lines requires this: using System.Windows.Forms But C#2010 doesn't recognize this. Maybe I don't need it for this version...? Same here, finally managed to fix it! Edited March 22, 2014 by Wiebrendh Link to comment Share on other sites More sharing options...
Rugz007 Posted May 9, 2014 Share Posted May 9, 2014 Hi I have a message saying "The name 'Color' does not exist in the current context" How do I reference for fonts I can't seem to find... Using Visual Studio Express 2012 Nvm got it I Have The Same Problem Any Solution Link to comment Share on other sites More sharing options...
Sukhbir Singh (SS) Posted August 23, 2014 Share Posted August 23, 2014 its really hard Link to comment Share on other sites More sharing options...
watsonsimler Posted February 2, 2015 Share Posted February 2, 2015 its really hard Try learn C# .... http://csharp.net-informations.com Watson Link to comment Share on other sites More sharing options...
ashishcw Posted April 4, 2016 Share Posted April 4, 2016 First of all sorry for the late post(Almost, posting a comment after a year from the last comment, lol ) But, I had to thank you for this in-depth explaining of the terms, I was following this for quiet a sometime now. I was curious to know, does anyone succeeded, creating ALL SIGNAL GREEN MOD? What I mean is, when Niko(character) travels around in a car, all the signal in his row goes to green by this way up-head car doesn't have to stop, making Niko's car to drive smoothly without stopping or dodging the other cars. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now