AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   different way of approaching this?Curweapon (https://forums.alliedmods.net/showthread.php?t=54707)

mrpanda 05-01-2007 23:45

different way of approaching this?Curweapon
 
hey guys i know what this code does: it basically says on current weapon set the user speed, which is zombie to a previously set cvar

but what i do not get is how this can cause errors and is there a way around this code to make the server realize the user and set the speed according to a predefinied variable

here is the code snippet

PHP Code:

public event_cur_weapon(id) {

    if(!
is_user_alive(id) || !is_user_connected(id))
        return 
PLUGIN_CONTINUE
    
    
if(g_zombie[id]) 
    {
        
set_user_maxspeed(id,(get_pcvar_float(zomb_speed)))
    }
    return 
PLUGIN_CONTINUE



regalis 05-02-2007 08:47

Re: different way of approaching this?Curweapon
 
Quote:

Originally Posted by mrpanda (Post 472345)
but what i do not get is how this can cause errors and is there a way around this code to make the server realize the user and set the speed according to a predefinied variable

No, there is no other way, because the engine sets the userspeed according to his current weapon.
With AWP you run much slower as with a glock...
So you have to do this workaround to adjust the playerspeed everytime the player switches his weapon.

greetz regalis

PS: For further information about this stuff look at here: http://forums.alliedmods.net/showthread.php?t=53603

mrpanda 05-02-2007 21:43

Re: different way of approaching this?Curweapon
 
alright thanks, but i did manage to find a way around this =D.

since they all start out with knives i just set it to maxspeed with the prethink where the HP and AP were added at beginning of the round =D.

late

-panda


All times are GMT -4. The time now is 06:36.

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