help no minigun
#1

hello pooples i'm searching no minigun script to get a miniguns disarm a player (no ban)
Reply
#2

If you want it when he kills someone:

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(GetPlayerWeapon(killerid) == 38) ResetPlayerWeapons(killerid); // Disarm if they have a minigun
    return 1;
}
Or if you want it as soon as he gets the minigun:

pawn Код:
public OnPlayerUpdate(playerid)
{
    if(GetPlayerWeapon(playerid) == 38) ResetPlayerWeapons(playerid);
    return 1;
}
Reply
#3

pawn Код:
stock RemovePlayerWeapon(playerid, weaponid)
{
    new WeaponData[13][2];
   
    for(new i = 0; i < 13; i++) GetPlayerWeaponData(playerid, i, WeaponData[i][0], WeaponData[i][1]);

    ResetPlayerWeapons(playerid);
   
    for(new i = 0; i < 13; i++)
    {
        if(WeaponData[i][0] != 0 && WeaponData[i][0] != weaponid)
        {
            GivePlayerWeapon(playerid, WeaponData[i][0], WeaponData[i][1]);
        }
    }
    return 0;
}
You can use this stock to remove a certain weapon, so replace ResetPlayerWeapons(playerid); with RemovePlayerWeapon(playerid, 38 );

To be more helpful, I would remove player weapon when he would press the FIRE_KEY without executing this code at OnPlayerUpdate.

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_FIRE)
    {
        static weapon;
        weapon = GetPlayerWeapon(playerid);
           
        if(weapon == 38) RemovePlayerWeapon(playerid, 38)
    }
    return 1;
}
This is just an example.
Reply
#4

i'm new scripter please give me full pwn script
Reply
#5

if you want a whole script you should post this here
Reply
#6

please give me this
Код:
public OnPlayerUpdate(playerid)
{
    if(GetPlayerWeapon(playerid) == 38) ResetPlayerWeapons(playerid);
    return 1;
}
to remove only minigun not all guns please use sendclientmessage "not allowed this gun"

If you have time even to Make the weapon id's 35, 36, 37, 38, 39, 40,
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)