Raised This Month: $ Target: $400
 0% 

different way of approaching this?Curweapon


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mrpanda
Senior Member
Join Date: Jan 2007
Location: Cali
Old 05-01-2007 , 23:45   different way of approaching this?Curweapon
Reply With Quote #1

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

__________________
premier gaming community http://www.mrpanda.net

I have come back from my slumber.
mrpanda is offline
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 05-02-2007 , 08:47   Re: different way of approaching this?Curweapon
Reply With Quote #2

Quote:
Originally Posted by mrpanda View Post
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
__________________
regalis is offline
mrpanda
Senior Member
Join Date: Jan 2007
Location: Cali
Old 05-02-2007 , 21:43   Re: different way of approaching this?Curweapon
Reply With Quote #3

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
__________________
premier gaming community http://www.mrpanda.net

I have come back from my slumber.
mrpanda 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 06:36.


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