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

    1. GTANet.com

    1. GTA Online

      1. The Diamond Casino Heist
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Red Dead Online

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

      1. Events
    1. Red Dead Redemption 2

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

    1. Grand Theft Auto Series

    2. GTA 6

    3. GTA V

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

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

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

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

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

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

    1. Announcements

    2. Support

    3. Suggestions

Sign in to follow this  
stef538

.sco scripting

Recommended Posts

stef538

Hey guys,

 

So i tried some .sco scripting in 1.0.4.0 with the empty script from shadow-link.
His script works perfectly, but whenever i try to edit the startup.c using Skorpro's tutorial and then GTA 4 just stops working.. this is the code i used :

#include <natives.h>#include <common.h>#include <strings.h>#include <types.h>#include <consts.h>#define MAINSCRIPT "main"#define PLY_X 2783.87#define PLY_Y 426.42#define PLY_Z 5.82#define PLY_A 45.0void main(void){	// create player	Player plind;	CREATE_PLAYER(0, PLY_X, PLY_Y, PLY_Z, &plind);	LOAD_SCENE(PLY_X, PLY_Y, PLY_Z);	SET_CHAR_COORDINATES(GetPlayerPed(), PLY_X, PLY_Y, PLY_Z);	SET_CHAR_HEADING(GetPlayerPed(), PLY_A);    // load main script	REQUEST_SCRIPT(MAINSCRIPT);	while (!HAS_SCRIPT_LOADED(MAINSCRIPT)) WAIT(0);	uint script = START_NEW_SCRIPT(MAINSCRIPT, 1024);	MARK_SCRIPT_AS_NO_LONGER_NEEDED(MAINSCRIPT);	// return to the loading process	return;}

and yes i have the main.sco in the .img.

 

and even when i try this :

#include <natives.h>#include <common.h>#include <strings.h>#include <types.h>#include <consts.h>//#define MAINSCRIPT "main"#define PLY_X 2783.87#define PLY_Y 426.42#define PLY_Z 5.82#define PLY_A 45.0void main(void){	// create player	Player plind;	CREATE_PLAYER(0, PLY_X, PLY_Y, PLY_Z, &plind);	LOAD_SCENE(PLY_X, PLY_Y, PLY_Z);	SET_CHAR_COORDINATES(GetPlayerPed(), PLY_X, PLY_Y, PLY_Z);	SET_CHAR_HEADING(GetPlayerPed(), PLY_A);    // load main script	//REQUEST_SCRIPT(MAINSCRIPT);	//while (!HAS_SCRIPT_LOADED(MAINSCRIPT)) WAIT(0);	//uint script = START_NEW_SCRIPT(MAINSCRIPT, 1024);	////MARK_SCRIPT_AS_NO_LONGER_NEEDED(MAINSCRIPT);	// return to the loading process	return;}

It doesn't work.. Does anyone know what to do ?

Edited by stef538

Share this post


Link to post
Share on other sites
Jitnaught

I got the same error too. I don't know how to fix it :/

Share this post


Link to post
Share on other sites
stef538

I hope someone can :/

Share this post


Link to post
Share on other sites
One Man Standing

Maybe you should look for some help on the comments of the youtube tutorial comments

Edited by One Man Standing

Share this post


Link to post
Share on other sites
Frank.s

When you used Scocl to export the .sco, it exports in a way that patch 7 reads it correctly but patch 4 won't.

Use scotoolbox by flitskikker to convert all sco's that you make using scocl from patch 7 format (the default) to patch 4 format. (Or modify scocl to output .sco files that patch 4 can read, i think ThreeSocks or jdmAlex did something like this, google search for their public sco source code, it's not impossible to find.) :^:

Edited by Frank.s

Share this post


Link to post
Share on other sites
NOLABaby8732

Hey guys,

 

So i tried some .sco scripting in 1.0.4.0 with the empty script from shadow-link.

His script works perfectly, but whenever i try to edit the startup.c using Skorpro's tutorial and then GTA 4 just stops working.. this is the code i used :

#include <natives.h>#include <common.h>#include <strings.h>#include <types.h>#include <consts.h>#define MAINSCRIPT "main"#define PLY_X 2783.87#define PLY_Y 426.42#define PLY_Z 5.82#define PLY_A 45.0void main(void){	// create player	Player plind;	CREATE_PLAYER(0, PLY_X, PLY_Y, PLY_Z, &plind);	LOAD_SCENE(PLY_X, PLY_Y, PLY_Z);	SET_CHAR_COORDINATES(GetPlayerPed(), PLY_X, PLY_Y, PLY_Z);	SET_CHAR_HEADING(GetPlayerPed(), PLY_A);    // load main script	REQUEST_SCRIPT(MAINSCRIPT);	while (!HAS_SCRIPT_LOADED(MAINSCRIPT)) WAIT(0);	uint script = START_NEW_SCRIPT(MAINSCRIPT, 1024);	MARK_SCRIPT_AS_NO_LONGER_NEEDED(MAINSCRIPT);	// return to the loading process	return;}

and yes i have the main.sco in the .img.

 

and even when i try this :

#include <natives.h>#include <common.h>#include <strings.h>#include <types.h>#include <consts.h>//#define MAINSCRIPT "main"#define PLY_X 2783.87#define PLY_Y 426.42#define PLY_Z 5.82#define PLY_A 45.0void main(void){	// create player	Player plind;	CREATE_PLAYER(0, PLY_X, PLY_Y, PLY_Z, &plind);	LOAD_SCENE(PLY_X, PLY_Y, PLY_Z);	SET_CHAR_COORDINATES(GetPlayerPed(), PLY_X, PLY_Y, PLY_Z);	SET_CHAR_HEADING(GetPlayerPed(), PLY_A);    // load main script	//REQUEST_SCRIPT(MAINSCRIPT);	//while (!HAS_SCRIPT_LOADED(MAINSCRIPT)) WAIT(0);	//uint script = START_NEW_SCRIPT(MAINSCRIPT, 1024);	////MARK_SCRIPT_AS_NO_LONGER_NEEDED(MAINSCRIPT);	// return to the loading process	return;}

It doesn't work.. Does anyone know what to do ?

Send me your skype and I can give you the scocl files to compile for patch 1.0.4 if you need

Share this post


Link to post
Share on other sites
TemporaryAccount7

When you used Scocl to export the .sco, it exports in a way that patch 7 reads it correctly but patch 4 won't.

Use scotoolbox by flitskikker to convert all sco's that you make using scocl from patch 7 format (the default) to patch 4 format. (Or modify scocl to output .sco files that patch 4 can read, i think ThreeSocks or jdmAlex did something like this, google search for their public sco source code, it's not impossible to find.) :^:

yeah i see that working. i always use SCO Tool Box because patch 7 drops FPS and it crashes more often maybe and sometimes the FPS becomes 25-30 then suddenly become 2-5fps then comes back to 10-15fps Rockstar is kidding me. i almost use Scocl more than Net.Scripthook because SCOCL gives freedom. also i the only and the biggest problem with Net.Scripthook that Phone checks only work for WINXP. if it was working it was going to be the best!

Share this post


Link to post
Share on other sites
Noox

Not trying to go off topic but why does temporaryaccount sound like maro? In the GTA V thread he said he likes C++ more because of freedom.

Anyway SCO reminds me of low level languages for some reasons and it's not because of C/C++

  • Like 1

Share this post


Link to post
Share on other sites
TemporaryAccount7

who is maro and what are you talking about and why are you trying to lock this topic?

Edited by TemporaryAccount7

Share this post


Link to post
Share on other sites
Jitnaught

@Noox

Nah he doesn't sound like Maro.

@TemporaryAccount7

Maro Hannover (aka Maro) is some new guy on here that went off topic a lot and was annoying. He got banned lol

Share this post


Link to post
Share on other sites
TemporaryAccount7

Yeah because Maro had improved and became an anti-annoying person(i am a good actor right?) see guys i miss you very much so please respect my wishes i am trying to save myself in this forums so i don't want to be rude and you are better than me so i can't say (Stay in the topic) but we have to do it guys for ......?????

 

NOTE: This Post is on the Off-topic limit and didn't reached it so please don't post a reply here. Send me a PM(I can't find the button of PM even)

  • Like 1

Share this post


Link to post
Share on other sites
Jitnaught

Off topic:

@TemporaryAccount7

I knew it! :p

On topic:

I get this same problem, but on 1.0.7.0. Is it the same way to fix it?

Share this post


Link to post
Share on other sites
Noox

Yeah because Maro had improved and became an anti-annoying person(i am a good actor right?) see guys i miss you very much so please respect my wishes i am trying to save myself in this forums so i don't want to be rude and you are better than me so i can't say (Stay in the topic) but we have to do it guys for ......?????

 

NOTE: This Post is on the Off-topic limit and didn't reached it so please don't post a reply here. Send me a PM(I can't find the button of PM even)

63e20219f2ae44f88bc46cba23fa09fe.png

 

Back on topic.

  • Like 2

Share this post


Link to post
Share on other sites
leftas

Maybe you should look for some help on the comments of the youtube tutorial comments

What the actual f*ck, again you like f*cking these Indian/not Indian guy. U f*cking retarded or what, why you writing in different colors ? I find this very annoying. Also There is not much youtubers coding, especially in SCO language. So why you don't come back to your installers, maybe just create installers topic (I am always little too rude, when I got nervous from guys like you,Indians(not including all Indians, just those who are lazy)) ?

 

I think problem is that you are commenting loading mainscript which like I think injecting code in mainscript. This is just speculations I am not sure, because I am not coding in SCO, I don't how it works.

P.S. I am not sure if I saw all code, because in mobile code not showing correctly and I am out for a week.

 

Best Regards,

Paul.

Edited by leftas

Share this post


Link to post
Share on other sites
NOLABaby8732

 

When you used Scocl to export the .sco, it exports in a way that patch 7 reads it correctly but patch 4 won't.

Use scotoolbox by flitskikker to convert all sco's that you make using scocl from patch 7 format (the default) to patch 4 format. (Or modify scocl to output .sco files that patch 4 can read, i think ThreeSocks or jdmAlex did something like this, google search for their public sco source code, it's not impossible to find.) :^:

yeah i see that working. i always use SCO Tool Box because patch 7 drops FPS and it crashes more often maybe and sometimes the FPS becomes 25-30 then suddenly become 2-5fps then comes back to 10-15fps Rockstar is kidding me. i almost use Scocl more than Net.Scripthook because SCOCL gives freedom. also i the only and the biggest problem with Net.Scripthook that Phone checks only work for WINXP. if it was working it was going to be the best!

 

1.) My FPS only drops to 30 on patch seven... note that is when im recording or when everything is popping in(I also play at 1080p)

2.) the scripthooks give more freedom.. only reason i SCO mod is because it blends in with regular game files.

 

 

 

Maybe you should look for some help on the comments of the youtube tutorial comments

What the actual f*ck, again you like f*cking these Indian/not Indian guy. U f*cking retarded or what, why you writing in different colors ? I find this very annoying. Also There is not much youtubers coding, especially in SCO language. So why you don't come back to your installers, maybe just create installers topic (I am always little too rude, when I got nervous from guys like you,Indians(not including all Indians, just those who are lazy)) ?

 

I think problem is that you are commenting loading mainscript which like I think injecting code in mainscript. This is just speculations I am not sure, because I am not coding in SCO, I don't how it works.

P.S. I am not sure if I saw all code, because in mobile code not showing correctly and I am out for a week.

 

Best Regards,

Paul.

 

If his script is instant crashing he is probably compiling it wrong. The main script has nothing to do with it. You can open up script.img and delete every script put in your own startup.sco and a blank puzzle.sco and the game will still run fine.

 

By compiling it wrong its most likely what everyone has said. It compiled for v1.0.7 when your running v1.0.4

 

EDIT: SCOCL to compile for 1.0.4 ... use scocl_old.exe to compile

Edited by NOLABaby8732

Share this post


Link to post
Share on other sites
Noox

 

 

When you used Scocl to export the .sco, it exports in a way that patch 7 reads it correctly but patch 4 won't.

Use scotoolbox by flitskikker to convert all sco's that you make using scocl from patch 7 format (the default) to patch 4 format. (Or modify scocl to output .sco files that patch 4 can read, i think ThreeSocks or jdmAlex did something like this, google search for their public sco source code, it's not impossible to find.) :^:

yeah i see that working. i always use SCO Tool Box because patch 7 drops FPS and it crashes more often maybe and sometimes the FPS becomes 25-30 then suddenly become 2-5fps then comes back to 10-15fps Rockstar is kidding me. i almost use Scocl more than Net.Scripthook because SCOCL gives freedom. also i the only and the biggest problem with Net.Scripthook that Phone checks only work for WINXP. if it was working it was going to be the best!

 

1.) My FPS only drops to 30 on patch seven... note that is when im recording or when everything is popping in(I also play at 1080p)

2.) the scripthooks give more freedom.. only reason i SCO mod is because it blends in with regular game files.

He doesn't even know what a variable is you shouldn't even bother to tell him those things.

Anyway, he has been banned for the third time in one month...

Share this post


Link to post
Share on other sites
leftas

Yea, sorry I don't know how SCO works, so I just can speculate :)

 

Best Regards,

Paul.

Share this post


Link to post
Share on other sites
stef538

yeah got it all working thanks guys! Only one question though, how to start a new void ? i mean i have this :

void main(void){  story();}

and

void story(void){  //blablasomecode}

but it always give ma an error on 'story();'

Edited by stef538

Share this post


Link to post
Share on other sites
Noox

Did you try without void?

Share this post


Link to post
Share on other sites
stef538

you mean something like

 

(void) story

{

}

or

 

story (void)

{

}

Share this post


Link to post
Share on other sites
Noox

just use void story() and see if it works. (when you declare the function not when you call it)

Share this post


Link to post
Share on other sites
stef538

then the sco compiler says :

parser varargs functions are not allowed => compiler: <llvm> unrecognized call etc etc,

Share this post


Link to post
Share on other sites
Noox

uhm I don't know then :|

Share this post


Link to post
Share on other sites
Alexander Blade

story must be declated before main

Share this post


Link to post
Share on other sites
stef538

that worked :) thanks!!!

 

EDIT

 

I tried to define a car on the top on the script, then i added a car using that value, but then i try to let it do things in another sub and then it says it doesn't exist ?

 

EDIT

 

NVM Fixed.

Edited by stef538

Share this post


Link to post
Share on other sites
stef538

also, don't know if someone noticed it but

TASK_CAR_DRIVE_TO_COORD

isn't working.. and i tried to search the internet but nothing helpfull came up..

Share this post


Link to post
Share on other sites
Jitnaught

also, don't know if someone noticed it but

TASK_CAR_DRIVE_TO_COORD
isn't working.. and i tried to search the internet but nothing helpfull came up..
Did you create a driver for the car?

Share this post


Link to post
Share on other sites
stef538

yeah i did.

Share this post


Link to post
Share on other sites
leftas

What parameters you wrote there ?

 

Best Regards,

Paul.

Share this post


Link to post
Share on other sites
stef538
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.

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.

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  

  • 2 Users Currently Viewing
    0 members, 0 Anonymous, 2 Guests

×
×
  • Create New...

Important Information

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