Quantcast

Jump to content

» «
Photo

.sco scripting

43 replies to this topic
Jitnaught
  • Jitnaught

    ✰✰✰✰✰✰

  • Members
  • Joined: 24 Aug 2013
  • United-States

#31

Posted 24 July 2014 - 01:29 PM Edited by LetsPlayOrDy, 24 July 2014 - 01:32 PM.

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);
}

NOLABaby8732
  • NOLABaby8732

    Player Hater

  • Members
  • Joined: 06 Feb 2012

#32

Posted 24 July 2014 - 09:02 PM

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.


stef538
  • stef538

    It's just me, going 88 MPH.

  • Members
  • Joined: 06 Oct 2012
  • Netherlands

#33

Posted 27 July 2014 - 08:37 AM Edited by stef538, 27 July 2014 - 09:15 AM.

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..


NOLABaby8732
  • NOLABaby8732

    Player Hater

  • Members
  • Joined: 06 Feb 2012

#34

Posted 29 July 2014 - 05:01 AM

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.


Noox
  • Noox

    changeScriptAbility(&myScriptAbility, "improve");

  • Members
  • Joined: 20 Jun 2014
  • None

#35

Posted 29 July 2014 - 05:13 AM Edited by Noox, 29 July 2014 - 05:14 AM.

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.


stef538
  • stef538

    It's just me, going 88 MPH.

  • Members
  • Joined: 06 Oct 2012
  • Netherlands

#36

Posted 29 July 2014 - 07:13 AM

Noox 

 

when I do this i get this error :

 

fstream: No such file or directory

Noox
  • Noox

    changeScriptAbility(&myScriptAbility, "improve");

  • Members
  • Joined: 20 Jun 2014
  • None

#37

Posted 29 July 2014 - 09:34 AM

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


stef538
  • stef538

    It's just me, going 88 MPH.

  • Members
  • Joined: 06 Oct 2012
  • Netherlands

#38

Posted 29 July 2014 - 04:56 PM Edited by stef538, 29 July 2014 - 05:30 PM.

noox

 

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


Noox
  • Noox

    changeScriptAbility(&myScriptAbility, "improve");

  • Members
  • Joined: 20 Jun 2014
  • None

#39

Posted 29 July 2014 - 06:12 PM

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


NOLABaby8732
  • NOLABaby8732

    Player Hater

  • Members
  • Joined: 06 Feb 2012

#40

Posted 31 July 2014 - 05:15 AM

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.


stef538
  • stef538

    It's just me, going 88 MPH.

  • Members
  • Joined: 06 Oct 2012
  • Netherlands

#41

Posted 03 August 2014 - 12:33 PM

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 ?


maro_hannover
  • maro_hannover

    Skilled Like A Rockstar

  • BUSTED!
  • Joined: 11 Jan 2013
  • Germany

#42

Posted 27 September 2014 - 10:49 AM Edited by maro_hannover, 27 September 2014 - 10:56 AM.

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

Spoiler

 

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)


maro_hannover
  • maro_hannover

    Skilled Like A Rockstar

  • BUSTED!
  • Joined: 11 Jan 2013
  • Germany

#43

Posted 27 September 2014 - 01:11 PM

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!


maro_hannover
  • maro_hannover

    Skilled Like A Rockstar

  • BUSTED!
  • Joined: 11 Jan 2013
  • Germany

#44

Posted 28 September 2014 - 03:58 PM

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





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users