Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add APIs for more native opcodes #2

Open
DurtyFree opened this issue Dec 13, 2019 · 5 comments
Open

Add APIs for more native opcodes #2

DurtyFree opened this issue Dec 13, 2019 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@DurtyFree
Copy link
Owner

If somebody feels like adding API for those native opcodes, do it. (Some of them are already available as API)

DEFINE_OPCODE(create_coord, 0x04C4, "vfffvvv");	// PLAYER_ACTOR, x, y, z, var_x, var_y, var_z
DEFINE_OPCODE(destroy_actor, 0x009B, "v");	// var_actor
DEFINE_OPCODE(actor_look_at_player, 0x020F, "vv");	// var_actor, PLAYER_CHAR
DEFINE_OPCODE(AT_rotate_to_actor, 0x0639, "vv");	// var_actor, PLAYER_CHAR
DEFINE_OPCODE(unload_special_actor, 0x0296, "i");	// var_actor,
DEFINE_OPCODE(get_car_color, 0x03F3, "vii");  	// var_car col1 col2
DEFINE_OPCODE(create_panel, 0x08D4, "sfffiiiiv");	//Create Panel - Title, Left Pos x, Top Pos y, Width w, #of columns, interactive (1 yes, 0 no), background (1 yes 0 no), align (0 = center, 1 = left, 2 = right), var_panel (handle)
DEFINE_OPCODE(delete_panel, 0x08DA, "v");  //Remove Panel (var_panel)
DEFINE_OPCODE(set_panel_column_data, 0x08DB, "visssssssssssss"); // var_panel, #of column, text strings
DEFINE_OPCODE(set_panel_data_text1, 0x08EE, "viisi");
DEFINE_OPCODE(set_panel_data_text2, 0x08EF, "viisii");
DEFINE_OPCODE(set_panel_column_width, 0x09DB, "vii");
DEFINE_OPCODE(set_panel_column_align, 0x08D6, "vii");
DEFINE_OPCODE(set_panel_row_enable, 0x08D9, "vii"); //var_panel, #of row, enable 1, disable 0
DEFINE_OPCODE(text_draw, 0x033E, "ffs");
DEFINE_OPCODE(remove_text, 0x03D5, "s");
DEFINE_OPCODE(clear_all_text, 0x00BE, "");
DEFINE_OPCODE(text_draw_toggle, 0x03F0, "i");
DEFINE_OPCODE(get_time, 0x00BF, "ii");
DEFINE_OPCODE(set_time, 0x00C0, "ii");
DEFINE_OPCODE(text_draw_1number, 0x045A, "ffsi");
DEFINE_OPCODE(release_weather, 0x01B7, "");
DEFINE_OPCODE(cleanup_actor, 0x01C2, "v");
DEFINE_OPCODE(mission_cleanup, 0x00D8, "");
DEFINE_OPCODE(change_stat_int, 0x0629, "ii");
DEFINE_OPCODE(change_stat_float, 0x062A, "if");
DEFINE_OPCODE(set_total_missions, 0x042C, "i");
DEFINE_OPCODE(set_total_mission_points, 0x030D, "i");
DEFINE_OPCODE(interior_access, 0x07FB, "si");
DEFINE_OPCODE(activate_garage, 0x0299, "s");
DEFINE_OPCODE(init_object_in_obgroup, 0x0776, "s");
DEFINE_OPCODE(destroy_object_in_obgroup, 0x0777, "s");
DEFINE_OPCODE(set_burglar_houses_open, 0x09E6, "i");
DEFINE_OPCODE(reset_interior_colors, 0x04FA, "i");
DEFINE_OPCODE(set_entrance_on, 0x08E7, "i");
DEFINE_OPCODE(AT_jump, 0x05BC, "vi");
DEFINE_OPCODE(AT_finger, 0x05C2, "v");
DEFINE_OPCODE(AT_hands_cower, 0x05C3, "v");
DEFINE_OPCODE(AT_hands_up, 0x05C4, "vi");
DEFINE_OPCODE(request_animation, 0x04ED, "s");
DEFINE_OPCODE(release_animation, 0x04EF, "s");
DEFINE_OPCODE(AT_tired, 0x05BD, "vi");
DEFINE_OPCODE(AT_move_mouth, 0x0967, "vi");
DEFINE_OPCODE(AT_roll_sideways, 0x06E3, "vi");
DEFINE_OPCODE(AT_stop_mouth, 0x0968, "vi");
DEFINE_OPCODE(toggle_radar, 0x0581, "i");
DEFINE_OPCODE(toggle_hud, 0x0826, "i");
DEFINE_OPCODE(toggle_riot, 0x06C8, "i");
DEFINE_OPCODE(display_zone_text, 0x0A19, "s");
DEFINE_OPCODE(set_actor_health, 0x0223, "vi");
DEFINE_OPCODE(cellphone, 0x0729, "vi");
DEFINE_OPCODE(car_psycho, 0x00A8, "v");
DEFINE_OPCODE(car_normal, 0x00A9, "v");
DEFINE_OPCODE(car_immunities, 0x2AC, "viiiii");
DEFINE_OPCODE(car_max_speed, 0x00AD, "vf");
DEFINE_OPCODE(car_behav, 0x00AF, "vf");
DEFINE_OPCODE(AT_car_driver, 0x05CB, "vvi");
DEFINE_OPCODE(AT_car_pass, 0x05CA, "vvii");
DEFINE_OPCODE(car_drive_to, 0x02C2, "vfff");
DEFINE_OPCODE(AT_leave_car, 0x05CD, "vv");
DEFINE_OPCODE(AT_drive_to, 0x05D1, "vvffffiii");
DEFINE_OPCODE(AT_stay_put, 0x0638, "vi");
DEFINE_OPCODE(car_follow_car, 0x07F8, "vvf");
DEFINE_OPCODE(explode_car, 0x020B, "v");
DEFINE_OPCODE(AT_clear_AT, 0x0687, "v");
DEFINE_OPCODE(AT_go_to, 0x05D3, "vfffii");
DEFINE_OPCODE(AT_set_walk_speed, 0x07A1, "i");
DEFINE_OPCODE(actor_in_group, 0x0631, "vv");
DEFINE_OPCODE(release_group, 0x0632, "v");
DEFINE_OPCODE(create_player_group, 0x07AF, "vv");
DEFINE_OPCODE(create_group, 0x062F, "iv");
DEFINE_OPCODE(actor_group_leader, 0x0630, "vv");
DEFINE_OPCODE(UNK1, 0x07CB, "vi");
DEFINE_OPCODE(group_flag, 0x09DD, "i");
DEFINE_OPCODE(AT_chat, 0x0677, "vvii");
DEFINE_OPCODE(AT_animation, 0x0605, "vssfiiiii");
DEFINE_OPCODE(remove_actor_from_group, 0x06C9, "v");
DEFINE_OPCODE(text_box, 0x03E5, "s");
DEFINE_OPCODE(UNK_flag, 0x0816, "vi");
DEFINE_OPCODE(UNK_flag2, 0x074E, "vfi");
DEFINE_OPCODE(change_player_skin, 0x09C7, "vi");
DEFINE_OPCODE(max_wanted_level, 0x01F0, "i");
DEFINE_OPCODE(set_wanted_level, 0x010D, "i");
DEFINE_OPCODE(clear_wanted_level, 0x0110, "v");
DEFINE_OPCODE(AT_kill_actor, 0x05E2, "vv");
DEFINE_OPCODE(camera_on_ped, 0x0159, "vii");
DEFINE_OPCODE(actor_swim_ability, 0x04D8, "vi");
DEFINE_OPCODE(AT_bail_from_car, 0x0633, "v");
DEFINE_OPCODE(AT_sit_down, 0x06B0, "vi");
DEFINE_OPCODE(AT_perform_driveby, 0x0713, "iiiffffiii");
DEFINE_OPCODE(AT_look_around, 0x05C8, "v");
DEFINE_OPCODE(AT_cower, 0x05C5, "vi");
DEFINE_OPCODE(start_AS, 0x0615, "v");
DEFINE_OPCODE(end_AS, 0x0616, "v");
DEFINE_OPCODE(assign_AS, 0x0618, "vv");
DEFINE_OPCODE(AS_loop_flag, 0x0643, "vi");
DEFINE_OPCODE(AS_remove_ref, 0x061B, "v");
DEFINE_OPCODE(AT_kill, 0x05BE, "v");
DEFINE_OPCODE(car_door_status, 0x020A, "vi");
DEFINE_OPCODE(create_weapon_pickup, 0x032B, "iiifffv");
DEFINE_OPCODE(create_pickup, 0x0213, "iifffv");
DEFINE_OPCODE(create_object, 0x0107, "ifffv"); 
DEFINE_OPCODE(attach_obj_to_actor, 0x070A, "vvfffiissi");
DEFINE_OPCODE(attach_particle_to_actor, 0x0669, "svfffiv");
DEFINE_OPCODE(destroy_object, 0x0108, "v");
DEFINE_OPCODE(set_rubbish, 0x03AD, "i");
DEFINE_OPCODE(heat_wave, 0x08FD, "i");
DEFINE_OPCODE(create_cash_pickup, 0x02E1, "fffiiv");
DEFINE_OPCODE(get_random_ped, 0x08E5, "ffffv");
DEFINE_OPCODE(object_solid_in_area, 0x0985, "ffffiiv");
DEFINE_OPCODE(get_object_in_3d_area, 0x0866, "ffffi");
DEFINE_OPCODE(get_object_model_ID, 0x0984, "vi");
DEFINE_OPCODE(get_object_in_3d_area_radius, 0x0A3E, "ffffffi");
DEFINE_OPCODE(is_modelID_boat, 0x081E, "v");
DEFINE_OPCODE(is_modelID_airplane, 0x081F, "v");
DEFINE_OPCODE(is_modelID_heli, 0x0820, "v");
DEFINE_OPCODE(airplane_follow, 0x0710, "vvvf");
DEFINE_OPCODE(heli_follow, 0x0726, "vvvf");
DEFINE_OPCODE(hydra_thrust_horizontal, 0x0745, "v");
DEFINE_OPCODE(landing_gear_up, 0x08E6, "vi");
DEFINE_OPCODE(put_actor_in_car, 0x036A, "vv");
DEFINE_OPCODE(car_abandon_path, 0x04E0, "vi");
DEFINE_OPCODE(hydra_attack_player_vehicle, 0x070E, "vvf");
DEFINE_OPCODE(hunter_attack_player, 0x0724, "vvf");
DEFINE_OPCODE(get_driver_from_car, 0x046C, "iv");
DEFINE_OPCODE(set_panel_active_row, 0x090E, "vi");
DEFINE_OPCODE(get_panel_active_row, 0x08D7, "vv");
DEFINE_OPCODE(perm_text_box, 0x0512, "s");
DEFINE_OPCODE(clear_text_box, 0x03E6, "");
DEFINE_OPCODE(set_gamespeed, 0x015D, "f");
DEFINE_OPCODE(AS_with_object, 0x075A, "vssffi");
DEFINE_OPCODE(AT_animation_group, 0x0812, "vssfiiiii");
DEFINE_OPCODE(attach_obj_to_actor2, 0x069B, "vvffffff"); 
DEFINE_OPCODE(lock_actor_position, 0x04D7, "vi");
DEFINE_OPCODE(player_ignored, 0x03BF, "vi");
DEFINE_OPCODE(cinematic_camera, 0x093D, "i");
DEFINE_OPCODE(first_person_camera, 0x0A2F, "i");
DEFINE_OPCODE(camera_FOV_inout, 0x0922, "ffii");
DEFINE_OPCODE(camera_jiggle, 0x099C, "iff");
DEFINE_OPCODE(camera_on_ped_offset_point_actor, 0x067E, "vfffvfi");``` 
@DurtyFree DurtyFree added the help wanted Extra attention is needed label Dec 13, 2019
@DiLDoST
Copy link

DiLDoST commented Jan 6, 2021

Buddy! I have founded and tested alot of opcodes which you can use in your project, they include IS_PED_SHOOTING, GET_VEHICLE_DRIVER, EXPLODE_PED_HEAD, IS_MODEL_HELI/PLANE/BOAT/etc, GIVE_WEAPON_TO_PED (The most useful, which isn't yet on your project) and much more, i have tested nearly 27 of them but i think i still have a list of more than 100 to test. Can i share them here in comments on anywhere? They are formatted the same way as you did, the comments make them absolutely clear on how to use them like:
HAS_PED_SPOTTED_PED =0x0..., // pHandle, pHandle => bool

Can i share with you?

@DurtyFree
Copy link
Owner Author

Buddy! I have founded and tested alot of opcodes which you can use in your project, they include IS_PED_SHOOTING, GET_VEHICLE_DRIVER, EXPLODE_PED_HEAD, IS_MODEL_HELI/PLANE/BOAT/etc, GIVE_WEAPON_TO_PED (The most useful, which isn't yet on your project) and much more, i have tested nearly 27 of them but i think i still have a list of more than 100 to test. Can i share them here in comments on anywhere? They are formatted the same way as you did, the comments make them absolutely clear on how to use them like:
HAS_PED_SPOTTED_PED =0x0..., // pHandle, pHandle => bool

Can i share with you?

Sure just go ahead and feel free to share it.

@DiLDoST
Copy link

DiLDoST commented Jan 7, 2021

Bro! Check and tell me what enums do you need nah so i will share, mention the ones, am a bit lazy to search for class names in these comments 😅
I have more, nearly 90, i will check and share again. Okay bro?

		FIX_CAR = 0x0A30,
		// vHandle
		FORCE_ALL_VEHICLE_LIGHTS_OFF = 0x0A37,
		// b
		GET_NUMBER_OF_PASSENGERS = 0x01E9,
		// vHandle => i
		GET_CAR_MASS = 0x06A3,
		// vHandle => f
		IS_CHAR_GETTING_IN_TO_A_CAR = 0x09DE,
		// pHandle =?> b
		GET_DRIVER_OF_CAR = 0x046C,
		// vHandle => pHandle
		FORCE_CAR_LIGHTS = 0x067F,
		// vHandle, i (0 = NO_CAR_LIGHT_OVERRIDE, 1 = FORCE_CAR_LIGHTS_OFF, 2 = FORCE_CAR_LIGHTS_ON)
		SET_CAR_ENGINE_BROKEN = 0x081D,
		// vHandle, b
		SET_CAR_ENGINE_ON = 0x0918,
		// vHandle, b
		SET_CAM_BEHIND_PLAYER = 0x0373,
		// <NONE>
		IS_CAR_ON_FIRE = 0x0495,
		// vHandle => b
		CLOSE_ALL_CAR_DOORS = 0x0508,
		// vHandle
		FREEZE_CAR_POSITION = 0x0519,
		// vHandle, b
		GIVE_WEAPON_TO_CHAR = 0x01B2,
		// pHandle, i (WeaponType), i (Ammo)
		SET_CHAR_ONLY_DAMAGED_BY_PLAYER = 0x02AA,
		// pHandle, b
		IS_CHAR_SHOOTING = 0x02E0,
		// pHandle => b
		EXPLODE_CHAR_HEAD = 0x0321,
		// pHandle
		SET_CHAR_VISIBLE = 0x0336,
		// pHandle, b
		HAS_CHAR_SPOTTED_CHAR = 0x0364,
		// pHandle, pHandle
		SET_CAN_BURST_CAR_TYRES = 0x053F,
		// vHandle, b
		IS_THIS_MODEL_A_BOAT = 0x081E,
		// i (Model) => b
		IS_THIS_MODEL_A_PLANE = 0x081F,
		// i (Model) => b
		IS_THIS_MODEL_A_HELI = 0x0820,
		// i (Model) => b
		IS_BIG_VEHICLE = 0x0969,
		// vHandle => b
		MAKE_HELI_COME_CRASHING_DOWN = 0x0564,
		// vHandle
		SET_CAR_ROLL = 0x0731,
		// vHandle, yF (Rotation)
		
		FORCE_WEATHER = 0x01B5,
		// wHandle
		FORCE_WEATHER_NOW = 0x01B6,
		// wHandle
		RELEASE_WEATHER = 0x01B7,
		//NONE
		STORE_WEATHER = 0x0251,
		//NONE
		RESTORE_WEATHER = 0x0252,
		//NONE
		LOAD_AND_LAUNCH_MISSION_INTERNAL = 0x0417,
		// i (Mission)
		PLAY_MISSION_PASSED_TUNE = 0x0394,
		// i=1
		FAIL_CURRENT_MISSION = 0x045C,
		//NONE
		
		
		SET_COLLECTABLE1_TOTAL = 0x02ED,
		// i
		IS_CHAR_MALE = 0x03A3,
		// pHandle
		SET_WANTED_MULTIPLIER = 0x03C7,
		// f (DEFAULT: 1.0)
		SET_CAMERA_IN_FRONT_OF_PLAYER = 0x03C8,
		// NONE
		IS_CAR_VISIBLY_DAMAGED = 0x03C9,
		// vHandle => b
		IS_CAR_STUCK = 0x03CE,
		// vHandle => b
		IS_CHAR_ON_FOOT = 0x036A,
		// pHandle => b
		IS_CHAR_ON_ANY_BIKE = 0x04C5,
		// pHandle => b
		HAS_CHAR_BEEN_PHOTOGRAPHED = 0x04C5,
		// pHandle
		BURST_CAR_TYRE = 0x04FE,
		// vHandle, i
		SET_UPSIDEDOWN_CAR_NOT_DAMAGED = 0x03ED,
		// vHandle, i (0=DEFAULT, 1=NOT_DAMAGED_WHEN_UPSIDE_DOWN)
		IS_CHAR_IN_ANY_BOAT = 0x04A7,
		// pHandle => b
		IS_CHAR_IN_ANY_HELI = 0x04A9,
		// pHandle => b
		IS_CHAR_IN_ANY_PLANE = 0x04AB,
		// pHandle => b
		IS_CHAR_IN_WATER = 0x04AD,
		// pHandle => b
		IS_CHAR_IN_FLYING_VEHICLE = 0x04C8,
		// pHandle => b
		SET_CHAR_DROWNS_IN_WATER = 0x04D8,
		// pHandle, i (0 = not drown, DEFAULT:1 = drown)
		SET_PLAYER_MOOD = 0x04E3,
		// PlayerHandle, i (Mood), i (Duration)
		PLAYER_MADE_PROGRESS = 0x030C,
		// i
		SET_PROGRESS_TOTAL = 0x030D,
		// i
		SET_CAR_WATERTIGHT = 0x039C,
		// vHandle, i (0 = not watertight, 1 = watertight)
		SET_TOTAL_NUMBER_OF_MISSIONS = 0x042C,
		// i
		
		SET_PLAYER_NEVER_GETS_TIRED = 0x0330,
		// PlayerHandle, i (DEFAULT:0 = disable, 1 = enable)
		SET_PLAYER_FAST_RELOAD = 0x0331,
		// PlayerHandle, i (DEFAULT:0 = disable, 1 = enable)
		SET_CHAR_BLEEDING = 0x0332,
		// pHandle, i (DEFAULT:0 = disable, 1 = enable)
		SET_FREE_RESPRAYS = 0x0335,
		// i (0 = not free, 1 = free)
		
		SET_FREE_HEALTH_CARE = 0x0414,
		// PlayerHandle, i (DEFAULT:0 = disable, 1 = enable)
		IS_CAR_DOOR_CLOSED = 0x0415,
		// vHandle, i (CarDoor) => b
		
		IS_CAR_PASSENGER_SEAT_FREE = 0x0431,
		// vHandle, i (0: FRONT_RIGHT_SEAT/REAR_SEAT, 1: FRONT_LEFT_SEAT, 2: REAR_RIGHT_SEAT) => bool
		ARE_ANY_CAR_CHEATS_ACTIVATED = 0x0445,
		// NONE
		SET_CHAR_SUFFERS_CRITICAL_HITS = 0x0446,
		// pHandle, i (0 = disable dismemberment, 1 = enable dismemberment)
		SET_CAR_TEMP_ACTION = 0x0477,
		// vHandle, i (TempAction), i (Duration)
		SET_PLAYER_CAN_DO_DRIVE_BY = 0x0501,
		// PlayerHandle, i (0 = disable, DEFAULT:1 = enable)
		SET_CHAR_NEVER_TARGETTED = 0x0568,
		// pHandle, i (DEFAULT:0 = can be targetted, 1 = cannot be targetted)
		

@DiLDoST
Copy link

DiLDoST commented Jan 10, 2021

3 More OpCodes (Tested+Working):

GET_CAR_ROLL=0x06BE,
// vHandle => yF (Rotation)
GET_CHAR_PLAYER_IS_TARGETING=0x0AD2,
// PlayerHandle => pHandle
GET_TARGET_BLIP_COORDINATES=0x0AB6,
// NONE => xF, yF, zF

Bro Give a thumbs up atleast, so i'll know that you read these naa please 😉

@Samthapa76
Copy link

not working i try it nothing happen i press all keys but no luck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants