jdmalex2 0 Posted March 6, 2012 Share Posted March 6, 2012 yes but why in this function, (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: #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 Link to post Share on other sites
Terreur69 20 Posted March 6, 2012 Share Posted March 6, 2012 (edited) ok thank but why the web site> here it puts the f7 = 76 ? Edited March 6, 2012 by terreur69 Link to post Share on other sites
jdmalex2 0 Posted March 6, 2012 Share Posted March 6, 2012 ok thank but why the web site> here it puts the f7 = 76 ? Im not sure why Link to post Share on other sites
Terreur69 20 Posted March 6, 2012 Share Posted March 6, 2012 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 Link to post Share on other sites
N-field 0 Posted March 8, 2012 Share Posted March 8, 2012 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.... ) Link to post Share on other sites
Skorpro 129 Posted March 8, 2012 Share Posted March 8, 2012 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: int key = 118;if ((GetAsyncKeyState(key) & 1) != 0) // F7 But with SCOCL I've used this: if (IS_GAME_KEYBOARD_KEY_PRESSED(65)) // F7 I found this out (German keyboard!): 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 = ESC2 = 13 = 24 = 35 = 46 = 57 = 68 = 79 = 810 = 911 = 012 = German Keyboard ß13 = German Keyboard `14 = Backspace15 = Tab16 = q17 = w18 = e19 = r20 = t21 = German Keyboard z22 = u23 = i24 = o25 = p26 = German Keyboard ü27 = German Keyboard +28 = Return29 = CTRL left30 = a31 = s32 = d33 = f34 = g35 = h36 = j37 = k38 = l39 = German Keyboard ö40 = German Keyboard ä41 = German Keyboard ^42 = Shift left43 = ???44 = German Keyboard y45 = x46 = c47 = v48 = b49 = n50 = m51 = ,52 = .53 = -54 = Shift right55 = Num *56 = Alt left57 = Space58 = Caps Lock (Shift)59 = F160 = F261 = F362 = F463 = F564 = F665 = F766 = F867 = F968 = F1069 = Num Num70 = German Keyboard Rollen71 = Num 772 = Num 873 = Num 974 = Num -75 = Num 476 = Num 577 = Num 678 = Num +79 = Num 180 = Num 281 = Num 382 = Num 083 = Num ,84 = ???85 = ???86 = German Keyboard <87 = F1188 = F12 It's like jdmalex2 key list Link to post Share on other sites
Frank.s 838 Posted April 6, 2012 Share Posted April 6, 2012 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. Any help with the problem would be appreciated. Btw i originally posted this problem here in the IVSA topic. Link to post Share on other sites
Skorpro 129 Posted April 8, 2012 Share Posted April 8, 2012 (edited) 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: 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 Edited April 8, 2012 by Skorpro Link to post Share on other sites
d-e-v 0 Posted April 23, 2012 Share Posted April 23, 2012 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? Link to post Share on other sites
Terreur69 20 Posted June 4, 2012 Share Posted June 4, 2012 hi, i want to know how to put more value on #define i have this : #define ZOMB_MODEL MODEL_M_Y_GRUS_LO_01 possible to add more value : #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. Link to post Share on other sites
DK22Pac 2,531 Posted June 8, 2012 Share Posted June 8, 2012 #define MYMODEL1 1#define MYMODEL2 2 Or you want to make random models? Then, you must do it in your code. Link to post Share on other sites
gtafrodo 0 Posted June 10, 2012 Share Posted June 10, 2012 (edited) 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 Edited June 10, 2012 by gtafrodo Link to post Share on other sites
gtafrodo 0 Posted June 15, 2012 Share Posted June 15, 2012 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? Link to post Share on other sites
Deluxe8900 0 Posted June 15, 2012 Share Posted June 15, 2012 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 Link to post Share on other sites
gtafrodo 0 Posted June 15, 2012 Share Posted June 15, 2012 (edited) 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 Edited June 15, 2012 by gtafrodo Link to post Share on other sites
Deluxe8900 0 Posted June 15, 2012 Share Posted June 15, 2012 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 Link to post Share on other sites
Skorpro 129 Posted June 16, 2012 Share Posted June 16, 2012 Hi, an example for DISPLAY_TEXT_WITH_NUMBER Small Speedo: //GLOBALCar 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){// TEXTSET_TEXT_FONT(1); // TEXTFONT_LEDSET_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 : ");// NUMSET_TEXT_FONT(1); // TEXTFONT_LEDSET_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! Link to post Share on other sites
gtafrodo 0 Posted June 16, 2012 Share Posted June 16, 2012 thanks guys I have my grab mod working and text displaying on screen. (On PS3) Anyone understand the 4 grab points? 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. Link to post Share on other sites
westsidebud 0 Posted June 23, 2012 Share Posted June 23, 2012 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 Link to post Share on other sites
Limiter 22 Posted June 28, 2012 Share Posted June 28, 2012 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. Link to post Share on other sites
Deluxe8900 0 Posted June 28, 2012 Share Posted June 28, 2012 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. Link to post Share on other sites
Limiter 22 Posted June 29, 2012 Share Posted June 29, 2012 (edited) I understand what you are saying thankfully since I have C++ background. 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. Edited June 29, 2012 by Limiter Link to post Share on other sites
unknown modder 202 Posted July 4, 2012 Share Posted July 4, 2012 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 Link to post Share on other sites
Limiter 22 Posted July 5, 2012 Share Posted July 5, 2012 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. Link to post Share on other sites
Mainline421 28 Posted July 12, 2012 Share Posted July 12, 2012 Yeeah, back home again... back to GTA... GTA addicted?!? By doing so I dont need puzzle and startup or remove game saves Wow sounds good! Maybe I'll try it 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. Press left ALT + X to switch mod on/off! #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 = whiteCHANGE_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 So, need some sleep now, c ya... How do I install this? Link to post Share on other sites
jdmalex2 0 Posted July 14, 2012 Share Posted July 14, 2012 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 Link to post Share on other sites
Skorpro 129 Posted July 15, 2012 Share Posted July 15, 2012 Hi, @Mainline421 How to install! @jdmalex2 Wow Thanx for it I'll check out your trainer on occasion! Link to post Share on other sites
Deluxe8900 0 Posted July 15, 2012 Share Posted July 15, 2012 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. Link to post Share on other sites
aoxsystems 0 Posted July 29, 2012 Share Posted July 29, 2012 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 Link to post Share on other sites
Frank.s 838 Posted July 29, 2012 Share Posted July 29, 2012 (edited) 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. Edited July 29, 2012 by Frank.s Link to post Share on other sites