Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP Pawn Scripting [Pawn] Start the engine of an npc?

 
  • 0 Vote(s) - 0 Average
Pawn Start the engine of an npc?
Boxi
Offline

Burgershot Member
Posts: 48
Threads: 23
Joined: Jan 2021
Reputation: 0
Location: Angel Pine
#1
2021-04-05, 09:52 PM
Hello everyone! well I have the following problem, and is that I already installed helicopter as npc and appears in the game normally, but the engine is not on, I did the following to try to turn it on but it does not work any idea? thanks c:

Code:
helicoptero1 = AddStaticVehicle(487,-2102.1294,-2237.8005,30.6250,142.4440,0,137);
   
GetVehicleParamsEx(helicoptero1,engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(helicoptero1, VEHICLE_PARAMS_ON, engine, lights, alarm, bonnet, boot, objective);
PutuSuhartawan
Offline

Burgershot Member
Posts: 120
Threads: 52
Joined: Nov 2020
Reputation: 1
Location: Indonesia
#2
2021-04-06, 04:01 AM (This post was last modified: 2021-04-07, 05:38 AM by PutuSuhartawan.)
is function GetVehicleParamsEx stock exist? https://www.youtube.com/watch?v=_H7p6IrpaiY

changed to:
helicoptero1 = AddStaticVehicle(487,-2102.1294,-2237.8005,30.6250,142.4440,0,137);

GetVehicleParamsEx(helicoptero1,engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(helicoptero1, VEHICLE_PARAMS_ON, lights, alarm, bonnet, boot, objective);
Pinch
Offline

Burgershot Member
Posts: 391
Threads: 19
Joined: Apr 2019
Reputation: 22
Location: Belgrade, Serbia
#3
2021-04-07, 02:24 AM (This post was last modified: 2021-04-07, 02:27 AM by Pinch.)
(2021-04-06, 04:01 AM)PutuSuhartawan Wrote: is function GetVehicleParamsEx stock exist? https://www.youtube.com/watch?v=_H7p6IrpaiY
This man's English took programming too seriously.

Try
Code:
helicoptero1 = AddStaticVehicle(487,-2102.1294,-2237.8005,30.6250,142.4440,0,137);
  
GetVehicleParamsEx(helicoptero1,engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(helicoptero1, VEHICLE_PARAMS_ON, lights, alarm, bonnet, boot, objective);
Using Pawn.CMD?
If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
Boxi
Offline

Burgershot Member
Posts: 48
Threads: 23
Joined: Jan 2021
Reputation: 0
Location: Angel Pine
#4
2021-04-07, 01:38 PM
(2021-04-07, 02:24 AM)Pinch Wrote:
(2021-04-06, 04:01 AM)PutuSuhartawan Wrote: is function GetVehicleParamsEx stock exist? https://www.youtube.com/watch?v=_H7p6IrpaiY
This man's English took programming too seriously.

Try
Code:
helicoptero1 = AddStaticVehicle(487,-2102.1294,-2237.8005,30.6250,142.4440,0,137);
 
GetVehicleParamsEx(helicoptero1,engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(helicoptero1, VEHICLE_PARAMS_ON, lights, alarm, bonnet, boot, objective);

Fixed! thank you
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode