Raised This Month: $ Target: $400
 0% 

all weapons Ham Deploy


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-19-2015 , 12:34   Re: all weapons Ham Deploy
Reply With Quote #1

@by4udilo: What exactly are you trying to do? You may not even need to use ItemDeploy.

@Rirre: Is there a reason you are enabling the forwards at plugin_init()? They are enabled upon creation at plugin_precache().

This is pointless and doesn't improve functionality/readability, IMO. Plus, you do not use HOOK_COUNT anywhere else. Why are you multiplying by 1? If you do insist on using a variable to store the number of weapons/hooks, at least use it everywhere that this value is used (in all for loops).
PHP Code:
#define HOOK_COUNT 1 * (sizeof g_szWeaponList)
new HamHook:hamhooks[HOOK_COUNT];

//Just do 
new HamHook:hamhookssizeofg_szWeaponList ) ]; 
What is the purpose of this count variable, why not use i to index hamhooks?
PHP Code:
public plugin_precache()
{
    new 
count 0;

    for( new 
isizeof g_szWeaponListi++ )
    {
        
hamhooks[count++] = RegisterHamHam_Item_Deployg_szWeaponList[i], "Ham_Item_Deploy_Post"true );
    }

__________________

Last edited by Bugsy; 12-19-2015 at 13:13.
Bugsy 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 18:00.


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