|
 |
|
|
|
|
|
GTA Modification Forums
[GTA IV|EFLC|REL] Scocl High level *.sco script compiler
 |
|
 |
| |
Skorpro  |
Posted: Thursday, Mar 8 2012, 22:31
|
GTAholiker

Group: Members
Joined: Jul 19, 2009


|
| 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
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Skorpro  |
|
GTAholiker

Group: Members
Joined: Jul 19, 2009


|
| 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  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 This post has been edited by Skorpro on Sunday, Apr 8 2012, 11:25
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
gtafrodo  |
|
Player Hater

Group: Members
Joined: Jun 10, 2012

|
| 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 |
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 This post has been edited by gtafrodo on Friday, Jun 15 2012, 20:48
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Deluxe8900  |
|
Player Hater

Group: Members
Joined: Jun 14, 2012

|
| 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 |
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
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Skorpro  |
Posted: Saturday, Jun 16 2012, 05:32
|
GTAholiker

Group: Members
Joined: Jul 19, 2009


|
Hi, an example for DISPLAY_TEXT_WITH_NUMBER 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  |
Posted: Saturday, Jun 16 2012, 12:10
|
Player Hater

Group: Members
Joined: Jun 10, 2012

|
thanks guys  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  |
Posted: Saturday, Jun 23 2012, 18:09
|
Descanter The Insalubrious

Group: Members
Joined: Jun 11, 2005


|
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
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Pages:
(9) « First ... 5 6 [7] 8 9
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
| |
 |
|
 |
|
|
|
|