Raised This Month: $ Target: $400
 0% 

Need help when take weapon 500 speed goes 250


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wizz
Member
Join Date: Mar 2010
Old 02-24-2013 , 15:36   Need help when take weapon 500 speed goes 250
Reply With Quote #1

hello! i have vipmenu with speed what makes speed "500"
but when i take weapon the speed goes "250"

Help please
_____________________________________________ ______________________
{
if( is_user_alive( id ) )
{
client_print(id, print_chat, "[VIP]: You get speed!")
set_user_maxspeed(id, 500.0);
}
}

Last edited by wizz; 02-25-2013 at 13:38.
wizz is offline
Kard1nal
Senior Member
Join Date: Dec 2012
Location: Russia
Old 02-25-2013 , 01:27   Re: Need help when take weapon 500 speed goes 250
Reply With Quote #2

Check sv_maxspeed

Last edited by Kard1nal; 02-25-2013 at 01:27.
Kard1nal is offline
Send a message via Skype™ to Kard1nal
wizz
Member
Join Date: Mar 2010
Old 02-25-2013 , 13:40   Re: Need help when take weapon 500 speed goes 250
Reply With Quote #3

Quote:
Originally Posted by Kard1nal View Post
Check sv_maxspeed
no,, i have problem when i take /vipmenu speed then speed goes 500 (its okay) and if i take weapon now the speed goes 250 back (NOT OKAY)
i want if i take weapon the speed not goes back 250..
wizz is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 02-25-2013 , 13:44   Re: Need help when take weapon 500 speed goes 250
Reply With Quote #4

MaxSpeed is dependent on the weapon the client is using, so you need to reset it when the client changes weapons as well.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
wizz
Member
Join Date: Mar 2010
Old 02-25-2013 , 16:58   Re: Need help when take weapon 500 speed goes 250
Reply With Quote #5

Quote:
Originally Posted by YamiKaitou View Post
MaxSpeed is dependent on the weapon the client is using, so you need to reset it when the client changes weapons as well.
and hoi i do that?
wizz is offline
CrAsH.94
Junior Member
Join Date: Feb 2013
Old 02-25-2013 , 19:41   Re: Need help when take weapon 500 speed goes 250
Reply With Quote #6

1)Create a global array

Code:
new szPlayerSpeed[33]
2)Add to plugin_init()

Code:
register_event("CurWeapon", "FixSpeed", "be", "1=1")
register_event("HLTV", "RoundStart", "a", "1=0", "2=0")
3)Added to the end

Code:
public RoundStart()
{
    new szPlayers[32]
    new szNum, szPlayer
    
    get_players(szPlayers, szNum)
    
    for (new i; i < szNum; i++)
    { 
        szPlayer = szPlayers[i]

        if(!szPlayerSpeed[szPlayer])
            continue

        szPlayerSpeed[szPlayer] = false
    }
}

public FixSpeed(id)
{
    if(is_user_alive(id) && is_user_connected(id))
    {
        if(szPlayerSpeed[id])
        {
            set_user_maxspeed(id, 500.0)
        }
    }
}
4)In issuing speed

Code:
szPlayerSpeed[id] = true
CrAsH.94 is offline
wizz
Member
Join Date: Mar 2010
Old 05-26-2013 , 16:34   Re: Need help when take weapon 500 speed goes 250
Reply With Quote #7

Quote:
Originally Posted by CrAsH.94 View Post
1)Create a global array

Code:
new szPlayerSpeed[33]
2)Add to plugin_init()

Code:
register_event("CurWeapon", "FixSpeed", "be", "1=1")
register_event("HLTV", "RoundStart", "a", "1=0", "2=0")
3)Added to the end

Code:
public RoundStart()
{
    new szPlayers[32]
    new szNum, szPlayer
    
    get_players(szPlayers, szNum)
    
    for (new i; i < szNum; i++)
    { 
        szPlayer = szPlayers[i]

        if(!szPlayerSpeed[szPlayer])
            continue

        szPlayerSpeed[szPlayer] = false
    }
}

public FixSpeed(id)
{
    if(is_user_alive(id) && is_user_connected(id))
    {
        if(szPlayerSpeed[id])
        {
            set_user_maxspeed(id, 500.0)
        }
    }
}
4)In issuing speed

Code:
szPlayerSpeed[id] = true
Thank you, its working.
wizz is offline
Reply


Thread Tools
Display Modes

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 21:38.


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