De ce nu se compileaza?

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
User avatar
tre3fla
Membru eXtream
Membru eXtream
Posts: 5333
Joined: 27 May 2012, 10:15
Detinator Steam: Da
CS Status: Allah Akbar !
Detinator server CS: Nu
SteamID: /id/tre3fla_xxx
Has thanked: 14 times
Been thanked: 129 times

12 Jul 2012, 19:42

sigur acele moduri sunt puse in addons/amxmodx/scripting/include ?
Verifica daca au extensia .inc...
User avatar
J3FF
Membru, skill +1
Membru, skill +1
Posts: 472
Joined: 27 Oct 2007, 19:02
Detinator Steam: Nu
CS Status: ON and Ready 2 PLAY
Detinator server CS: Nu
Location: SiBiU
Has thanked: 25 times
Been thanked: 39 times
Contact:

12 Jul 2012, 21:31

EDIT : Sorry , am fost eu chior , cred ca stiu ce are , revin cu un al 2-lea edit :D

EDIT2 :
| Afiseaza codul
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <fakemeta>
#include <fun>
#include <hamsandwich>
#include <cstrike>
#include <amxmisc>
#include <vzbb_mod>


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

new DEAGLE_V_MODEL[64] = "models/v_cservers_deagle.mdl"
new DEAGLE_P_MODEL[64] = "models/p_cservers_deagle.mdl"

/* Pcvars */
new cvar_dmgmultiplier, cvar_goldbullets,  cvar_custommodel, cvar_uclip

new bool:g_HasDeagle[33]

new g_hasZoom[ 33 ]
new bullets[ 33 ]

// Sprite
new m_spriteTexture

const Wep_deagle = ((1<<CSW_DEAGLE))

new item_id

public plugin_init()
{
	
	/* CVARS */
	cvar_dmgmultiplier = register_cvar("deagle_dmg_multiplier", "5")
	cvar_custommodel = register_cvar("deagle_custom_model", "1")
	cvar_goldbullets = register_cvar("deagle_gold_bullets", "1")
	cvar_uclip = register_cvar("deagle_unlimited_clip", "1")
	
	item_id = register_shop_item("Super Deagle",150,USE_BATTLE,TEAM_HUMANS)
	
	
	// Register The Buy Cmd
	register_concmd("amx_givedeagle", "CmdGiveDeagle", ADMIN_RCON, "<name>")
	
	// Register The Plugin
	register_plugin("VZBB Item: Super Deagle", "1.0", "GaBy")
	// Death Msg
	register_event("DeathMsg", "Death", "a")
	// Weapon Pick Up
	register_event("WeapPickup","checkModel","b","1=19")
	// Current Weapon Event
	register_event("CurWeapon","checkWeapon","be","1=1")
	// Ham TakeDamage
	RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
	register_forward( FM_CmdStart, "fw_CmdStart" )
	RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)
	
}

public client_connect(id)
{
	g_HasDeagle[id] = false
}

public client_disconnect(id)
{
	g_HasDeagle[id] = false
}

public Death()
{
	g_HasDeagle[read_data(2)] = false
}

public fwHamPlayerSpawnPost(id)
{
	g_HasDeagle[id] = false
}

public plugin_precache()
{
	precache_model(DEAGLE_V_MODEL)
	precache_model(DEAGLE_P_MODEL)
	m_spriteTexture = precache_model("sprites/dot.spr")
	precache_sound("weapons/zoom.wav")
}

public checkModel(id)
{
	if ( !g_HasDeagle[id] || !is_user_human(id) )
		return PLUGIN_HANDLED
	
	new szWeapID = read_data(2)
	
	if ( szWeapID == CSW_DEAGLE && g_HasDeagle[id] == true && get_pcvar_num(cvar_custommodel) )
	{
		set_pev(id, pev_viewmodel2, DEAGLE_V_MODEL)
		set_pev(id, pev_weaponmodel2, DEAGLE_P_MODEL)
	}
	return PLUGIN_HANDLED
}

public checkWeapon(id)
{
	if(!is_user_alive(id) || !is_user_human(id) || !g_HasDeagle[id]) return PLUGIN_HANDLED
	
	new plrClip, plrAmmo, plrWeap[32]
	new plrWeapId
	
	plrWeapId = get_user_weapon(id, plrClip , plrAmmo)
	
	if (plrWeapId == CSW_DEAGLE && g_HasDeagle[id])
	{
		checkModel(id)
	}
	else 
	{
		return PLUGIN_CONTINUE
	}
	
	if (plrClip == 0 && get_pcvar_num(cvar_uclip))
	{
		// If the user is out of ammo..
		get_weaponname(plrWeapId, plrWeap, 31)
		// Get the name of their weapon
		give_item(id, plrWeap)
		engclient_cmd(id, plrWeap) 
		engclient_cmd(id, plrWeap)
		engclient_cmd(id, plrWeap)
	}
	
	if(read_data(3))
	{
		if (get_pcvar_num(cvar_goldbullets))
		{
			new clip,ammo
			new wpnid = get_user_weapon(id,clip,ammo)
			new pteam[16]
			
			get_user_team(id, pteam, 15)
			
			if ((bullets[id] > clip) && (wpnid == CSW_DEAGLE) && g_HasDeagle[id]) 
			{
				new vec1[3], vec2[3]
				get_user_origin(id, vec1, 1) // origin; your camera point.
				get_user_origin(id, vec2, 4) // termina; where your bullet goes (4 is cs-only)
				
				
				//BEAMENTPOINTS
				message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
				write_byte (0)     //TE_BEAMENTPOINTS 0
				write_coord(vec1[0])
				write_coord(vec1[1])
				write_coord(vec1[2])
				write_coord(vec2[0])
				write_coord(vec2[1])
				write_coord(vec2[2])
				write_short( m_spriteTexture )
				write_byte(1) // framestart
				write_byte(5) // framerate
				write_byte(2) // life
				write_byte(10) // width
				write_byte(0) // noise
				write_byte( 255 )     // r, g, b
				write_byte( 215 )       // r, g, b
				write_byte( 0 )       // r, g, b
				write_byte(200) // brightness
				write_byte(150) // speed
				message_end()
			}
			
			bullets[id] = clip
		}
	}
	
	return PLUGIN_HANDLED
}



public fw_TakeDamage(victim, inflictor, attacker, Float:damage)
{
	if ( is_valid_player( attacker ) && get_user_weapon(attacker) == CSW_DEAGLE && g_HasDeagle[attacker] )
	{
		SetHamParamFloat(4, damage * get_pcvar_float( cvar_dmgmultiplier ) )
	}
}

public fw_CmdStart( id, uc_handle, seed )
{
	if( !is_user_alive( id ) ) 
		return PLUGIN_HANDLED
	
	if( ( get_uc( uc_handle, UC_Buttons ) & IN_ATTACK2 ) && !( pev( id, pev_oldbuttons ) & IN_ATTACK2 ) )
	{
		new szClip, szAmmo
		new szWeapID = get_user_weapon( id, szClip, szAmmo )
		
		if( szWeapID == CSW_DEAGLE && g_HasDeagle[id] == true && !g_hasZoom[id] == true)
		{
			g_hasZoom[id] = true
			cs_set_user_zoom( id, CS_SET_AUGSG552_ZOOM, 0 )
			emit_sound( id, CHAN_ITEM, "weapons/zoom.wav", 0.20, 2.40, 0, 100 )
		}
		
		else if ( szWeapID == CSW_DEAGLE && g_HasDeagle[id] == true && g_hasZoom[id])
		{
			g_hasZoom[ id ] = false
			cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )
			
		}
		
	}
	return PLUGIN_HANDLED
}

public shop_item_selected(id,itemid)
{
	if(itemid != item_id) return PLUGIN_HANDLED
	
	give_item(id, "weapon_deagle")
	g_HasDeagle[id] = true
	
	return PLUGIN_HANDLED
}

public CmdGiveDeagle(id,level,cid)
{
	if (!cmd_access(id,level,cid,2))
		return PLUGIN_HANDLED;
	new arg[32];
	read_argv(1,arg,31);
	
	new player = cmd_target(id,arg,7);
	if (!player || !is_user_human(player) ) 
		return PLUGIN_HANDLED;
	
	new name[32];
	get_user_name(player,name,31);
	
	give_item(player, "weapon_deagle")
	g_HasDeagle[player] = true
	
	return PLUGIN_HANDLED
}

stock drop_prim(id) 
{
	new weapons[32], num
	get_user_weapons(id, weapons, num)
	for (new i = 0; i < num; i++) {
		if (Wep_deagle & (1<<weapons)) 
		{
			static wname[32]
			get_weaponname(weapons, wname, sizeof wname - 1)
			engclient_cmd(id, "drop", wname)
		}
	}
}


Ar trebui sa mearga ;)
Unii ma mai stiu de e t n a d

Image
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 27 guests