Quantcast

Jump to content

» «
Photo

Simplest Zombie Script

38 replies to this topic
Wiebrendh
  • Wiebrendh

    C# Programmer

  • Members
  • Joined: 22 Mar 2014
  • Netherlands

#31

Posted 20 June 2014 - 02:40 PM

 

 

 

@Maro Hannover - The Game is not about stealing its about your passsion

@leftas - plz name some of your mods

@lordofbongs - Thankz for suport and zombie script and 1 question

 

is modding your birth right or you work at rock* games or good gifted you with modding ability:D 

 

and whats your name on gta 4 mods? 

It's not about how much mods you do, it's how you know programming language(es).

My mods are private, I don't like release it for public. And I always don't have ideas what to make.

And about languages.

So from my list first would be C#, because it's easy to do gui and other things.

Then would go c++, cause for hooks and hacking things.

Last would be assembly, it's hard lang. but it worth it. Because it's easier to debug, hooks(for mods/hacks), see why it's crashed. Also you can see you how computer programs works :)

So yea. That's all,

I was away from GTA modding, now I back. And I am playing with GTA scripthook.net... And also my mods are:Switch charchter by aiming at him(I saw this mod in GTA4Mods, but now it's gone), Random force to random car(Just for fun), other I don't remember, because I am not at home right now.

P.S. Yeah, all my posts are long...

 

Regards,

Paul.

 

 

Paul, why dont you release your mods? You look like a pro modder/programmer! 

 

I think this is *sarcasm* :D

First of all, I always don't have ideas... My little brother who's playing gta iv(Oh yea I know that he can't play it) suggest me ideas, his last idea was change char. to ped at which you are aiming(First I searched in gta4mods but I didn't found it).

Second, I like to help people in every forum(In day I am visting 10+ forums).

Third, I think my mods would be sh*tty... My coding style is sh*tty(You should see my hack for bf4) :DDD

Fourth, I am still tryin' to do cheats for games. But I don't know do I need to come back to gta4 mods or look for a game for hack...

Fifth, I am not a pro :/ And your mods would be more more more better than mine.. :)

 

Regards,

Paul.

 

 

Wow, it was no sarcasm.. I really thought you were a pro or something haha. Probably through the way you say things.

  • leftas likes this

Noox
  • Noox

    changeScriptAbility(&myScriptAbility, "improve");

  • Members
  • Joined: 20 Jun 2014
  • None

#32

Posted 20 June 2014 - 03:19 PM Edited by Noox, 20 June 2014 - 03:19 PM.

Even though I dislike hackers (the guys who use the hacks, not who makes them, I consider who makes them smart because of the skill required) I found out that doing things such as a trainer is good for practice, I've done them myself for other SP games and my programming skills became eventually better :)

It's also good because you understand how the data is stored inside the computer but Rugz007 don't do these things, before you do you have to learn all the basic stuff.

  • leftas likes this

InfamousSabre
  • InfamousSabre

    Harpocrates

  • Members
  • Joined: 03 Jan 2013

#33

Posted 20 June 2014 - 05:05 PM

So many great posts in this thread for newbie scripters. Should really be archived into some sort of "New to Coding?" thread.

I've been writing games in Game Maker since 2002. GM uses a language called GML which is essentially a dumbed-down version of C#. About a year or so ago, I was looking for a way to break away from GM and GML.

Having just quit one of the best jobs I ever had, I suddenly had a lot of free time. I played GTA IV quite a bit, but just like anything else I own, I knew MUST modify it and make it truly mine.

 

I started on google, searching for gta iv modding. I found gtaforums, gta4-mods, and gtagarage. I dove deep into gtaforums, finding code snippets posted by users that i studied to better understand how scripting worked.
Certain scripters release scripts in .cs files also, and I would tinker with those to figure out how they worked.

I also came across an IRC channel specifically for .net scripting for GTA IV.
I had been on IRC once before, but all the channels I had been to seemed dead. I figured I'd give this one a shot anyway, and I'm glad I did.
Most of what I've learned has come from disassembling other scripts and figuring things out on my own, but when I've had something I just could not figure out, people in the #gtaivnetscripthook IRC channel are usually able to help.

As soon as I felt I had a good enough handle on the language, I started getting script ideas. Convert your human-logic into computer-logic using the tools and methods at your disposal. Thats all it really takes. The ability to learn and adapt. Always keep learning. If something goes wrong, figure it out. Look to yourself before consulting others.

There are many resources for learning .net scripting for GTA IV. All you need to do is search.

  • leftas and LordOfTheBongs like this

Rugz007
  • Rugz007

    A simple guy

  • Members
  • Joined: 19 Apr 2014
  • India

#34

Posted 21 June 2014 - 02:39 PM

 

im glad to hear u are studying maro ;)

 

people dont mind helping u if they see u make an effort to help yourself ;)


See its a in game nature it's very hard to change a sky what do you guys think I jus t ask things...No I try them and then I ask

i think making the sky green would require editing the skydome.wdr file

 

hey it's ok to ask questions, especially since u are young... just make an effort to show people you try things by yourself before asking the question

 

show them you are not like some child lost asking where there mommy is ;)

 

you have to prove to people u have knowledge of what u are talking about or nobody is going to sit there and explain every little thing to u ;)

 

and because i feel bad for talking to u harshly since ur just a kid (being a kid is a good thing, not a bad thing, u will realize when u get older)...

 

here is how u make a zombie...

        void CreateZombie()
        {
            Vector3 position = World.GetNextPositionOnPavement(Game.LocalPlayer.Character.Position.Around(random.Next(50, 70))).ToGround();//finds a ground position to spawn ped
            Ped ped = World.CreatePed(position);//spawns a ped, saves to "ped"
 
            ped.CancelAmbientSpeech();//i guess so they dont say their normal speech
            ped.Enemy = true;//i guess this means they will attack player??
            ped.WillUseCarsInCombat = false;//i guess so they dont get in cars to attack
            ped.AlwaysDiesOnLowHealth = true;//i guess so they dont act injured like a normal ped when u dont completely kill
            ped.MaxHealth = 1000;//raises max health to 1000, ped default is 100
            ped.Health = 1000;//sets health to 1000, making them hard to kill
            ped.Money = 0;//so they dont drop money
            ped.RelationshipGroup = RelationshipGroup.Criminal;//this is an unused relationshipgroup in the game so i guess it is good to use to avoid game conflicts
            ped.Voice = "M_ZOMBIE";//now the ped will say speech from the zombie speech file
            GTA.Native.Function.Call("SET_PED_DONT_DO_EVASIVE_DIVES", ped, true);//so the ped wont dive to cover when ur shooting them
            GTA.Native.Function.Call("SET_CHAR_DIES_INSTANTLY_IN_WATER", ped, true);//they die if they go in water
            GTA.Native.Function.Call("SET_CHAR_WILL_MOVE_WHEN_INJURED", ped, true);//makes the ped move if for some reason an injury stops them
            ped.BecomeMissionCharacter();//so the game doesnt delete the ped... u will need to mark them not required for mission when u want them to get deleted
            ped.ChangeRelationship(RelationshipGroup.Player, Relationship.Hate);//this allows them to attack the player
            ped.Task.AlwaysKeepTask = true;//so they stay on task
            ped.BlockPermanentEvents = true;//to avoid conflicts from game events... not exactly sure what those events are
            ped.BlockGestures = true;//i guess so they dont play random idle animations
            ped.SetPathfinding(true, true, true);// this sets the way they move through world
            GTA.Native.Function.Call("SET_PED_GENERATES_DEAD_BODY_EVENTS", ped, true);//i have no idea what this does but it was in a zombie script i saw
            GTA.Native.Function.Call("SAY_AMBIENT_SPEECH", ped, "MOAN", 1, 1, 2);//they will just make a moan sound
 
            GTA.Native.Function.Call("SET_ANIM_GROUP_FOR_CHAR", ped, "move_injured_lower");//this ped will now walk injured... like a zombie
            GTA.Native.Function.Call("SET_CHAR_MOVE_ANIM_SPEED_MULTIPLIER", ped, 1.4f);//this speeds up their animations which makes them walk faster
            ped.Task.PlayAnimation(new AnimationSet("[email protected]"), "bum_fight", 10f, AnimationFlags.Unknown09 | AnimationFlags.Unknown10 | AnimationFlags.Unknown11 | AnimationFlags.Unknown12);//this just plays some bum animation on the upper body and it allows them to rotate... i dont know what flag 10 and 12 does but i just copied it
        }

bongs how to make all peds do same thing 


Noox
  • Noox

    changeScriptAbility(&myScriptAbility, "improve");

  • Members
  • Joined: 20 Jun 2014
  • None

#35

Posted 21 June 2014 - 02:42 PM

Not sure if it's right but this should do it I think

Ped[] totalPeds = World.GetAllPeds();

foreach(Ped actualPed in totalPeds)
{
    //do something
}

It needs some adjustements otherwise I think the AI will become glitchy.


Jitnaught
  • Jitnaught

    ✰✰✰✰✰✰

  • Members
  • Joined: 24 Aug 2013
  • United-States

#36

Posted 21 June 2014 - 02:47 PM

Not sure if it's right but this should do it I think

Ped[] totalPeds = World.GetAllPeds();

foreach(Ped actualPed in totalPeds)
{
    //do something
}

It needs some adjustements otherwise I think the AI will become glitchy.

 

Yep. Should work.


Rugz007
  • Rugz007

    A simple guy

  • Members
  • Joined: 19 Apr 2014
  • India

#37

Posted 21 June 2014 - 02:49 PM

thanks guys it works :D :) 

 

1 more question 

 

like M_ZOMBIE sound is there a Laughing sound :D 


LordOfTheBongs
  • LordOfTheBongs

    Deceased

  • Members
  • Joined: 21 Sep 2013
  • None

#38

Posted 21 June 2014 - 06:12 PM

thanks guys it works :D :)

 

1 more question 

 

like M_ZOMBIE sound is there a Laughing sound :D

download open iv or spark iv application... it lets u listen to the speech in the audio files and u can find a sound... google the application names and good luck


InfamousSabre
  • InfamousSabre

    Harpocrates

  • Members
  • Joined: 03 Jan 2013

#39

Posted 21 June 2014 - 07:17 PM

 

thanks guys it works :D :)

 

1 more question 

 

like M_ZOMBIE sound is there a Laughing sound :D

download open iv or spark iv application... it lets u listen to the speech in the audio files and u can find a sound... google the application names and good luck

 

You can also get the sound names by opening the sound archive in Andrew's Audio Editor. Why OpenIV doesn't support this yet, I have no idea. They seem to be against doing anything further with sounds at all.

  • LordOfTheBongs likes this




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users