weapon pickups in vehicles - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: weapon pickups in vehicles (
/showthread.php?tid=174031)
weapon pickups in vehicles -
WillyP - 04.09.2010
so what would you do? just attach the object to player/vehicle?
and onplayerkeystatechange lctrl = fire?
P.S
hiddos i think i can remember why you didnt reply to my pm :P
Re: weapon pickups in vehicles -
Hiddos - 04.09.2010
Quote:
Originally Posted by [FU]Victious
hiddos i think i can remember why you didnt reply to my pm :P
|
Yeah, I was eating.
Wut did you do wrong this time, do you need to attach weapons to the vehicles, fire those weapons OR use them as pickups?
Re: weapon pickups in vehicles -
WillyP - 04.09.2010
Quote:
Originally Posted by Hiddos
Yeah, I was eating.
Wut did you do wrong this time, do you need to attach weapons to the vehicles, fire those weapons OR use them as pickups?
|
sorry :P
and yes
attach weapons to the vehicle then fire them asif youre on foot
Re: weapon pickups in vehicles -
Hiddos - 04.09.2010
Eh, that's rather impossible, holding a weapon in-game and firing a weapon are two different things.
Here's a random explanation:
The ''weapon'' that the player is holding, is an object. It has been attached to the player (Here you'd say SetPlayerHoldingObject).
When somebody fires the weapon, that player does an animation (And the firing effect) while the script calculates the players firing angle to reach the point of impact.
Simply said: Cars can't fire :P (Though it could be possible to fire rockets with MoveObject & crap)
Re: weapon pickups in vehicles -
WillyP - 04.09.2010
like attach the weapon object to the car, then they onplayerkeystatechange will come into play so when player presses lctrl, it will fire?
Re: weapon pickups in vehicles -
Hiddos - 04.09.2010
I'm trying to say that "weapons" and "fire" have nothing to do with eachother, they're separate things. GTA SA is programmed that a player can only shoot IF he has a specific weapon hold (Object) and is on-foot. In a car, he is NOT on-foot, neither does he wields any guns (possible SMG's though, but they're still objects which don't affect the player)
Re: weapon pickups in vehicles -
WillyP - 04.09.2010
so only rockets will work?
and/or
setplayerholdingobject