Raised This Month: $ Target: $400
 0% 

Subplugin Submission [ZP] Extra : M60 Machine Gun


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Razziiel
New Member
Join Date: Feb 2010
Old 06-04-2011 , 11:52   Re: [ZP] Extra : M60 Machine Gun
Reply With Quote #4

REALLY BAD CODE

here u got it fixed

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <fun>
#include <hamsandwich>
#include <zombieplague>

// Defines

#define PLUGIN "[ZP] M60 Para Machinegun"
#define VERSION "1.0"
#define AUTHOR "Fr0zeen"

// Item ID

new cvar_damage

new g_m60[33] , g_hasm60[33]
new 
g_itemid


new const g_item_name[] = "Machine M60" // Item Name
new const g_item_cost 430 // Item Cost
new const g_item_team ZP_TEAM_HUMAN // Item Team

new const M60_M249[] = "models/zombie_plague/v_m60_adc.mdl" // Edit Section 

#define is_valid_player(%1) (1 <= %1 <= 32) // Check player

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
g_itemid zp_register_extra_item(g_item_nameg_item_costg_item_team//

    
cvar_damage register_cvar("zp_m60_damage""85"
        
    
register_event("CurWeapon""Event_CurWeapon""be""1=1");
    
RegisterHam(Ham_TakeDamage"player""Fw_PlayerDamaged"1)
}

public 
plugin_precache()
    {
    
precache_model(M60_M249// Precache M249 Model
    
}
    
public 
zp_extra_item_selected(playeritemid)
{
    if (
itemid == g_itemid)
    {
        if (!
g_hasm60[player])
        {
            
// Strip first users weapon to give Awp
            
strip_user_weapons(player)

            
// Set the Player to m60
            
g_m60[player] = true
            g_hasm60
[player] = true

            
// Give Weapon m249
            
give_item(player"weapon_m249")
            
client_print(playerprint_chat"[ZP] You have Buy m60, have fun")
            return 
PLUGIN_HANDLED;
        }
    }
    return 
PLUGIN_HANDLED;
    
}

public 
Fw_PlayerDamaged(idinflictorattackerdamagedamagebits

    if ( 
is_valid_player(attacker) && get_user_weapon(attacker) == CSW_M249 && g_hasm60[attacker] ) 
    
SetHamParamFloat(4damage *= get_pcvar_float(cvar_damage))
}

public 
Event_CurWeapon(id)
{
    if (
get_user_weapon(id) == CSW_M249 && g_hasm60[id])
    
set_pev(idpev_viewmodel2M60_M249)

"nice plugin"
"niceee"

wtf?
Razziiel 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:20.


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