Raised This Month: $51 Target: $400
 12% 

[Help] improve plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MonSter .RUCA
Member
Join Date: Feb 2016
Old 05-07-2016 , 15:50   [Help] improve plugin
Reply With Quote #1

He

Last edited by MonSter .RUCA; 05-08-2016 at 17:06. Reason: sa
MonSter .RUCA is offline
skz
Senior Member
Join Date: Jul 2014
Location: Portugal
Old 05-08-2016 , 17:01   Re: [Help] improve plugin
Reply With Quote #2

I think this is the worst code I ever seen in my whole life
__________________
skz is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 05-08-2016 , 17:04   Re: [Help] improve plugin
Reply With Quote #3

hahahahh lol

PHP Code:

if(get_user_weapon(Spec) == CSW_DEAGLE)
        {
            
        if ( 
g_iDGLconspiracy2[Spec] > )
        {
        if(
get_user_weapon(Spec) == CSW_DEAGLE)
        {            
        
set_pev(idpev_viewmodel2"models/WG/v_DGLconspiracy.mdl");
        }    
        }
        }    
        if(
get_user_weapon(Spec) == CSW_DEAGLE)
        {
            
        if ( 
g_iDGLhypnotic2[Spec] > )
        {
        if(
get_user_weapon(Spec) == CSW_DEAGLE)
        {            
        
set_pev(idpev_viewmodel2"models/WG/v_DGLhypnotic.mdl");
        }    
        }
        if ( 
g_iDGLcobaltdisruption2[Spec] > )
        {
        if(
get_user_weapon(Spec) == CSW_DEAGLE
You can start fixing by saving function result to a variable like :

something = get_user_weapon(Spec)

Then do if(something == CSW_DEAGLE)

Beacause it calls function over and over...

Last edited by siriusmd99; 05-08-2016 at 17:05.
siriusmd99 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 11:24.


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