Quantcast

Jump to content

» «
Photo

Disable ability to shoot weapons

11 replies to this topic
LetsPlayOrDy
  • LetsPlayOrDy

    Too fast for ya

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

#1

Posted 20 August 2014 - 03:25 AM Edited by LetsPlayOrDy, 20 August 2014 - 04:38 PM.

Is there any native for disabling the ability to shoot weapons (including melee), and disabling being able to aim? Without either removing them, setting the weapon to unarmed, or setting the player control to false?
P.S. If there has already been a topic for this subject, then I'm sorry, I didn't see it.
 
Thanks


InfamousSabre
  • InfamousSabre

    Harpocrates

  • Members
  • Joined: 03 Jan 2013

#2

Posted 20 August 2014 - 03:35 AM

Not a native, but I may have a solution.
What are you trying to accomplish, exactly?


stef538
  • stef538

    It's just me, going 88 MPH.

  • Members
  • Joined: 06 Oct 2012
  • Netherlands

#3

Posted 20 August 2014 - 08:30 AM

I would like to know this one to :p


LetsPlayOrDy
  • LetsPlayOrDy

    Too fast for ya

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

#4

Posted 20 August 2014 - 11:13 AM

Not a native, but I may have a solution.
What are you trying to accomplish, exactly?

Sorry for late reply, I went to bed right after I posted this.

Basically, I just want to block weapons being able to be fired. For example, if you set the player control to false, you will see that you can't control the camera, the player's movement, and being able to use your weapons. The only one of those that I want, is the weapon part.


byteMe420
  • byteMe420

    Fvck Everything

  • Members
  • Joined: 02 Jul 2014
  • United-States

#5

Posted 20 August 2014 - 02:48 PM Edited by byteMe420, 20 August 2014 - 02:50 PM.

set the player's weapon to unarmed or melee or whatever and then block weapon switching... 

 

Game.LocalPlayer.Character.BlockWeaponSwitching = true;

 

maybe it only works for AI peds but worth a try


LetsPlayOrDy
  • LetsPlayOrDy

    Too fast for ya

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

#6

Posted 20 August 2014 - 02:52 PM

That's exactly what I don't want to do. If you did that, and you press the left mouse button, the player would still punch. I am wanting to know if there is a way to disable punching, melee, firing weapon, etc.

InfamousSabre
  • InfamousSabre

    Harpocrates

  • Members
  • Joined: 03 Jan 2013

#7

Posted 20 August 2014 - 04:35 PM

Do you want the player to still be able to aim?


LetsPlayOrDy
  • LetsPlayOrDy

    Too fast for ya

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

#8

Posted 20 August 2014 - 04:36 PM

Do you want the player to still be able to aim?

No.


InfamousSabre
  • InfamousSabre

    Harpocrates

  • Members
  • Joined: 03 Jan 2013

#9

Posted 20 August 2014 - 06:04 PM

 

Do you want the player to still be able to aim?

No.

 

but you do want the weapon to be visible in the player's hand?


LetsPlayOrDy
  • LetsPlayOrDy

    Too fast for ya

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

#10

Posted 20 August 2014 - 06:06 PM

but you do want the weapon to be visible in the player's hand?

 Yeah. Just don't want to be able to aim/fire/melee.


byteMe420
  • byteMe420

    Fvck Everything

  • Members
  • Joined: 02 Jul 2014
  • United-States

#11

Posted 20 August 2014 - 07:22 PM Edited by byteMe420, 20 August 2014 - 07:24 PM.

well u did say shoot... as far as disabling "events" or whatever the game does when u press a key i don't think is doable with the scripthooks


LetsPlayOrDy
  • LetsPlayOrDy

    Too fast for ya

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

#12

Posted 20 August 2014 - 07:24 PM

well u did say shoot

Well... I've changed the question now :p





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users