AlliedModders

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

lolzin123 08-01-2009 22:51

[HELP] Gravity
 
How I set gravity on the player to he can't walk... and set the gravity to normal again... how i do it? :D TNX

Alka 08-02-2009 04:34

Re: [HELP] Gravity
 
You can't do that with gravity, use set_user_maxspeed(...)

lolzin123 08-02-2009 10:26

Re: [HELP] Gravity
 
but if i do this and the player switch the weapon... His maxspeed back to normal.

Bugsy 08-02-2009 10:31

Re: [HELP] Gravity
 
Quote:

Originally Posted by lolzin123 (Post 888416)
but if i do this and the player switch the weapon... His maxspeed back to normal.

Add a hook on curweapon to set maxspeed

PHP Code:

register_event"CurWeapon" "fw_CurWeapon" "be" "1=1" );

public 
fw_CurWeaponid )
{
    static 
iWeaponiWeapon read_data);
    static 
iPrevWeapon33 ];

    if ( 
iPrevWeaponid ] != iWeapon )
        
set_user_maxspeedid 1.0 );
    
    
iPrevWeaponid ] = iWeapon;



lolzin123 08-02-2009 12:22

Re: [HELP] Gravity
 
i'm tryng to add this to a block whit freeze time determined, like 10 seconds... any idea about this?

Bugsy 08-02-2009 15:08

Re: [HELP] Gravity
 
You want the person to just be frozen for 10 seconds?

lolzin123 08-02-2009 16:28

Re: [HELP] Gravity
 
yep! but just when the person walk on the block.


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

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