Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
      4. Frontier Pursuits
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Diamond Casino & Resort
      2. DLC
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA IV Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA SA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA VC Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA III Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

Sign in to follow this  
stef538

.sco scripting

Recommended Posts

Jitnaught

I found this in scripthook .net:

 

if (!AllowToDriveRoadsWrongWay)

{

int num = ObeyTrafficLaws ? 1 : 2;

<Module>.Scripting.?A0x97d8b2b4.TaskCarMissionCoorsTargetNotAgainstTraffic(this.ped.Handle, Vehicle.Handle, Target.X, Target.Y, Target.Z, 4u, SpeedMph, (uint)num, 5u, 10u);

}

else

{

int num2 = ObeyTrafficLaws ? 1 : 2;

<Module>.Scripting.?A0x97d8b2b4.TaskCarMissionCoorsTarget(this.ped.Handle, Vehicle.Handle, Target.X, Target.Y, Target.Z, 4u, SpeedMph, (uint)num2, 5u, 10u);

}

Edited by LetsPlayOrDy

Share this post


Link to post
Share on other sites
NOLABaby8732
Vehicle v_spawn;uint model;uint ped_model;Ped ped;float housex = -38.94, housey = 597.51, housez = 14.58;GET_CAR_MODEL(v_spawn, &model);GET_DRIVER_OF_CAR(v_spawn, &ped);TASK_CAR_DRIVE_TO_COORD(ped, v_spawn, housex, housey, housez, 60.0f, 10, model, 2, 5.0f, -1);

something like this.

 

TASK_CAR_DRIVE_TO_COORD(Ped ped, Vehicle veh, float x, float y, float z, float speed, int drivingStyle, int unknown0, int unknown2, float stopRange, int unknownNeg1);

Now im going to be slightly rude and tell you not to be stupid... If there is a native that is causign an error open up the inc/native.h file that came with SCOCL and figure out what parameters it takes. I grabbed the above straight from said file.

Share this post


Link to post
Share on other sites
stef538

Got it working!! thanks guys, and is there a way to save your progress ? like an int or whatever somewhere in the memory of GTA, so that on the next startup it knows where I was..

Edited by stef538

Share this post


Link to post
Share on other sites
NOLABaby8732

Got it working!! thanks guys, and is there a way to save your progress ? like an int or whatever somewhere in the memory of GTA, so that on the next startup it knows where I was..

I think but may be wrong that you use global variables for that.

Share this post


Link to post
Share on other sites
Noox

Got it working!! thanks guys, and is there a way to save your progress ? like an int or whatever somewhere in the memory of GTA, so that on the next startup it knows where I was..

You can use fstream to save data into both binary and text files and then read it again.

 

 

Got it working!! thanks guys, and is there a way to save your progress ? like an int or whatever somewhere in the memory of GTA, so that on the next startup it knows where I was..

I think but may be wrong that you use global variables for that.

 

Nah, when you close the game variables are not in memory anymore.

Edited by Noox

Share this post


Link to post
Share on other sites
stef538

Noox

 

when I do this i get this error :

fstream: No such file or directory

Share this post


Link to post
Share on other sites
Noox

Yeah sorry you have to include the header, on otp of the script write #include <fstream> without ;

Share this post


Link to post
Share on other sites
stef538

noox

 

No, I already know this :) sorry my fault, I meant the SCO compiler says that :)

Edited by stef538

Share this post


Link to post
Share on other sites
Noox

Oh, I don't know then...haven't really used SCO as I'm a newbie with scripthook.

Share this post


Link to post
Share on other sites
NOLABaby8732

Got it working!! thanks guys, and is there a way to save your progress ? like an int or whatever somewhere in the memory of GTA, so that on the next startup it knows where I was..

Yes look at the Zombie mod source that came with SCOCL.

Share this post


Link to post
Share on other sites
stef538

Ok, but how to tell for example script2.sco to get active after everything is done in script1. And that the game knows I'm in script2 on next startup. is this included in the save file or something else ?

Share this post


Link to post
Share on other sites
maro_hannover

NOTE: Sorry For Bumping On The Topic But i just wanted to send my Thanks and Regards

Very Interesting Topic,

Thanks So Much NOALABABY/Whatever. That Helped Much Alot. I can't Stop Creating Missions

 

 

-About Saving Roman

-Killing Micheal , Franklin and Trevor

-Niko's Death

-Drive-By Missions

 

 

 

Using SCOCL in Visual Studio 2013 is better than 2010. When i write for example the letter m it shows everything from the header files,etc

The Best Thing is When I Write The Natives and write the bracket it shows me the method invokation made by alexander blade

That is Alexander's Best Job

Just Like The Old SCM Days. Silent Can Remember!

OjSJKWH.png

------------------------------------

nG842xz.png

------------------------------------

pbFV0Iq.png

VS 2013 Is Much Better.

and about the third pic^^ Don't Take It so serious it is just4fun and example and showind that SCO Gives Full Freedom(if not vice versa xD)

Edited by maro_hannover

Share this post


Link to post
Share on other sites
maro_hannover

EDIT: I am using Commandline to compile. when i run it nothing compiles. also there is a compress,exe i select my .c file but also nothing happen!

Share this post


Link to post
Share on other sites
maro_hannover

i've converted Zombie SCO mod by Alexander Blade and used Compressor. If i open it will SCO toolbox and scodcl it says it is fine. but when i start the game it gives me error SRCP30. and Yes i do have patch 1.0.4.0

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.