SA-MP Forums Archive
[HELP]Simple Problem - 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: [HELP]Simple Problem (/showthread.php?tid=267182)



[HELP]Need HELP! - Horrible - 07.07.2011

like this
when u enter vehicle the weapon automatically change to mp5 then u can shoot at vehicle
but i dont want to delete the mp5

can someone tell me how to disable it?


Re: [HELP]Simple Problem - Shadoww5 - 07.07.2011

You can remove this weapon from the player.

PHP код:
stock RemovePlayerWeapon(playeridpweaponid)
{
    new 
plyWeapons[12];
    new 
plyAmmo[12];
    for(new 
slot 0slot != 12slot++)
    {
        new 
pweppammo;
        
GetPlayerWeaponData(playeridslotpweppammo);
        if(
pwep != pweaponid)
        {
            
GetPlayerWeaponData(playeridslotplyWeapons[slot], plyAmmo[slot]);
        }
    }
    
ResetPlayerGuns(playerid);
    for(new 
slot 0slot != 12slot++)
    {
        
GivePlayerGun(playeridplyWeapons[slot], plyAmmo[slot]);
    }

And after give it back.


Re: [HELP]Simple Problem - Horrible - 08.07.2011

Quote:
Originally Posted by Shadoww5
Посмотреть сообщение
You can remove this weapon from the player.

PHP код:
stock RemovePlayerWeapon(playeridpweaponid)
{
    new 
plyWeapons[12];
    new 
plyAmmo[12];
    for(new 
slot 0slot != 12slot++)
    {
        new 
pweppammo;
        
GetPlayerWeaponData(playeridslotpweppammo);
        if(
pwep != pweaponid)
        {
            
GetPlayerWeaponData(playeridslotplyWeapons[slot], plyAmmo[slot]);
        }
    }
    
ResetPlayerGuns(playerid);
    for(new 
slot 0slot != 12slot++)
    {
        
GivePlayerGun(playeridplyWeapons[slot], plyAmmo[slot]);
    }

And after give it back.
not works