AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HELP] Force grenade throw? (https://forums.alliedmods.net/showthread.php?t=294795)

CrazY. 03-07-2017 18:49

[HELP] Force grenade throw?
 
Hello, is there any command like engclient_cmd(id, "drop") or same that force a player to throw he nades?

OciXCrom 03-07-2017 19:08

Re: [HELP] Force grenade throw?
 
Probably the same way as the code you mentioned?

EFFx 03-07-2017 19:57

Re: [HELP] Force grenade throw?
 
Use Ham_Weapon_PrimaryAttack, use get_user_weapon() for check if the weapon is a grenade and use set_pev() for force the throw.

CrazY. 03-07-2017 20:14

Re: [HELP] Force grenade throw?
 
Quote:

Originally Posted by OciXCrom (Post 2501664)
Probably the same way as the code you mentioned?

I'm referring to force the player's attack grenades and don't drop them.

Quote:

Originally Posted by EFFx (Post 2501674)
Use Ham_Weapon_PrimaryAttack, use get_user_weapon() for check if the weapon is a grenade and use set_pev() for force the throw.

Where can I check a listing with the functions of the set_pev?

EDIT: Just search in google lol :D

CrazY. 03-07-2017 20:32

Re: [HELP] Force grenade throw?
 
Well, among these several pev's, I'm not sure about which one to use. Any tips?

https://raw.githubusercontent.com/al...meta_const.inc

EFFx 03-07-2017 21:04

Re: [HELP] Force grenade throw?
 
What I said about the Ham_Weapon_PrimaryAttack doesn't makes sense. But how are you trying to force? With a command?

Bugsy 03-07-2017 22:54

Re: [HELP] Force grenade throw?
 
I'm 99.9% sure this has been discussed before, try searching.

HamletEagle 03-08-2017 10:00

Re: [HELP] Force grenade throw?
 
Calling Ham_Weapon_PrimaryAttack on the grenade entity will do the job. Giving more details(about when you want to throw and how - by a command, directly) will help for sure.

I already gave you a link to a thread in which you have multiple solutions, depending on what you really want. If it's not what you need or you don't understand something, ask.

CrazY. 03-08-2017 19:29

Re: [HELP] Force grenade throw?
 
Ok, I will search more.

HamletEagle 03-09-2017 00:32

Re: [HELP] Force grenade throw?
 
Why do you ignore my post?


All times are GMT -4. The time now is 18:02.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.