Help, Shooting from a car as passenger. - 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)
+--- Thread: Help, Shooting from a car as passenger. (
/showthread.php?tid=501519)
Help, Shooting from a car as passenger. -
Kenzix - 18.03.2014
Title says it all..
How do i enable it?
Re: Help, Shooting from a car as passenger. -
Zhao - 18.03.2014
It should be possible by default, but I'm assuming you're using a script that you didn't write yourself, in which case you will have to locate where it is being prevented. It's likely that it's being prevented with the function SetPlayerArmedWeapon somewhere so try looking for that.
Re: Help, Shooting from a car as passenger. -
Zeppo - 18.03.2014
Look for
Код:
SetPlayerArmedWeapon(playerid, 0);
in your OnPlayerEnterVehicle or something like that.
Re: Help, Shooting from a car as passenger. -
MP2 - 18.03.2014
Quote:
Originally Posted by Zeppo
Look for
Код:
SetPlayerArmedWeapon(playerid, 0);
in your OnPlayerEnterVehicle or something like that.
|
OPEV is called BEFORE a player enters a vehicle, so it won't be there.
Re: Help, Shooting from a car as passenger. -
Kenzix - 18.03.2014
Okay, so i got this
Quote:
if(newstate == PLAYER_STATE_PASSENGER)
{
SetPlayerArmedWeapon(playerid,0);
}
if(newstate == PLAYER_STATE_PASSENGER)
{
if(newstate == PLAYER_STATE_PASSENGER)
{
new gun,tmp;
GetPlayerWeaponData(playerid,4,gun,tmp);
#pragma unused tmp
if(gun)SetPlayerArmedWeapon(playerid,gun);
else SetPlayerArmedWeapon(playerid,0);
}
|
What to change?
Re: Help, Shooting from a car as passenger. -
MP2 - 18.03.2014
Well first of all learn to indent your code.
Secondly, we have told you. Remove the SetPlayerArmedWeapon line.