Help, Shooting from a car as passenger.
#1

Title says it all..

How do i enable it?
Reply
#2

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.
Reply
#3

Look for
Код:
SetPlayerArmedWeapon(playerid, 0);
in your OnPlayerEnterVehicle or something like that.
Reply
#4

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.
Reply
#5

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?
Reply
#6

Well first of all learn to indent your code.

Secondly, we have told you. Remove the SetPlayerArmedWeapon line.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)