Quantcast

Jump to content

» «
Photo

Modding questions [Scripthook.net]

No replies to this topic
soxxysox
  • soxxysox

    Player Hater

  • New Members
  • Joined: 27 Apr 2017
  • United-Kingdom

#1

Posted 27 April 2017 - 12:42 PM Edited by soxxysox, 27 April 2017 - 06:11 PM.

I'm new and have a couple of questions about modding with Scripthook.net and that.

 

 

for some reason, none of this things work anyone knows why?

 public void SpawnZombies()
        {
            int zombieSpawns = 2;

            for (int i = 0; i < zombieSpawns; i++)
            {
                Ped zombie = World.CreatePed(PedHash.Bodybuild01AFM, Game.Player.Character.Position.Around(10f));
                //zombie.Task.GoTo(Game.Player.Character.Position - new Vector3(5, 5, 5), false, 10000);
                //zombie.Task.FollowToOffsetFromEntity(Game.Player.Character, new Vector3(0, 0, 0), 10000, 2);

                try
                {
                     Function.Call(Hash.APPLY_PED_BLOOD, zombie, 3, rnd.Next(0, 4) + 0.0, rnd.Next(-0, 4) + 0.0, rnd.Next(-0, 4) + 0.0, "wound_sheet");

                       Function.Call(Hash.SET_PED_IS_DRUNK, zombie, true);
                       Function.Call(Hash.REQUEST_ANIM_SET, "[email protected]<script data-cfhash='f9e31' type="text/javascript">/* */</script>@verydrunk");
                       if (!Function.Call<bool>(Hash.HAS_ANIM_SET_LOADED, "[email protected]@verydrunk"))
                       {
                           Function.Call(Hash.REQUEST_ANIM_SET, "[email protected]@verydrunk");
                       }
                       Function.Call(Hash.RESET_PED_MOVEMENT_CLIPSET, zombie, "[email protected]@verydrunk", 1.0);

                      // zombie.Task.FollowToOffsetFromEntity(Game.Player.Character, new Vector3(0, 0, 0), 10000, 2);
                      
                    
                }
                catch (Exception er)
                {
                    UI.Notify(er.Message);
                }
            }
        }

Also making a weapon spawn on the ground? I've tried this but not sure about the pickup type field?:

World.CreatePickup(weapon ,Pickup,Game.Player.Character.Position, WeaponHash.AdvancedRifle, 600);

And I got this working but there is a problem only like 4 or 5 peds attack the other just stand still and stare? any way to get them all to attack the player?

 

                    Vector3 spawnpos1 = Game.Player.Character.GetOffsetInWorldCoords(new Vector3(0, 5, 0));
                    Ped Zambie = World.CreatePed(PedHash.Zombie01, spawnpos1);
                    UI.Notify("Spawned zombie");
                    Zambie.Task.FightAgainst(Game.Player.Character, 1000000);
                    //Function.Call(Hash.SET_PED_FLEE_ATTRIBUTES, Zambie,0,0);

I've been looking for tutorials can't find much stuff that shows about this and I'd also like to implement custom sounds?

Thanks for reading sorry if this is really basic but I can't find any tutorials/documentation maybe you could link me if there are some good ones?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users