Raised This Month: $ Target: $400
 0% 

Subplugin Submission [ZP] Extra Item : Force Field Grenade [v2.3] [Update 08-14-12]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 12-07-2009 , 14:31   Re: [ZP] Extra Item : Force Field Grenade
Reply With Quote #10

- You don't need to strip grenade when giving new 1.
Code:
            if(user_has_weapon(player, CSW_SMOKEGRENADE))             {                 fm_strip_user_gun(player, 9)             }             fm_give_item(player,"weapon_smokegrenade")
->
Code:
give_item( player, "weapon_smokegrenade" );

Code:
    for (new id1; id1 <= maxplayers; id1++)         g_bomb[id1] = false
->
Code:
arrayset( g_bomb, false, 33 );

- get_user_msgid("SayText") - Store as global variable.
- You dont need to check if is_user_connected in Color( ), get_players( ) does that for you already.
- fm_give_item -> give_item

- Better way to change weapon model, your current sucks.

Code:
const m_pPlayer = 41; RegisterHam( Ham_Item_Deploy, "weapon_smokegrenade", "FwdHamSmokeDeploy", 1 ); public FwdHamSmokeDeploy( const iEntity ) {     if( pev_valid( iEntity ) != 2 )         return HAM_IGNORED;         new id = get_pdata_cbase( iEntity, m_pPlayer, 4 );         if( g_bomb[ id ] && !zp_get_user_zombie( id ) )         set_pev( id, pev_viewmodel2, model_grenade );         return HAM_IGNORED; }
__________________

Last edited by xPaw; 12-07-2009 at 14:38.
xPaw is offline
 



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


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