BilinmeyenBey Posted September 24, 2021 Share Posted September 24, 2021 So I wanted to make something... Special. But for this "Special" thing, I need to know what car player is using. But if you are gonna ask: - I'll ask to game what car player is using / car player is in, then I'll explode that car. So to explode a car. I need to know what car is playing using. Cause Global Variables needed for that car. How to do? (Might spelled most of things wrong, because bad English.) Link to comment Share on other sites More sharing options...
BilinmeyenBey Posted September 25, 2021 Author Share Posted September 25, 2021 (edited) OK, I found the opcode that sees what car player is using. 00DA opcode - stores the car player is in. and 00D9 opcode - stores the car char (actor or anything) is in Edited September 25, 2021 by BilinmeyenBey Link to comment Share on other sites More sharing options...
Jack Posted September 26, 2021 Share Posted September 26, 2021 9 hours ago, BilinmeyenBey said: OK, I found the opcode that sees what car player is using. 00DA opcode - stores the car player is in. and 00D9 opcode - stores the car char (actor or anything) is in Those are mission opcodes. You should use these ones instead: STORE_CAR_CHAR_IS_IN_NO_SAVE // 03C0: [email protected] = actor $PLAYER_ACTOR car STORE_CAR_PLAYER_IS_IN_NO_SAVE // 03C1: [email protected] = player $PLAYER_CHAR car_no_save Like this: 03C1: [email protected] = player $PLAYER_CHAR car_no_save if 056E: car [email protected] defined then end or: if 00DF: actor $PLAYER_ACTOR driving then 03C1: [email protected] = player $PLAYER_CHAR car_no_save end or: if 0449: actor $PLAYER_ACTOR in_a_car then 03C1: [email protected] = player $PLAYER_CHAR car_no_save end In c++ it would be like this: CPed *playa = FindPlayerPed(); if (playa) { CVehicle *playaVeh = playa->m_pVehicle; if (playaVeh) { } } or simply: CVehicle *playaVeh = FindPlayerVehicle(-1, true); if (playaVeh) { } Tank Fire [SA] New Police Helicopter [VC & III] My YouTube Channel Link to comment Share on other sites More sharing options...
BilinmeyenBey Posted September 26, 2021 Author Share Posted September 26, 2021 3 hours ago, Jack said: Those are mission opcodes. You should use these ones instead: STORE_CAR_CHAR_IS_IN_NO_SAVE // 03C0: [email protected] = actor $PLAYER_ACTOR car STORE_CAR_PLAYER_IS_IN_NO_SAVE // 03C1: [email protected] = player $PLAYER_CHAR car_no_save Like this: 03C1: [email protected] = player $PLAYER_CHAR car_no_save if 056E: car [email protected] defined then end or: if 00DF: actor $PLAYER_ACTOR driving then 03C1: [email protected] = player $PLAYER_CHAR car_no_save end or: if 0449: actor $PLAYER_ACTOR in_a_car then 03C1: [email protected] = player $PLAYER_CHAR car_no_save end In c++ it would be like this: CPed *playa = FindPlayerPed(); if (playa) { CVehicle *playaVeh = playa->m_pVehicle; if (playaVeh) { } } or simply: CVehicle *playaVeh = FindPlayerVehicle(-1, true); if (playaVeh) { } Yeah, thanks. But even though. It works. It saves which car is player in-game. These opcodes can be found in main.scm aswell. Example: Game checks if player is an Taxi, If it is, shows the taxi submission text. If not, does nothing. So doesn't this work normally? What are the problems of these opcodes I said? Or it is used for simple use? Please Explain. Thanks Link to comment Share on other sites More sharing options...
Jack Posted September 26, 2021 Share Posted September 26, 2021 They're designed for missions - not scripts. It might happen when the mission is passed that the variable which contains the vehicle handle will be cleaned. Tank Fire [SA] New Police Helicopter [VC & III] My YouTube Channel Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now