Shoot in a car = turn off the engine
#1

Hey guys! I did a system some years ago that when a cop shoots with the weapon 34 (country rifle) in a car, the engine turns off, but i totally forgot how to do it!

i was thinking about "OnPlayerWeaponShot" but i can't set the vehicle to turn off the engine so...how i can make this system?? i only remember that i used

pawn Код:
SetVehicleParamsEx(vehicle, 0, lights, alarm, doors, bonnet, boot, objective);
to turn off the engine

PS: Sorry for the bad english, i'm brazilian and in the portuguese forum we don't have good scripters...
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=577156
Use the OnPlayerShotVehicle callback from here, so you can take the vehicleid and the weaponid
Reply
#3

Quote:
Originally Posted by Banditul18
Посмотреть сообщение
https://sampforum.blast.hk/showthread.php?tid=577156
Use the OnPlayerShotVehicle callback from here, so you can take the vehicleid and the weaponid
OH YEAH THANKS MAN!!! I was searching only simple functions!! Thanks dude! REP+!
Reply
#4

Quote:
Originally Posted by Banditul18
Посмотреть сообщение
https://sampforum.blast.hk/showthread.php?tid=577156
Use the OnPlayerShotVehicle callback from here, so you can take the vehicleid and the weaponid
He could simply use OnPlayerWeaponShot. If he shoots a vehicle then "hitid" is the shot vehicle's id.
Reply
#5

Quote:
Originally Posted by GoldenLion
Посмотреть сообщение
He could simply use OnPlayerWeaponShot. If he shoots a vehicle then "hitid" is the shot vehicle's id.
Oh damn, i really don't know that actually. I was thinking there is no vehicleid or something to return it. Well thanks for info....

EDIT: Just open the vehicleplus include and saw that...
Reply
#6

Quote:
Originally Posted by GoldenLion
Посмотреть сообщение
He could simply use OnPlayerWeaponShot. If he shoots a vehicle then "hitid" is the shot vehicle's id.
i tried but idk how to get the vehicle ID on the OnPlayerWeaponShot but thanks!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)