SA-MP Forums Archive
help please - 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 please (/showthread.php?tid=485953)



help please - UrBoyJay - 06.01.2014

Код:
    public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate==PLAYER_STATE_PASSENGER)
    {
        new gun,tmp;
        GetPlayerWeaponData(playerid,4,gun,tmp);
        GetPlayerWeaponData(playerid,5,gun,tmp);
        GetPlayerWeaponData(playerid,6,gun,tmp);
        #pragma unused tmp
        if(gun)SetPlayerArmedWeapon(playerid,gun);
        else SetPlayerArmedWeapon(playerid,0);
    }
    return 1;
}
when i enter with g weps glitch i want the player to be able to shoot with macs,tec 9,mp5 , ak47 , m4 , sniper while in the passenger seat