Raised This Month: $ Target: $400
 0% 

Add model


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Oneshox
BANNED
Join Date: May 2010
Location: Germany
Old 06-05-2010 , 04:42   Add model
Reply With Quote #1

someone can add here in this code an custom g3sg1 model ?

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

new g_sniper
new cvar_sniperdmg
new bool:g_HasSniper[33]

#define is_valid_player(%1) (1 <= %1 <= 32)

public plugin_init()
{
	register_plugin("[ZP] L4D2 Sniper", "0.1", "Russiaboy")
	g_sniper = zp_register_extra_item("[L4D2] SNiper", 35, ZP_TEAM_HUMAN)

	cvar_sniperdmg = register_cvar("zp_l4d2_sniper_dmg", "2")

	RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
}

public zp_extra_item_selected(player, itemid)
{
	if (itemid == g_sniper)
	{
		give_item(player, "weapon_g3sg1")
		cs_set_user_bpammo(player, CSW_G3SG1, 200)
		client_print(player, print_chat, "[SS] You bought a L4D2 Sniper!")

		g_HasSniper[player] = true;
	}
}

public client_connect(id)
{
	g_HasSniper[id] = false;
}

public client_disconnect(id)
{
	g_HasSniper[id] = false;
}

public zp_user_infected_post(id)
{
	if(zp_get_user_zombie(id))
	{
		g_HasSniper[id] = false;
	}
}

public fw_TakeDamage(victim, inflictor, attacker, Float:damage)
{
    if ( is_valid_player( attacker ) && get_user_weapon(attacker) == CSW_G3SG1 && g_HasSniper[attacker] )
    {
        SetHamParamFloat(4, damage * get_pcvar_float( cvar_sniperdmg ) )
    }
}
Oneshox 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 05:18.


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