Quantcast

Jump to content

» «
Photo

[GTA IV|EFLC|REL] Scocl

166 replies to this topic
jdmalex2
  • jdmalex2

    Player Hater

  • Members
  • Joined: 25 Feb 2012

#121

Posted 06 March 2012 - 07:13 PM

QUOTE (terreur69 @ Tuesday, Mar 6 2012, 19:02)
yes but why in this function,
QUOTE
(IS_GAME_KEYBOARD_KEY_PRESSED(56)) && (IS_GAME_KEYBOARD_KEY_PRESSED(45)) )  // press left ALT + X


the 56= left ALT and 45= X that the number on the site are not the same .
and if i put 76 it does not work yet """VK_F7 76 F7 key""" ?

for f7 it s 65

76 is KEY_NUMLOCK_5

its all in the file const.h that compiles with the code.. look:

CODE
#define KEY_Q 16
#define KEY_W 17
#define KEY_E 18
#define KEY_R 19
#define KEY_T 20
#define KEY_Y 21
#define KEY_U 22
#define KEY_I 23
#define KEY_O 34
#define KEY_P 25
#define KEY_A 30
#define KEY_S 31
#define KEY_D 32
#define KEY_F 33
#define KEY_G 34
#define KEY_H 35
#define KEY_J 36
#define KEY_K 37
#define KEY_L 38
#define KEY_Z 44
#define KEY_X 45
#define KEY_C 46
#define KEY_V 47
#define KEY_B 48
#define KEY_N 49
#define KEY_M 50
#define KEY_0 11
#define KEY_1 2
#define KEY_2 3
#define KEY_3 4
#define KEY_4 5
#define KEY_5 6
#define KEY_6 7
#define KEY_7 8
#define KEY_8 9
#define KEY_9 10
#define KEY_ENTER 28
#define KEY_ESC 1
#define KEY_BACKSPACE 14
#define KEY_MINUS 12
#define KEY_EQUAL 13
#define KEY_TAB 15
#define KEY_CAPS_LOCK 58
#define KEY_SHIFT 42
#define KEY_CTRL 29
#define KEY_ALT 56
#define KEY_SPACE 57
#define KEY_SQUARE_BRACKET_RIGHT 27
#define KEY_SQUARE_BRACKET_LEFT 26
#define KEY_SEMI_COLON 39
#define KEY_COMMA 51
#define KEY_PERIOD 52
#define KEY_F1 59
#define KEY_F2 60
#define KEY_F3 61
#define KEY_F4 62
#define KEY_F5 63
#define KEY_F6 64
#define KEY_F7 65
#define KEY_F8 66
#define KEY_F9 67
#define KEY_F10 68
#define KEY_F11 87
#define KEY_F12 88
#define KEY_SCROLL_LOCK 70
#define KEY_NUMLOCK 69
#define KEY_ASTERISK 55
#define KEY_NUMLOCK_1 79
#define KEY_NUMLOCK_2 80
#define KEY_NUMLOCK_3 81
#define KEY_NUMLOCK_4 75
#define KEY_NUMLOCK_5 76
#define KEY_NUMLOCK_6 77
#define KEY_NUMLOCK_7 71
#define KEY_NUMLOCK_8 72
#define KEY_NUMLOCK_9 73
#define KEY_NUMLOCK_PLUS 78
#define KEY_NUMLOCK_MINUS 74
#define KEY_NUMLOCK_0 82

Terreur69
  • Terreur69

    C2C - Down The Road

  • Members
  • Joined: 27 Dec 2010
  • France

#122

Posted 06 March 2012 - 07:19 PM Edited by terreur69, 06 March 2012 - 07:23 PM.

ok thank but why the web site> here it puts the f7 = 76 ?

jdmalex2
  • jdmalex2

    Player Hater

  • Members
  • Joined: 25 Feb 2012

#123

Posted 06 March 2012 - 07:35 PM

QUOTE (terreur69 @ Tuesday, Mar 6 2012, 19:19)
ok thank but why the web site> here it puts the f7 = 76 ?

Im not sure why

Terreur69
  • Terreur69

    C2C - Down The Road

  • Members
  • Joined: 27 Dec 2010
  • France

#124

Posted 06 March 2012 - 07:42 PM

QUOTE (jdmalex2 @ Tuesday, Mar 6 2012, 21:35)
QUOTE (terreur69 @ Tuesday, Mar 6 2012, 19:19)
ok thank  but why the web site>  here it puts the f7 = 76  ?

Im not sure why

ok in all this, thank you very much wink.gif

N-field
  • N-field

    Crackhead

  • Members
  • Joined: 11 Sep 2011

#125

Posted 08 March 2012 - 02:52 PM

about this CLEO IV thing, say I were to... use cleo mods only made in gtasa and decompiling the script wouldnt work, would those scripts work in GTA4 as well? Or am I expecting too much from the CLEO library? (My guess as to wat CLEO scripts are is a universal modding language for gta series and the underlying CLEO library translates those instructions for each gta version... or is that wrong? I keep wondering why the Japanese modders made touhou spellcards using CLEO instead of an easier to use .NET scripthook... maybe something to do with low-level functions and complete control and whatnot.... )

Skorpro
  • Skorpro

    GTAholic

  • Members
  • Joined: 19 Jul 2009
  • Germany

#126

Posted 08 March 2012 - 10:31 PM

QUOTE (jdmalex2 @ Tuesday, Mar 6 2012, 19:35)
QUOTE (terreur69 @ Tuesday, Mar 6 2012, 19:19)
ok thank  but why the web site>  here it puts the f7 = 76  ?

Im not sure why

Hi,

the "Virtual Key Codes" (F7 = 118 DEC or 0x76 HEX) are for C++, Delphi and other programming languages only!

Example:
CODE

int key = 118;
if ((GetAsyncKeyState(key) & 1) != 0)   // F7


But with SCOCL I've used this:
CODE

if  (IS_GAME_KEYBOARD_KEY_PRESSED(65))   // F7


I found this out (German keyboard!):
CODE

Example (.SCO):
---------------

if (IS_GAME_KEYBOARD_KEY_PRESSED(31)) // Num 31 = Key 'S'
{
PRINT_STRING_WITH_LITERAL_STRING_NOW("string", "Key = S", 2000, 1);
}


PS:
---
You can use "IS_GAME_KEYBOARD_KEY_JUST_PRESSED" too.



Num  =  Key
-----------
1    =  ESC
2    =  1
3    =  2
4    =  3
5    =  4
6    =  5
7    =  6
8    =  7
9    =  8
10   =  9
11   =  0
12   =  German Keyboard ß
13   =  German Keyboard `
14   =  Backspace
15   =  Tab
16   =  q
17   =  w
18   =  e
19   =  r
20   =  t
21   =  German Keyboard z
22   =  u
23   =  i
24   =  o
25   =  p
26   =  German Keyboard ü
27   =  German Keyboard +
28   =  Return
29   =  CTRL left
30   =  a
31   =  s
32   =  d
33   =  f
34   =  g
35   =  h
36   =  j
37   =  k
38   =  l
39   =  German Keyboard ö
40   =  German Keyboard ä
41   =  German Keyboard ^
42   =  Shift left
43   =  ???
44   =  German Keyboard y
45   =  x
46   =  c
47   =  v
48   =  b
49   =  n
50   =  m
51   =  ,
52   =  .
53   =  -
54   =  Shift right
55   =  Num *
56   =  Alt left
57   =  Space
58   =  Caps Lock (Shift)
59   =  F1
60   =  F2
61   =  F3
62   =  F4
63   =  F5
64   =  F6
65   =  F7
66   =  F8
67   =  F9
68   =  F10
69   =  Num Num
70   =  German Keyboard Rollen
71   =  Num 7
72   =  Num 8
73   =  Num 9
74   =  Num -
75   =  Num 4
76   =  Num 5
77   =  Num 6
78   =  Num +
79   =  Num 1
80   =  Num 2
81   =  Num 3
82   =  Num 0
83   =  Num ,
84   =  ???
85   =  ???
86   =  German Keyboard <
87   =  F11
88   =  F12

It's like jdmalex2 key list smile.gif



Frank.s
  • Frank.s

    AKA PingPang

  • Members
  • Joined: 15 Apr 2008
  • None

#127

Posted 06 April 2012 - 09:22 PM

I'm doing some scripting for the IVSA total conversion and i've hit a problem.

All code under under the highlighted "Mission1Trigger();" near the bottom of the picture doesn't run until the code inside the Mission1Trigger(); function finishes running (which is the break below the white arrow).
How would i make the Mission1Trigger(); function run and make code under the highlighted "Mission1Trigger();" text near the bottom of the picture keep running at the same time?

I'm new to high-level coding with no previous c programming experience (only previous programming experience is III+VC+SA scm scripting). I know how to do some basic stuff in IV's high-level, ie the code i've written in the picture. I know what a "while(true) loop" is, what "break" does, how to load GTAIV models and check them, check player location, create cars, peds and things like that. However i know much more scm coding knowledge (i'm able to create missions in scm but when it comes to sco i don't even know how to make multiple functions run at once. tounge.gif

Any help with the problem would be appreciated. icon14.gif

Btw i originally posted this problem here in the IVSA topic.
user posted image

Skorpro
  • Skorpro

    GTAholic

  • Members
  • Joined: 19 Jul 2009
  • Germany

#128

Posted 08 April 2012 - 11:19 AM Edited by Skorpro, 08 April 2012 - 11:25 AM.

QUOTE

All code under under the highlighted "Mission1Trigger();" near the bottom of the picture doesn't run until the code inside the Mission1Trigger(); function finishes running (which is the break below the white arrow).
How would i make the Mission1Trigger(); function run and make code under the highlighted "Mission1Trigger();" text near the bottom of the picture keep running at the same time?


Hi Frank.s!

My English isn't good, so I hope I have understood you correctly wink.gif

You want to run a loop in background?!?... Here is an example:

CODE


boolean repeat_var = 1; // global

.........blabla.........

void Mission1Trigger(void)
{

.........blabla.........

break;
repeat_var = 0; // Stop "Mission1Trigger"
}

void main(void)
{

.........blabla.........

if (repeat_var == 1)
{
 Mission1Trigger();
}
else if (repeat_var == 0)
{
 PRINT_STRING_WITH_LITERAL_STRING_NOW("string", "End of Mission1Trigger!", 2000, 1);
}

.........blabla.........

}



PS: This works in C++, but in SCOCL too? I have no idea so just try it. Good luck smile.gif

d-e-v
  • d-e-v

    Player Hater

  • Members
  • Joined: 21 Jan 2012

#129

Posted 23 April 2012 - 09:43 PM

Are these steps for creating a webpage possible?

1. Register address
2. Set HTML Code
3. Load Adress

I found natives for loading, but not for registering the address so I can reach it ingame. Does anyone how I can realize it?

Terreur69
  • Terreur69

    C2C - Down The Road

  • Members
  • Joined: 27 Dec 2010
  • France

#130

Posted 04 June 2012 - 04:38 PM

hi, i want to know how to put more value on #define

i have this :

CODE
#define ZOMB_MODEL MODEL_M_Y_GRUS_LO_01

possible to add more value :

CODE
#define ZOMB_MODEL MODEL_M_Y_GRUS_LO_01            or           MODEL_M_Y_GMAF_LO_01         or         MODEL_M_Y_GBIK_HI_01

to load several models at once? .
thank.

_DK
  • _DK

    gta3 cleo

  • Feroci Racing
  • Joined: 12 Apr 2009
  • None

#131

Posted 08 June 2012 - 12:32 PM

CODE
#define MYMODEL1 1
#define MYMODEL2 2

Or you want to make random models? Then, you must do it in your code.

gtafrodo
  • gtafrodo

    Player Hater

  • Members
  • Joined: 10 Jun 2012

#132

Posted 10 June 2012 - 10:44 AM Edited by gtafrodo, 10 June 2012 - 02:21 PM.

How can I clean dirty natives? some have data-types or parameters of 'scriptany'

Also is there a native header file with clean network natives?

If not how can I figure these out myself?

Also is there a way to get the games scripts in c for scocl??
Thanks

gtafrodo
  • gtafrodo

    Player Hater

  • Members
  • Joined: 10 Jun 2012

#133

Posted 15 June 2012 - 02:50 PM

I having trouble printing an integer to the screen

int time_in_ragdoll = 100000;

DISPLAY_TEXT_WITH_NUMBER(0.5000, 0.2520, "TEN_PIN_04", time_in_ragdoll);

DISPLAY_TEXT_WITH_NUMBER(0.5000, 0.2520, "NUMBER", time_in_ragdoll);


Both of those lines crash the game(freeze)
Any help?

Deluxe8900
  • Deluxe8900

    Player Hater

  • Members
  • Joined: 14 Jun 2012

#134

Posted 15 June 2012 - 03:50 PM

QUOTE (gtafrodo @ Sunday, Jun 10 2012, 10:44)
How can I clean dirty natives? some have data-types or parameters of 'scriptany'

Also is there a native header file with clean network natives?

If not how can I figure these out myself?

Also is there a way to get the games scripts in c for scocl??
Thanks

What? Every native which has been release will work for multiplayer, they're is a few multiplayer specific ones, but they are nothing.

And not they're is not, scocl can not read high level C code for some reason, maybe cause it's stripped down C-like language so that it can call natives but I dont know, ill ask alex to come in the thread and help you smile.gif

gtafrodo
  • gtafrodo

    Player Hater

  • Members
  • Joined: 10 Jun 2012

#135

Posted 15 June 2012 - 04:31 PM Edited by gtafrodo, 15 June 2012 - 08:48 PM.

QUOTE (Deluxe8900 @ Friday, Jun 15 2012, 15:50)
QUOTE (gtafrodo @ Sunday, Jun 10 2012, 10:44)
How can I clean dirty natives? some have data-types or parameters of 'scriptany'

Also is there a native header file with clean network natives?

If not how can I figure these out myself?

Also is there a way to get the games scripts in c for scocl??
Thanks

What? Every native which has been release will work for multiplayer, they're is a few multiplayer specific ones, but they are nothing.

And not they're is not, scocl can not read high level C code for some reason, maybe cause it's stripped down C-like language so that it can call natives but I dont know, ill ask alex to come in the thread and help you smile.gif

Thanks for the reply
Sorry, I understand now. That the opcode does not contain enough info to determine data types in source.

My problem now is just displaying an integer on screen.
Strings are fine.
But when I try display an integer with

int time_in_ragdoll = 100000;

DISPLAY_TEXT_WITH_NUMBER(0.5000, 0.2520, "NUMBER", time_in_ragdoll);
it is no longer freezing
it just doesnt display. Is there methods I should call before this will display?

EDIT:
Ugh, I figured it out. Thanks

Any tutorials on how to use the Natural Motion Messages?

I made a script to issue any event number to my player. Its quite funny. Assuming differant poses and flailing about. But the other commands clearly need other messages etc. So I cant grab things for example

Deluxe8900
  • Deluxe8900

    Player Hater

  • Members
  • Joined: 14 Jun 2012

#136

Posted 15 June 2012 - 09:56 PM

QUOTE (gtafrodo @ Friday, Jun 15 2012, 16:31)
QUOTE (Deluxe8900 @ Friday, Jun 15 2012, 15:50)
QUOTE (gtafrodo @ Sunday, Jun 10 2012, 10:44)
How can I clean dirty natives? some have data-types or parameters of 'scriptany'

Also is there a native header file with clean network natives?

If not how can I figure these out myself?

Also is there a way to get the games scripts in c for scocl??
Thanks

What? Every native which has been release will work for multiplayer, they're is a few multiplayer specific ones, but they are nothing.

And not they're is not, scocl can not read high level C code for some reason, maybe cause it's stripped down C-like language so that it can call natives but I dont know, ill ask alex to come in the thread and help you smile.gif

Thanks for the reply
Sorry, I understand now. That the opcode does not contain enough info to determine data types in source.

My problem now is just displaying an integer on screen.
Strings are fine.
But when I try display an integer with

int time_in_ragdoll = 100000;

DISPLAY_TEXT_WITH_NUMBER(0.5000, 0.2520, "NUMBER", time_in_ragdoll);
it is no longer freezing
it just doesnt display. Is there methods I should call before this will display?

EDIT:
Ugh, I figured it out. Thanks

Any tutorials on how to use the Natural Motion Messages?

I made a script to issue any event number to my player. Its quite funny. Assuming differant poses and flailing about. But the other commands clearly need other messages etc. So I cant grab things for example

when i have time i might make a big thread on how to script with this, and add scripting like you are doing to help people smile.gif

Skorpro
  • Skorpro

    GTAholic

  • Members
  • Joined: 19 Jul 2009
  • Germany

#137

Posted 16 June 2012 - 05:32 AM

Hi,

an example for DISPLAY_TEXT_WITH_NUMBER smile.gif
Small Speedo:
CODE

//GLOBAL
Car veh_speed;
float fSpeed;
int iSpeed;
bool rep_speed = 0;

.........
.........
.........

void SkorproTextAndInt(float x1, float y1, int red1, int green1, int blue1, int num, float x2, float y2, int red2, int green2, int blue2)
{
// TEXT
SET_TEXT_FONT(1); // TEXTFONT_LED
SET_TEXT_BACKGROUND(0);
SET_TEXT_SCALE(0.22, 0.27);
SET_TEXT_COLOUR(red1, green1, blue1, 255);
SET_TEXT_RIGHT_JUSTIFY(0);
SET_TEXT_DROPSHADOW(0, 255, 255, 255, 255);
DISPLAY_TEXT_WITH_LITERAL_STRING(x1, y1, "STRING", "Speed : ");

// NUM
SET_TEXT_FONT(1); // TEXTFONT_LED
SET_TEXT_BACKGROUND(0);
SET_TEXT_SCALE(0.22, 0.27);
SET_TEXT_COLOUR(red2, green2, blue2, 255);
SET_TEXT_RIGHT_JUSTIFY(0);
SET_TEXT_DROPSHADOW(0, 255, 255, 255, 255);
DISPLAY_TEXT_WITH_NUMBER(x2, y2, "NUMBER", num);
}

.........
.........
.........

void main(void)
{

.........
.........
.........

while (TRUE)
{
 // Speedo
 if (IS_CHAR_IN_ANY_CAR(GetPlayerPed())) { rep_speed = 1; }
 else { rep_speed = 0; }

 if (rep_speed == 1) // LOOP start
 {
  if (!IS_CHAR_IN_ANY_CAR(GetPlayerPed()))
  {
   rep_speed = 0; // LOOP end
  }
  GET_CAR_CHAR_IS_USING(GetPlayerPed(), &veh_speed);
  GET_CAR_SPEED(veh_speed, &fSpeed);
  fSpeed = fSpeed * 3.61; // MaxSpeed (Default: 3.61)!
  iSpeed = (int) fSpeed; // float to int
  SkorproTextAndInt(0.01, 0.97, 0, 255, 0, iSpeed, 0.07, 0.97, 255, 0, 0);
 }
   
 // PAUSE
 WAIT(0);
}
}


For full script visit this topic!


gtafrodo
  • gtafrodo

    Player Hater

  • Members
  • Joined: 10 Jun 2012

#138

Posted 16 June 2012 - 12:10 PM

thanks guys biggrin.gif

I have my grab mod working and text displaying on screen. (On PS3)

Anyone understand the 4 grab points?

CODE
   
SET_NM_MESSAGE_VEC3( 165, -1.000000, 1.0000000, 0.5000000 );
SET_NM_MESSAGE_VEC3( 166, -1.000000, 0.0000000, 0.5000000 );
SET_NM_MESSAGE_VEC3( 167, 0.0000000, 1.000000, 0.5000000 );
SET_NM_MESSAGE_VEC3( 168, 0.0000000, 0.000000, 0.5000000 );


I have constants here, but I'm sure I should be calculating offsets from player to corner/side of the nearest vehicle.


westsidebud
  • westsidebud

    Descanter The Insalubrious

  • Members
  • Joined: 11 Jun 2005

#139

Posted 23 June 2012 - 06:09 PM

can i ask what algo is used for native hashs ?
its impossible to get a text string from a hash right ?
so im assuming you used other methods to figure out
what the text titles would be..

im comparing gtaiv.exe script related code (104 vs 107) in OllyDBG

Years ago i wrote an IDA script for the program Steam (posted in cs.rin.ru forum)
to get the sets of virtual table functions including the func names and what order they are in.
I was thinking about the idea for GTA but unless my script got the params too
it would be sorta useless anyway lol

This is not something i have used *yet (playing with your script hook sdk now)
But good job and thanks for sharing your work with us all smile.gif

Limiter
  • Limiter

    GTA Modder

  • Members
  • Joined: 03 Dec 2010
  • Canada

#140

Posted 28 June 2012 - 07:54 AM

Hi, I want to know is it possible to alter the pool game such that Niko can play by himself as well. I want to use this as a base to learn sco.

Deluxe8900
  • Deluxe8900

    Player Hater

  • Members
  • Joined: 14 Jun 2012

#141

Posted 28 June 2012 - 11:29 AM

QUOTE (Limiter @ Thursday, Jun 28 2012, 07:54)
Hi, I want to know is it possible to alter the pool game such that Niko can play by himself as well. I want to use this as a base to learn sco.

Yes you can change it, just mod the original sco file. To be honest that is not the best place to learn, I would look at Skorpro SCO releases for this compiler in this section, towards the top. And look at them, and build onto what people have released.

Limiter
  • Limiter

    GTA Modder

  • Members
  • Joined: 03 Dec 2010
  • Canada

#142

Posted 29 June 2012 - 01:25 AM Edited by Limiter, 29 June 2012 - 01:45 AM.

I understand what you are saying thankfully since I have C++ background. smile.gif If I understood correctly, basically everyone is contributing towards one huge sco script where you add in many features and call it in a while loop in the main program. In other words, building on top like what you mentioned. But then from what I heard, you have to start a new game since new sco scripts can affect save files.

Correct me if I am wrong, wouldn't just doing tweaks to original pool_game.sco allow me to achieve playing pool by Niko's self without have to start a new game? edit: Darn it, seems like a new game must be started with any sco modification.

unknown modder
  • unknown modder

    Player Hater

  • Members
  • Joined: 04 Jul 2012

#143

Posted 04 July 2012 - 11:04 PM

does this handle switch constructs as everytime i try to use it it says its a reserved keyword and errors out on compiling even though i have put the c code in right

Limiter
  • Limiter

    GTA Modder

  • Members
  • Joined: 03 Dec 2010
  • Canada

#144

Posted 05 July 2012 - 07:39 AM

QUOTE (unknown modder @ Wednesday, Jul 4 2012, 23:04)
does this handle switch constructs as everytime i try to use it it says its a reserved keyword and errors out on compiling even though i have put the c code in right

From what I know, this project is based on a C-like language. So if something works in C, it might not work here since it may be a reserved word pre-defined in SCOCL.

Mainline421
  • Mainline421

  • Members
  • Joined: 01 Mar 2012

#145

Posted 12 July 2012 - 03:58 PM

QUOTE (Skorpro @ Sunday, Feb 26 2012, 06:04)
Yeeah, back home again... back to GTA... GTA addicted?!? mercie_blink.gif

QUOTE (jdmalex2)

By doing so I dont need puzzle and startup or remove game saves


Wow sounds good! Maybe I'll try it smile.gif


QUOTE (terreur69)

it alters nothing in the games, i just want to add a filed of views of 70°, he is 50°, but nothing .


Yesterday I've created a small mod. Like GTA 2 style.

user posted image


Press left ALT + X to switch mod on/off!

CODE


#include <natives.h>
#include <common.h>
#include <strings.h>
#include <types.h>
#include <consts.h>



void main(void)
{
FORCE_LOADING_SCREEN(TRUE);
THIS_SCRIPT_SHOULD_BE_SAVED();
SET_CAR_DENSITY_MULTIPLIER(1.0);
SET_MAX_WANTED_LEVEL(6);
SET_PLAYER_CONTROL(GetPlayerIndex(), TRUE);
LOAD_SCENE(-420.245, 1137.605, 12.530);
SET_CHAR_COORDINATES_NO_OFFSET(GetPlayerPed(), -420.245, 1137.605, 12.530);
SET_CHAR_HEADING(GetPlayerPed(), 360.0);
ADD_HOSPITAL_RESTART(1283, -966.899, 641.137, 6000.0, 0);
ADD_POLICE_RESTART(1478.99, -1134.73, 607.902, 6000.0, 0);
FORCE_TIME_OF_DAY(8, 0);
RELEASE_TIME_OF_DAY();
RELEASE_WEATHER();
WAIT(2000);
FORCE_LOADING_SCREEN(FALSE);
DO_SCREEN_FADE_IN_UNHACKED(4000);

Blip testBlip;
ADD_BLIP_FOR_COORD(1283, -966.899, 641.137, &testBlip);   // Your own x,y,z coords!
CHANGE_BLIP_SPRITE(testBlip, BLIP_HOSPITAL);   // OR this "CHANGE_BLIP_SPRITE(testBlip, BLIP_SAFEHOUSE);" ??
CHANGE_BLIP_COLOUR(testBlip, 0);   // 0 = white
CHANGE_BLIP_DISPLAY(testBlip, BLIP_DISPLAY_MAP_ONLY);   // OR this "CHANGE_BLIP_DISPLAY(testBlip, 2);"
CHANGE_BLIP_NAME_FROM_ASCII(testBlip, "New Hospital");

WAIT(2000);
PRINT_STRING_WITH_LITERAL_STRING_NOW("string", "Scocl test!", 3000, 1);

boolean start_var = 0;

while (TRUE)
{
 // IS_GAME_KEYBOARD_KEY_PRESSED
 if ( (IS_GAME_KEYBOARD_KEY_PRESSED(56)) && (IS_GAME_KEYBOARD_KEY_PRESSED(45)) )   // press left ALT + X
 {
  Camera testCam;
  Ped playerPed = GetPlayerPed();
 
  if (start_var == 0)
  {
   PRINT_STRING_WITH_LITERAL_STRING_NOW("STRING", "Mod ON!", 2000, 1);
   CREATE_CAM(14, &testCam);
   SET_CAM_ACTIVE(testCam, 1);
   SET_CAM_PROPAGATE(testCam, 1);
   ACTIVATE_SCRIPTED_CAMS(1, 1);
   
   ATTACH_CAM_TO_PED(testCam, playerPed);
   SET_CAM_ATTACH_OFFSET(testCam, 0.0, 0.0, 19.27);
   //SET_CAM_ATTACH_OFFSET_IS_RELATIVE(testCam, 1);
   POINT_CAM_AT_PED(testCam, playerPed);
   
   //SET_CAM_POINT_OFFSET(testCam, 0.0, 0.0, 10.0);
   //SET_CAM_POINT_OFFSET_IS_RELATIVE(testCam, 1);
   SET_CAM_FOV(testCam, 70.0);
   WAIT(500);
   
   start_var = 1;
  }
  else if (start_var == 1)
  {
   PRINT_STRING_WITH_LITERAL_STRING_NOW("STRING", "Mod OFF!", 2000, 1);
   SET_CAM_ACTIVE(testCam, 0);
   SET_CAM_PROPAGATE(testCam, 0);
   ACTIVATE_SCRIPTED_CAMS(0, 0);
   if (DOES_CAM_EXIST(testCam))
   {
    DESTROY_CAM(testCam);
   }
   WAIT(100);
   SET_CAM_BEHIND_PED(playerPed);
   
   start_var = 0;
  }
 }
 WAIT(0);
}
}


Now you have some cam natives to play around with it. Have fun smile.gif

So, need some sleep now, c ya...

How do I install this?

jdmalex2
  • jdmalex2

    Player Hater

  • Members
  • Joined: 25 Feb 2012

#146

Posted 14 July 2012 - 06:45 PM

here is the source code for my simple trainer... may have some bugs but it works for me.

there is 2 versions .

source pack


Video of the 1st trainer

compile 1_newscript.c with scocl

Skorpro
  • Skorpro

    GTAholic

  • Members
  • Joined: 19 Jul 2009
  • Germany

#147

Posted 15 July 2012 - 04:42 AM

Hi,

@Mainline421
How to install!

@jdmalex2
Wow icon14.gif Thanx for it smile.gif I'll check out your trainer on occasion!

Deluxe8900
  • Deluxe8900

    Player Hater

  • Members
  • Joined: 14 Jun 2012

#148

Posted 15 July 2012 - 03:30 PM

QUOTE (Limiter @ Thursday, Jul 5 2012, 07:39)
QUOTE (unknown modder @ Wednesday, Jul 4 2012, 23:04)
does this handle switch constructs as everytime i try to use it it says its a reserved keyword and errors out on compiling even though i have put the c code in right

From what I know, this project is based on a C-like language. So if something works in C, it might not work here since it may be a reserved word pre-defined in SCOCL.

Scocl stripped down the basic Syntax to C, and made a framework to call native functions, you always need to start a new script unless you are loading it through the main.sco.

aoxsystems
  • aoxsystems

    www.xssed.com

  • Members
  • Joined: 31 Jan 2008

#149

Posted 29 July 2012 - 09:52 PM

Hi,i decided to try some sco modding myself...have some previous knowladge of c,c++,c#
-So,in the begining i created in OpenIV new archive,in archive i'v placed main,puzzle and startup sco from stripped folder just to try if it works....saved as script.img,replaced original script.img
-Removed saves from my docs
Started new game and up with error while loading new game.
Am i doing something wrong,maybe im missing something here?

Also manualy compiled .c files same thing happened
Version is 1.0.4.0



Frank.s
  • Frank.s

    AKA PingPang

  • Members
  • Joined: 15 Apr 2008
  • None

#150

Posted 29 July 2012 - 10:39 PM Edited by Frank.s, 29 July 2012 - 10:41 PM.

Upload the sources, i'll compile them and see if i get the same crash. If it happens then i'll find out what caused it and tell ya'

Edit: I think it's caused by compilation designed for patch7, i've heard it's possible to change it to patch4 after compilation using sco toolbox by Flitskikker.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users