AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Make a player duck (https://forums.alliedmods.net/showthread.php?t=24987)

Ramono 03-05-2006 15:13

Make a player duck
 
How to make a player duck ( not exec +duck )
I want to replace a player with another player, but if the player is ducking the new player has to duck when he spawns

VEN 03-05-2006 16:33

I believe there are only one way:
Code:
client_cmd(id, "+duck")
You can emulate that since it's clientside command.

v3x 03-05-2006 16:38

Code:
entity_set_int(id , EV_INT_button , entity_get_int(id , EV_INT_button) & IN_DUCK)
or something

VEN 03-05-2006 16:53

No, i believe that wouldn't help.
In this case it's just indicator of the duck-button state and it's not possible to change that actual state.

Des12 03-05-2006 19:55

Code:
new g_ducking[33] // . . . //make player duck and tell plugin he is ducking client_cmd(id,"+duck"); //or use engine client cmd g_ducking[id] = 1 public playerReplace(id, replacement) {     if(g_ducking[id] == 1) {        client_cmd(replacement,"+duck");        g_ducking[replacement] = 1     }     return PLUGIN_HANDLED; }

Kraugh 03-06-2006 00:36

Code:
entity_set_int(id,EV_INT_bInDuck,1); set_entity_flags(id,FL_DUCKING,1);


All times are GMT -4. The time now is 20:21.

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