Raised This Month: $ Target: $400
 0% 

[Help] Ducking


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ƒa†es™
Senior Member
Join Date: May 2009
Location: Garena
Old 06-18-2009 , 14:03   [Help] Ducking
Reply With Quote #1

Is there anyway i can force a user to duck forever ?
__________________
ƒa†es™ is offline
stupok
Veteran Member
Join Date: Feb 2006
Old 06-19-2009 , 00:02   Re: [Help] Ducking
Reply With Quote #2

You can try forcing the command +duck, but the user will be able to unduck by executing -duck. So, to make him duck "forever", you would have to spam the command.
__________________
stupok is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-19-2009 , 00:53   Re: [Help] Ducking
Reply With Quote #3

Code:
#include <amxmodx> #include <amxmisc> #include <engine> public plugin_init() {     register_plugin("Always Ducking", "0.1", "Exolent"); } public client_PreThink(client) {     if( is_user_alive(client) )     {         static iFlags;         if( !((iFlags = entity_get_int(client, EV_INT_flags)) & FL_DUCKING) )         {             entity_set_int(client, EV_INT_flags, iFlags | FL_DUCKING);             entity_set_size(client, Float:{-16.0, -16.0, -18.0}, Float:{16.0, 16.0, 18.0});         }     } }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
ƒa†es™
Senior Member
Join Date: May 2009
Location: Garena
Old 06-19-2009 , 02:58   Re: [Help] Ducking
Reply With Quote #4

Quote:
Originally Posted by Exolent[jNr] View Post
Code:
#include <amxmodx></p><p>#include <amxmisc></p><p>#include <engine></p><p>&nbsp;</p><p>public plugin_init()</p><p>{</p><p> register_plugin("Always Ducking", "0.1", "Exolent");</p><p>}</p><p>&nbsp;</p><p>public client_PreThink(client)</p><p>{</p><p> if( is_user_alive(client) )</p><p> {</p><p> static iFlags;</p><p> if( !((iFlags = entity_get_int(client, EV_INT_flags)) & FL_DUCKING) )</p><p> {</p><p> entity_set_int(client, EV_INT_flags, iFlags | FL_DUCKING);</p><p> entity_set_size(client, Float:{-16.0, -16.0, -18.0}, Float:{16.0, 16.0, 18.0});</p><p> }</p><p> }</p><p>}

thanks anyway but doesn't work correctly

it forcing the user to slow walk.... not ever a duck.
__________________
ƒa†es™ is offline
ƒa†es™
Senior Member
Join Date: May 2009
Location: Garena
Old 06-19-2009 , 03:00   Re: [Help] Ducking
Reply With Quote #5

Quote:
Originally Posted by stupok View Post
You can try forcing the command +duck, but the user will be able to unduck by executing -duck. So, to make him duck "forever", you would have to spam the command.
How do i spam the command ?
__________________
ƒa†es™ is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 06-19-2009 , 03:06   Re: [Help] Ducking
Reply With Quote #6

You could try set_pev( index, pev_bInDuck, 1 ); in prethink, tho I think it'll still like kinda dance, lol.
SnoW is offline
Send a message via MSN to SnoW
Anggara_nothing
Veteran Member
Join Date: Jan 2009
Location: Indonesia
Old 06-19-2009 , 03:07   Re: [Help] Ducking
Reply With Quote #7

Quote:
Originally Posted by stupok View Post
You can try forcing the command +duck, but the user will be able to unduck by executing -duck. So, to make him duck "forever", you would have to spam the command.
Quote:
#include <amxmodx>
#include <engine>

#define PLUGIN "Helping lol people. =.="
#define VERSION "1.0"
#define AUTHOR "Anggara_nothing"


public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)

// Add your code here...
}

public client_PreThink(client)
{
if( is_user_alive(client) )
client_cmd(client, "+duck")
set_pev(client, pev_bInDuck, 1)
}

Last edited by Anggara_nothing; 06-19-2009 at 03:10.
Anggara_nothing is offline
ƒa†es™
Senior Member
Join Date: May 2009
Location: Garena
Old 06-19-2009 , 03:15   Re: [Help] Ducking
Reply With Quote #8

I have a question what does should return to value ?

PHP Code:
return PLUGIN_CONTINUE 
?

Like this :

PHP Code:
public client_PreThink(id)
{
    if (!
zp_get_user_zombie(id) || zp_get_user_nemesis(id))
   return 
PLUGIN_CONTINUE

    
if (zp_get_user_zombie_class(id) != g_zclass_hczombie)
   return 
PLUGIN_CONTINUE

    client_cmd
(id"-duck")
    
set_pev(idpev_bInDuck1)

__________________
ƒa†es™ is offline
Anggara_nothing
Veteran Member
Join Date: Jan 2009
Location: Indonesia
Old 06-19-2009 , 03:16   Re: [Help] Ducking
Reply With Quote #9

PHP Code:
public client_PreThink(id)
{
  if (!
zp_get_user_zombie(id) || zp_get_user_nemesis(id))
   return 
PLUGIN_CONTINUE
  
if (zp_get_user_zombie_class(id) != g_zclass_hczombie)
   return 
PLUGIN_CONTINUE

  client_cmd
(id"-duck")
  
set_pev(idpev_bInDuck1)
  return 
PLUGIN_CONTINUE;

Anggara_nothing is offline
Old 06-19-2009, 03:24
ƒa†es™
This message has been deleted by ƒa†es™. Reason: mistake
ƒa†es™
Senior Member
Join Date: May 2009
Location: Garena
Old 06-19-2009 , 03:36   Re: [Help] Ducking
Reply With Quote #10

Quote:
Originally Posted by SnoW View Post
You could try set_pev( index, pev_bInDuck, 1 ); in prethink, tho I think it'll still like kinda dance, lol.
It just like a player spamming duck key.

I want it just like a player holding duck key.
__________________
ƒa†es™ is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:35.


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