Raised This Month: $ Target: $400
 0% 

all weapons Ham Deploy


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Rirre
Veteran Member
Join Date: Nov 2006
Old 12-19-2015 , 08:39   Re: all weapons Ham Deploy
Reply With Quote #1

Code:
#include <amxmodx> #include <hamsandwich> new const g_szWeaponList[][] = {     "weapon_usp",     "weapon_glock18",     "weapon_deagle",     "weapon_p228",     "weapon_elite",     "weapon_fiveseven",     "weapon_m3",     "weapon_xm1014",     "weapon_mp5navy",     "weapon_tmp",     "weapon_p90",     "weapon_mac10",     "weapon_ump45",     "weapon_famas",     "weapon_sg552",     "weapon_ak47",     "weapon_m4a1",     "weapon_aug",     "weapon_scout",     "weapon_awp",     "weapon_g3sg1",     "weapon_sg550",     "weapon_galil",     "weapon_m249",     "weapon_hegrenade",     "weapon_smokegrenade",     "weapon_flashbang",     "weapon_c4",     "weapon_shield" }; // Extra offsets #define linux_weapons_diff  4 #define mac_weapons_diff    linux_weapons_diff // not sure if mac is using the same // CBasePlayerItem #define m_pPlayer           41 #define HOOK_COUNT 1 * (sizeof g_szWeaponList) new HamHook:hamhooks[HOOK_COUNT]; public plugin_precache() {     new count = 0;     for( new i; i < sizeof g_szWeaponList; i++ )     {         hamhooks[count++] = RegisterHam( Ham_Item_Deploy, g_szWeaponList[i], "Ham_Item_Deploy_Post", true );     } } public plugin_init() {     for( new i; i < sizeof hamhooks; i++ )     {         EnableHamForward( hamhooks[i] );     } } public plugin_pause() {     for ( new i; i < sizeof hamhooks; i++ )     {         DisableHamForward( hamhooks[i] );     } } public plugin_unpause() {     for ( new i; i < sizeof hamhooks; i++ )     {         EnableHamForward( hamhooks[i] );     } } public Ham_Item_Deploy_Post( iItem ) {     new iPlayer;     iPlayer = get_pdata_cbase(iItem, m_pPlayer, linux_weapons_diff, mac_weapons_diff);     // do stuff }

Last edited by Rirre; 12-19-2015 at 08:48.
Rirre 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