Raised This Month: $ Target: $400
 0% 

Speed plugin works only after weaponswitch


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 04-07-2007 , 18:15   Speed plugin works only after weaponswitch
Reply With Quote #1

Fixed bugs...

In plugin_init i have registered this event
Code:
 register_event("CurWeapon","Change_Wpn","be")


Then in the funktion i forgotten to check if the changed weapon is active...
Code:
 // Called on player switches his weapon
public Change_Wpn(id)
{
    if (!get_pcvar_num(g_speed_enabled)) return PLUGIN_HANDLED
        
    new WeaponNum = read_data(2)
     new WeaponActive = read_data(1) 

    if (WeaponNum != WeaponUsed[id] && WeaponActive)
    {
        param[0] = id
        calculate_speed(WeaponNum)        
        give_speed()
        WeaponUsed[id] = WeaponNum
    }
    return PLUGIN_HANDLED
}
__________________

Last edited by regalis; 04-09-2007 at 20:22. Reason: fixed bug
regalis is offline
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 04-09-2007 , 09:56   Re: Speed plugin works only after weaponswitch
Reply With Quote #2

Fixed all bugs...
__________________

Last edited by regalis; 04-09-2007 at 20:17. Reason: none
regalis 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 19:53.


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