Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Arena War
      2. After Hours
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA Next

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

Sign in to follow this  
Compman

Some little help

Recommended Posts

Compman

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");

Edited by Compman

Share this post


Link to post
Share on other sites
Rugz007

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 :)

Share this post


Link to post
Share on other sites
leftas

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/topic/518961-easychange-player-skin/?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.blogspot.com/2013/06/tut-animations.html

 

Best Regards,

Paul.

Share this post


Link to post
Share on other sites
Compman

can you please give me the 2nd code?

Share this post


Link to post
Share on other sites
Noox


Ped[] peds = World.GetAllPeds();

foreach(Ped currentPed in peds)

{

if(Exists(currentPed) && Player.Character.Position.DistanceTo(currentPed) <= 5)

{

Player.Character.ApplyForceRelative(Vector3.RelativeFront * 10);

}

}

Edited by Noox

Share this post


Link to post
Share on other sites
leftas

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.

Share this post


Link to post
Share on other sites
Wiebrendh

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.

Share this post


Link to post
Share on other sites
Noox

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?

Share this post


Link to post
Share on other sites
stef538

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 ^

Share this post


Link to post
Share on other sites
Wiebrendh

 

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 ^

 

:)

Share this post


Link to post
Share on other sites
leftas

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)

Edited by leftas

Share this post


Link to post
Share on other sites
Noox

ah, it's clear now

Share this post


Link to post
Share on other sites
Jitnaught

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

Share this post


Link to post
Share on other sites
Maro Hannover

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

Edited by Maro Hannover

Share this post


Link to post
Share on other sites
Jitnaught

@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...

Edited by LetsPlayOrDy

Share this post


Link to post
Share on other sites
Rugz007

Lol so it's not proper :)

Share this post


Link to post
Share on other sites
leftas

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.com/questions/767999/random-number-generator-only-generating-one-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.

Edited by leftas

Share this post


Link to post
Share on other sites
Maro Hannover

@Leftas

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

Share this post


Link to post
Share on other sites
Wiebrendh

@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.

Edited by Wiebrendh

Share this post


Link to post
Share on other sites
leftas
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.stackexchange.com/questions/87696/is-copy-paste-programming-bad

http://programmers.stackexchange.com/questions/32840/am-i-copy-paste-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.

Edited by leftas

Share this post


Link to post
Share on other sites
Wiebrendh

http://gyazo.com/f0aeab7c40820282b91471080cdf9c6f

 

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!

Share this post


Link to post
Share on other sites
Jitnaught

@leftas

Sorry for quoting.

And I didn't think he coded it lol

Edited by LetsPlayOrDy

Share this post


Link to post
Share on other sites
AgentWD40

@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.

Edited by hardsty1e

Share this post


Link to post
Share on other sites
stef538

Maro seriously what the f*ck..

Share this post


Link to post
Share on other sites
Wiebrendh

 

@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

Share this post


Link to post
Share on other sites
Maro Hannover

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#

Share this post


Link to post
Share on other sites
leftas

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

Xbox-one-885159.png

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.

Edited by leftas

Share this post


Link to post
Share on other sites
Jitnaught

Edit: Post is useless.

Edited by LetsPlayOrDy

Share this post


Link to post
Share on other sites
Rugz007

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

Share this post


Link to post
Share on other sites
Jitnaught

You didn't take my name in (expect)

What?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.