[HELP]Simple Problem
#1

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

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)