SA-MP Forums Archive
No Drive-by Guns - 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: No Drive-by Guns (/showthread.php?tid=276103)



No Drive-by Guns - Sting. - 12.08.2011

Can someone help me on how to remove drive-by guns when you enter the driver's seat.I really don't know how to remove!


Re: No Drive-by Guns - [HiC]TheKiller - 12.08.2011

https://sampwiki.blast.hk/wiki/SetPlayerArmedWeapon on OnPlayerStateChange should do the trick.


Re: No Drive-by Guns - Lorenc_ - 12.08.2011

Quote:
Originally Posted by [HiC]TheKiller
Посмотреть сообщение
https://sampwiki.blast.hk/wiki/SetPlayerArmedWeapon on OnPlayerStateChange should do the trick.
PASSENGER OR DRIVER
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if( newstate == PLAYER_STATE_DRIVER || PLAYER_STATE_PASSENGER )
    {
        SetPlayerArmedWeapon( playerid, 0 );
    }
    return 1;
}
DRIVER
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if( newstate == PLAYER_STATE_DRIVER )
    {
        SetPlayerArmedWeapon( playerid, 0 );
    }
    return 1;
}
^ Example(s)


Re: No Drive-by Guns - Riddick94 - 12.08.2011

Some weapons or all?