Quantcast

Jump to content

» «
Photo

Some little help

42 replies to this topic
Compman
  • Compman

    You Are'nt gonna have a good day if you insult Niko Bellic

  • BUSTED!
  • Joined: 23 Jun 2014
  • None

#1

Posted 06 July 2014 - 06:06 AM Edited by Compman, 06 July 2014 - 08:52 AM.

Guys i am trying to learn modding and as i was making a mod i came across 4 things :D

 

1) how to change the player model (no idea)

2) super punch (tried many methods No use :( )

3) making the player shoot rockets but not by using rocket launcher ( :D )

4) playing animations ;) while shooting the rocket :p (trying to do the stuff)

 

as i am a begginer please tell me this things it would be a great help 

 

 

i always try 10 method (approximate) then if they fail then i come to forums 

 

 

help would be apriciated :D

 

Thanks ;)

 

EDIT: 1) Got it how do do :D 

 

player.model = new model ("model name");

  • ani-gtascripter likes this

Rugz007
  • Rugz007

    Scripters ... roll out !

  • Members
  • Joined: 19 Apr 2014
  • India

#2

Posted 06 July 2014 - 06:15 AM

What are you making actually ???

You Need to be more making mods yourself

:D I did the same mistake for asking scripts

Do request a less amount of scripts this my advice which I didn't followed it first :)

And dude for just doing a thing be a excited guy :)
  • ani-gtascripter likes this

leftas
  • leftas

    C++ for hacks/mods, C# for everything else.

  • Members
  • Joined: 13 Jun 2013
  • Lithuania

#3

Posted 06 July 2014 - 08:46 AM

This is not code request forum.

1)If you would use the search you would find that there was a request llike your http://gtaforums.com...n/?p=1061544982

2) foreach all peds and check they distance to you, if it like 5 then apply force(Check from where player is hitting) also it work with vehicle.

3)@JulioNIB created a tutorial about it, but in vehicle. 1.You would need to create rocket object 2.Record Collisions 3.Start ptfx 4.applyforce 5.In tick you need to check if it colided with anything then stop ptfx and addexplosion

4)I never played animations, but I think http://gtaxscripting...animations.html

 

Best Regards,

Paul.


Compman
  • Compman

    You Are'nt gonna have a good day if you insult Niko Bellic

  • BUSTED!
  • Joined: 23 Jun 2014
  • None

#4

Posted 06 July 2014 - 08:50 AM

can you please give me the 2nd code? 


Noox
  • Noox

    changeScriptAbility(&myScriptAbility, "improve");

  • Members
  • Joined: 20 Jun 2014
  • None

#5

Posted 06 July 2014 - 08:59 AM Edited by Noox, 06 July 2014 - 08:59 AM.

Ped[] peds = World.GetAllPeds();
foreach(Ped currentPed in peds)
{
    if(Exists(currentPed) && Player.Character.Position.DistanceTo(currentPed) <= 5)
    {
        Player.Character.ApplyForceRelative(Vector3.RelativeFront * 10);
    }
}

leftas
  • leftas

    C++ for hacks/mods, C# for everything else.

  • Members
  • Joined: 13 Jun 2013
  • Lithuania

#6

Posted 06 July 2014 - 09:17 AM

Noox, this would ApplyForce always(How much is in world peds) to Player.Character(maybe you made it like anti-copy-paste) :D Also you would need to check from where is player hitting...

Compman,

THIS IS NOT REQUEST TOPIC...

 

Best Regards,

Paul.


Wiebrendh
  • Wiebrendh

    C# Programmer

  • Members
  • Joined: 22 Mar 2014
  • Netherlands

#7

Posted 06 July 2014 - 09:20 AM

Every indian person here types like this:

 

Hi

 

I am wiebren

 

I type every sentence on a with a white line between each other

 

And somethimes i end the sentence with 100 dots.................................

 

Please guys, just type normal, like leftas, noox, lordofthebongs and the others.

  • stef538 and leftas like this

Noox
  • Noox

    changeScriptAbility(&myScriptAbility, "improve");

  • Members
  • Joined: 20 Jun 2014
  • None

#8

Posted 06 July 2014 - 09:40 AM

Noox, this would ApplyForce always(How much is in world peds) to Player.Character(maybe you made it like anti-copy-paste) :D Also you would need to check from where is player hitting...

Compman,

THIS IS NOT REQUEST TOPIC...

 

Best Regards,

Paul.

lol I didn't think of that, what if he checks if lmb is pressed?

  • leftas likes this

stef538
  • stef538

    It's just me, going 88 MPH.

  • Members
  • Joined: 06 Oct 2012
  • Netherlands

#9

Posted 06 July 2014 - 10:46 AM

Every indian person here types like this:

 

Hi

 

I am wiebren

 

I type every sentence on a with a white line between each other

 

And somethimes i end the sentence with 100 dots.................................

 

Please guys, just type normal, like leftas, noox, lordofthebongs and the others.

 

this ^


Wiebrendh
  • Wiebrendh

    C# Programmer

  • Members
  • Joined: 22 Mar 2014
  • Netherlands

#10

Posted 06 July 2014 - 12:35 PM

 

Noox, this would ApplyForce always(How much is in world peds) to Player.Character(maybe you made it like anti-copy-paste) :D Also you would need to check from where is player hitting...

Compman,

THIS IS NOT REQUEST TOPIC...

 

Best Regards,

Paul.

lol I didn't think of that, what if he checks if lmb is pressed?

 

 

That will fix it

 

 

Every indian person here types like this:

 

Hi

 

I am wiebren

 

I type every sentence on a with a white line between each other

 

And somethimes i end the sentence with 100 dots.................................

 

Please guys, just type normal, like leftas, noox, lordofthebongs and the others.

 

this ^

 

:)


leftas
  • leftas

    C++ for hacks/mods, C# for everything else.

  • Members
  • Joined: 13 Jun 2013
  • Lithuania

#11

Posted 06 July 2014 - 06:22 PM Edited by leftas, 06 July 2014 - 06:40 PM.

I think that you didn't get me and I didn't get you.

So I am talking about this

last minutes of video, I show mod I am doing right now. But I don't know should I release it ? It's like troll your friend(I am going to make settings so everyone can change it and send this mod to friends, it should look like normal mod)


Noox
  • Noox

    changeScriptAbility(&myScriptAbility, "improve");

  • Members
  • Joined: 20 Jun 2014
  • None

#12

Posted 06 July 2014 - 06:34 PM

ah, it's clear now


LetsPlayOrDy
  • LetsPlayOrDy

    Too fast for ya

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

#13

Posted 06 July 2014 - 11:25 PM

I think that you didn't get me and I didn't get you.

So I am talking about this

last minutes of video, I show mod I am doing right now. But I don't know should I release it ? It's like troll your friend(I am going to make settings so everyone can change it and send this mod to friends, it should look like normal mod)

 

What does your mod do? Is it like a client and server thing where they get the server, you get the client, then you send commands to the server which does something (like flings them into the air for example)? If so, I SERIOUSLY JUST HAD THAT IDEA TOO! If not, then back to the question :D

  • leftas likes this

Maro Hannover
  • Maro Hannover

    Scriptboy

  • BUSTED!
  • Joined: 06 Jan 2014
  • None

#14

Posted 07 July 2014 - 01:21 AM Edited by Maro Hannover, 07 July 2014 - 01:27 AM.

Super Punch?

Here is a code! please hit a like this :)

using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;

using System.Windows.Forms;
using System.Drawing;
using GTA;

public class Marosuperpunch : Script
{

	AnimationSet asMeleeAnimation = new AnimationSet("melee_player_unarmed");
	Ped[] pedClosestPeds;
	Vector3 vecKickForce;
	Random rndDamage = new Random();
	bool bPedKicked = false;
	bool bObjKicked = false;
	float sObjKickMultiplier = 20;

	Random rndAnim = new Random();
	private void SuperPunch_Tick(object sender, System.EventArgs e)
	{
		if (isKeyPressed(Keys.G)) {
			pedClosestPeds = GTA.World.GetPeds(Player.Character.Position, 1.8);
			foreach (Ped P in pedClosestPeds) {
				if (P.isInVehicle() == false) {
					if (Player.Character.isInVehicle() == false) {
						if (P.GetControllingPlayer != Player) {
							if (Player.Character.isInAir == false) {
								if (P.Position.DistanceTo(Player.Character.Position) < 1.8) {
									RequestAnimations();
									Player.Character.Task.ClearAll();
									if (rndAnim.Next(0, 2) >= 1) {
										GTA.Native.Function.Call("TASK_PLAY_ANIM", Player.Character, "uppercut_l", "melee_player_unarmed", 8.0, 0, 1, 1, 0, -2);
									} else {
										GTA.Native.Function.Call("TASK_PLAY_ANIM", Player.Character, "uppercut_r", "melee_player_unarmed", 8.0, 0, 1, 1, 0, -2);
									}
									vecKickForce.X = Player.Character.Direction.X * 8.0;
									//8
									vecKickForce.Y = Player.Character.Direction.Y * 8.0;
									//8
									vecKickForce.Z = Player.Character.Direction.Z + 4.0;
									Wait(500);
									Native.Function.Call("PLAY_SOUND_FROM_PED", -1, "MELEE_COMBAT_PED_RESPONSE_UPPERCUT_RANDOM", Player.Character);
									P.isRagdoll = true;
									P.ApplyForce(vecKickForce);
									P.Enemy = true;
									P.Health -= rndDamage.Next(35, 80);
									TaskSequence tskAttackPlayer = new TaskSequence();
									if (P.isAliveAndWell == true) {
										if (P.Gender == Gender.Male) {
											if (new Random().Next(0, 20) >= 10) {
												P.Task.ClearAll();
												tskAttackPlayer.AddTask.FightAgainst(Player);
												P.Task.PerformSequence(tskAttackPlayer);
											} else {
												P.Task.ClearAll();
												tskAttackPlayer.AddTask.FleeFromChar(Player);
												P.Task.PerformSequence(tskAttackPlayer);
											}
										} else if (P.Gender == Gender.Female) {
											if (new Random().Next(0, 20) >= 15) {
												P.Task.ClearAll();
												tskAttackPlayer.AddTask.FightAgainst(Player);
												P.Task.PerformSequence(tskAttackPlayer);
											} else {
												P.Task.ClearAll();
												tskAttackPlayer.AddTask.FleeFromChar(Player);
												P.Task.PerformSequence(tskAttackPlayer);
											}
										}
									}
									bPedKicked = true;
									break; // TODO: might not be correct. Was : Exit For
								}
							}
						}
					}
				}
			}
			if (bPedKicked == false) {
				foreach (GTA.Object Obj in GTA.World.GetAllObjects()) {
					if (Obj.Position.DistanceTo(Player.Character.Position) < 1.8) {
						if (Obj.Exists == true) {
							if (Player.Character.isInVehicle() == false) {
								if (Obj.Model != Player.Character.Model) {
									if (Obj.Model != Model.GetWeaponModel(Player.Character.Weapons.Current)) {
										if (Player.Character.isInAir == false) {
											GTA.Native.Pointer ObjMass = new GTA.Native.Pointer(typeof(float));
											GTA.Native.Function.Call("GET_OBJECT_MASS", Obj, ObjMass);
											//8
											if (ObjMass <= 80 * sObjKickMultiplier) {
												RequestAnimations();
												Player.Character.Task.ClearAll();
												if (rndAnim.Next(0, 2) >= 1) {
													GTA.Native.Function.Call("TASK_PLAY_ANIM", Player.Character, "uppercut_l", "melee_player_unarmed", 8.0, 0, 1, 1, 0, -2);
												} else {
													GTA.Native.Function.Call("TASK_PLAY_ANIM", Player.Character, "uppercut_r", "melee_player_unarmed", 8.0, 0, 1, 1, 0, -2);
												}
												vecKickForce.X = Player.Character.Direction.X * 20;
												//30
												vecKickForce.Y = Player.Character.Direction.Y * 20;
												//30
												vecKickForce.Z = Player.Character.Direction.Z + 8.0;
												Wait(500);
												Native.Function.Call("PLAY_SOUND_FROM_PED", -1, "BULLET_IMPACT_CAR_RAND", Player.Character);
												if (Obj.Exists == true) {
													Obj.ApplyForce(vecKickForce);
													bObjKicked = true;
													break; // TODO: might not be correct. Was : Exit For
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
			if (bObjKicked == false) {
				foreach (Vehicle V in GTA.World.GetVehicles(Player.Character.Position, 1.8)) {
					if (V.Position.DistanceTo(Player.Character.Position) < 1.8) {
						if (V.Exists == true) {
							if (Player.Character.isInVehicle == false) {
								if (Player.Character.isInAir == false) {
									RequestAnimations();
									Player.Character.Task.ClearAll();
									if (rndAnim.Next(0, 2) >= 1) {
										GTA.Native.Function.Call("TASK_PLAY_ANIM", Player.Character, "uppercut_l", "melee_player_unarmed", 8.0, 0, 1, 1, 0, -2);
									} else {
										GTA.Native.Function.Call("TASK_PLAY_ANIM", Player.Character, "uppercut_r", "melee_player_unarmed", 8.0, 0, 1, 1, 0, -2);
									}
									vecKickForce.X = Player.Character.Direction.X * 20;
									//30
									vecKickForce.Y = Player.Character.Direction.Y * 20;
									//30
									vecKickForce.Z = Player.Character.Direction.Z + 8.0;
									Wait(500);
									Native.Function.Call("PLAY_SOUND_FROM_PED", -1, "BULLET_IMPACT_CAR_RAND", Player.Character);
									if (V.Exists == true) {
										V.ApplyForce(vecKickForce);
										break; // TODO: might not be correct. Was : Exit For
									}
								}
							}
						}
					}
				}
			}
		}

		bPedKicked = false;
		bObjKicked = false;
	}

	private void RequestAnimations()
	{
		GTA.Native.Function.Call("REQUEST_ANIMS", "melee_player_unarmed");
		GTA.Native.Function.Call("REQUEST_ANIMS", "melee_unarmed_base");
	}
	public SuperPunch()
	{
		Tick += SuperPunch_Tick;
	}
}

don't forget to :^: LOL :D

 

Edit: Change the player model using this

CHANGE_PLAYER_MODEL

 

Edit2:

Please guys, just type normal, like leftas, noox, lordofthebongs and the other

 

HEY! you forgot to write my name! and BTW lordofthebongs died

  • ani-gtascripter likes this

LetsPlayOrDy
  • LetsPlayOrDy

    Too fast for ya

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

#15

Posted 07 July 2014 - 03:06 AM Edited by LetsPlayOrDy, 07 July 2014 - 04:30 PM.

@Maro Hannover 
When you are doing your 'foreach (Ped P  in blah)' code, you should add a 'if (P.Exists())' to your code, for safety measures.
When you are doing if's, you don't have to do 'if (this == false)', just do this 'if (!this)'. So much easier :D
And you are a sexist for adding that if gender is male or not :p
Oh and since you put all that code in a tick, it's going to keep repeating what you are doing. Start super punch, stop super punch, start super punch, stop super punch...

Rugz007
  • Rugz007

    Scripters ... roll out !

  • Members
  • Joined: 19 Apr 2014
  • India

#16

Posted 07 July 2014 - 08:56 AM

Lol so it's not proper :)

leftas
  • leftas

    C++ for hacks/mods, C# for everything else.

  • Members
  • Joined: 13 Jun 2013
  • Lithuania

#17

Posted 07 July 2014 - 09:33 AM Edited by leftas, 07 July 2014 - 12:19 PM.

LetsPlayOrDy,

Don't copy all the code because it makes longer to get down... Yep I am coding similar that what you got in mind. But I can't test my code, because my ports are closed so I can't play online...

Maro,

Hard to beliave that you codeed this code... Don't know if it's your or not... But good job, but still you made mistakes like @LetsPlayOrDy wrote... and problem with random if you using in tick http://stackoverflow...e-random-number I didn't test your code, but if I would do I think I would found more problems... 2-3 weeks ago you wrote like @Rugz007 or @Compman, and last f*cking time I say, LordOfBongs IS NOT DEAD...

 

Best Regards,

Paul.


Maro Hannover
  • Maro Hannover

    Scriptboy

  • BUSTED!
  • Joined: 06 Jan 2014
  • None

#18

Posted 07 July 2014 - 11:56 AM

@Leftas

I did not make this code! i have just converted it or made a parody of it for c#


Wiebrendh
  • Wiebrendh

    C# Programmer

  • Members
  • Joined: 22 Mar 2014
  • Netherlands

#19

Posted 07 July 2014 - 12:52 PM Edited by Wiebrendh, 07 July 2014 - 12:52 PM.

@Leftas

I did not make this code! i have just converted it or made a parody of it for c#

 

Never copy anyone's code without direct permission. And what do you mean with a parody? And no i did not forget your name in that list.


leftas
  • leftas

    C++ for hacks/mods, C# for everything else.

  • Members
  • Joined: 13 Jun 2013
  • Lithuania

#20

Posted 07 July 2014 - 01:14 PM Edited by leftas, 07 July 2014 - 01:42 PM.

public class Marosuperpunch : Script

I didn't expected that you would copy paste code and then name as yours ?

shame-on-you.jpeg

Cargo-Cult programming is not good

http://programmers.s...programming-bad

http://programmers.s...aste-programmer

 

EDIT: ALSO WTF IS THIS ALL sh*t ?

http://gtaforums.com/topic/721464-official-modification-forum-rules-procedure

http://gtaforums.com/topic/720877-gta-forums-funeral/

Best Regards,

Paul.


Wiebrendh
  • Wiebrendh

    C# Programmer

  • Members
  • Joined: 22 Mar 2014
  • Netherlands

#21

Posted 07 July 2014 - 02:55 PM

http://gyazo.com/f0a...91471080cdf9c6f

 

Maro, by copy and pasting the forum rules, you will never ever impress an admin, the only thing you will do is annoy them. Please stop with all that stupid sh*t you are doing, it is so annoying!


LetsPlayOrDy
  • LetsPlayOrDy

    Too fast for ya

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

#22

Posted 07 July 2014 - 03:25 PM Edited by LetsPlayOrDy, 07 July 2014 - 03:29 PM.

@leftas
Sorry for quoting.
And I didn't think he coded it lol

hardsty1e
  • hardsty1e

    RIP Yeardley Diamond

  • Members
  • Joined: 02 May 2009
  • Philippines

#23

Posted 07 July 2014 - 04:19 PM Edited by hardsty1e, 07 July 2014 - 04:20 PM.

@Leftas

I did not make this code! i have just converted it or made a parody of it for c#

then why would you put your name on it?

 

f0aeab7c40820282b91471080cdf9c6f.png

No No i must not be banned i am trying to impress moderators

lmao, too funny.

  • Wiebrendh likes this

stef538
  • stef538

    It's just me, going 88 MPH.

  • Members
  • Joined: 06 Oct 2012
  • Netherlands

#24

Posted 07 July 2014 - 05:42 PM

Maro seriously what the f*ck..


Wiebrendh
  • Wiebrendh

    C# Programmer

  • Members
  • Joined: 22 Mar 2014
  • Netherlands

#25

Posted 07 July 2014 - 06:31 PM

 

@Leftas

I did not make this code! i have just converted it or made a parody of it for c#

then why would you put your name on it?

 

f0aeab7c40820282b91471080cdf9c6f.png

No No i must not be banned i am trying to impress moderators

lmao, too funny.

 

 

Hahahaha


Maro Hannover
  • Maro Hannover

    Scriptboy

  • BUSTED!
  • Joined: 06 Jan 2014
  • None

#26

Posted 07 July 2014 - 07:45 PM

PLease why everybody hates me ( except wiebrendh he wish me to be good) i was just trying to help that poor guy. i did not paste the code directly. the code was on vb and i converted it to c#


leftas
  • leftas

    C++ for hacks/mods, C# for everything else.

  • Members
  • Joined: 13 Jun 2013
  • Lithuania

#27

Posted 07 July 2014 - 08:09 PM Edited by leftas, 08 July 2014 - 08:32 AM.

Maro,
I am sorry, I was too rude and I am not hating you :)
The problem is that you a little bit anoying and you don't listen what other say/recommends you :)
In modding and hacking and programming, you always learning something new(Even I don't know much about everything(thanks Visual Studio)) and it's good if you take C# lessons :) And please don't copy-paste and name as yours(You can copy-paste, but give copyrights)
I think when you will be a little older, and when you will look at your previous posts(when you like now), you will do facepalm and you will be like

Spoiler
I am like this when I see my previous post( when I was younger) :D
And when I was younger I was playing Nintendo GameBoy color and most of time I spent with friends :)
 
Best Regards,
Paul.


LetsPlayOrDy
  • LetsPlayOrDy

    Too fast for ya

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

#28

Posted 07 July 2014 - 08:47 PM Edited by LetsPlayOrDy, 2 weeks ago.

Edit: Post is useless.

Rugz007
  • Rugz007

    Scripters ... roll out !

  • Members
  • Joined: 19 Apr 2014
  • India

#29

Posted 08 July 2014 - 01:54 AM

Lol same here I am annoying
But we need to learn things :D
You didn't take my name in (expect)
Do I hate you?
I also don't do copy paste :)
I did got my lesson long back :p

LetsPlayOrDy
  • LetsPlayOrDy

    Too fast for ya

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

#30

Posted 08 July 2014 - 02:00 AM

You didn't take my name in (expect)

What?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users