Loading...
kukupie
agartala
12 files liked
84 comments
1 video
1 upload
2 followers
9,280 downloads
  • Michael

    using GTA;
    using GTA.Native;
    using System;

    public class RevolverForEveybody : Script
    {

    private WeaponHash[] allowedWeapons = { //Peds carrying these weapons won't be given the revolver
    WeaponHash.Revolver,
    WeaponHash.Unarmed
    };


    private WeaponHash[] randomweapon =
    {
    WeaponHash.Pistol,
    WeaponHash.PistolMk2,
    WeaponHash.MachinePistol,
    WeaponHash.MiniSMG,
    WeaponHash.AssaultRifle,
    WeaponHash.AssaultrifleMk2,
    WeaponHash.CombatShotgun,
    WeaponHash.SweeperShotgun,
    WeaponHash.PumpShotgun,
    WeaponHash.GrenadeLauncher,
    WeaponHash.MilitaryRifle
    };

    public RevolverForEveybody()
    {
    Tick += OnTick;
    Interval = 1;
    }

    void giveWeapon()
    {
    foreach (var ped in World.GetAllPeds())
    {

    var weapons = ped.Weapons;
    if (ped.Weapons.Current.Hash == WeaponHash.Unarmed && ped.IsPlayer == false)
    {
    Game.Player.WantedLevel = 0;
    World.Weather = Weather.ThunderStorm;
    Random rnd = new Random();
    int index = rnd.Next(randomweapon.Length);
    //Ped is unarmed and can have a weapon
    ped.Weapons.Give(randomweapon[index], 60, true, true);
    }
    }
    }

    void OnTick(object sender, EventArgs e)
    {
    giveWeapon();
    }


    }
    Makes ped who are unarmed carry random weapon instead of everyone getting their gun replaced with revolver :)

    April 18, 2022
  • Michael

    @TheET_001 if i still recall correctly the ini is supposed to be created if it doesn’t find one. So deleting old one is the best thing that is why I didn’t include ini in the latest update
    But i have left this project long ago because i shifted towards web development career sadly :(

    October 20, 2021
  • Michael

    @trekremllit not sure why that happens but it should not have happened

    October 20, 2021
  • Michael

    @gorgonut for sure man that is good idea. Going around seeing bank robberies in progress. I can't promise you it's going to be worked on soon but you can know it's going to be done some day. Not soon but for sure :p

    June 20, 2020
  • Michael

    @Kuiduoshi I uploaded the new file it should be approved pretty soon

    June 19, 2020
  • Michael

    @Kuiduoshi for some odd reason for me no matter how much health i gave them they would take ages to die so i set health to extremely high value. i will push a small update to allow users to change the health value perhaps in the ini :)
    I am a bit busy with my universities so i dont get much free time. IF you have discord or insta talk to me directly and i will send u a quick edited version

    June 18, 2020
  • Michael

    @satthukid000 set the percentage to high. The higher the value to lesser the spawn. It's a bit counter intuitive :)
    Set it to extremely high numbers
    The max is 2147483647

    June 14, 2020
  • Michael

    @gorgonut sure give it a try but if it's still too often let me know I need to figure a better way :D the link is going to be epic

    June 09, 2020
  • Michael

    @toyota12345 hey I am loving your heist missions
    I also wanted to make my own mission stuff but I have no idea where to get started with missions in GTA 5. Can you share a part of your source code and show me how missions work? How to trigger a mission, how to make a mission based waypoint, enemy etc. Or atleast try to tell me the right native functions to look for. I tried searching for native functions with the word "mission" but only found mission flag

    June 09, 2020
  • Michael

    @miketheratguy haha :D all cool man, I will check the mod out again. I played with it back in the days when it was new, really enjoyed it. If the coder was still around I would have asked him about stuffs to make my code better

    June 09, 2020