Skocz do zawartości

  • Zaloguj korzystając z Facebooka Zaloguj korzystając z Twittera Zaloguj przez Steam Zaloguj poprzez Google      Logowanie »   
  • Rejestracja

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.

  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

problem z pluginem sh xD


  • Zamknięty Temat jest zamknięty
Brak odpowiedzi do tego tematu

#1 emblaze

    Koniec z cs/amxx

  • Użytkownik

Reputacja: 166
Profesjonalista

  • Postów:973
  • Lokalizacja:Mój steam: emblaze_95
Offline

Napisano 04.10.2008 15:42

zrobilem przez cos taki program plugin do sh xD (dalbym link ale regulamin zakazuje :/) noi mial dac innego goscia i nic xD oto sma
//sh_ernestocruz! - 

//This hero was made was using jtpizzalover's superhero generator
/* CVARS - copy and paste to shconfig.cfg

//sh_ernestocruz 
sh_ernestocruz_level 9 
sh_ernestocruz_health 500	//Default 100 (no extra health)
sh_ernestocruz_armor 500		//Default 150
sh_ernestocruz_gravity 300	//Default 1.0 = no extra gravity (0.50 is 50% normal gravity, ect.)
sh_ernestocruz_speed 1600		//Default -1 = no extra speed, this cvar is for all weapons (for faster then normal speed set to 261 or higher)
sh_ernestocruz_mac10mult 2		//Damage multiplyer for his mac10 
*/

#include <amxmodx>
#include <superheromod>
#include <fakemeta> 
new HeroName[] = "sh_ernestocruz"
new bool:HasHero[SH_MAXSLOTS+1]
new bool:HeroModelSet[SH_MAXSLOTS+1] 
new Cvarmac10DmgMult 
public plugin_init()
{
	// Plugin Info
	register_plugin("SUPERHERO sh_ernestocruz","1.0","Emblaze_95")
	
	// DO NOT EDIT THIS FILE TO CHANGE CVARS, USE THE SHCONFIG.CFG
	register_cvar("sh_ernestocruz_level", "9")
	register_cvar("sh_ernestocruz_health", "500")
	register_cvar("sh_ernestocruz_armor", "500")
	register_cvar("sh_ernestocruz_gravity", "300")
	register_cvar("sh_ernestocruz_speed", "1600")
	Cvarmac10DmgMult = register_cvar("sh_ernestocruz_mac10mult", "2") 

	// FIRE THE EVENT TO CREATE THIS SUPERHERO!
	shCreateHero(HeroName, "", "", false, "sh_ernestocruz_level")
	
	// REGISTER EVENTS THIS HERO WILL RESPOND TO! (AND SERVER COMMANDS)
	// INIT
	register_srvcmd("sh_ernestocruz_init", "sh_ernestocruz_init")
	shRegHeroInit(HeroName, "sh_ernestocruz_init")
		
	// EVENTS
	register_event("ResetHUD", "new_spawn", "b")
	register_event("DeathMsg", "sh_ernestocruz_death", "a") 
	register_event("CurWeapon", "weapon_change", "be", "1=1")
	register_event("Damage", "sh_ernestocruz_damage", "b", "2!0") 
	// Let Server know about the hero's variables
	shSetShieldRestrict(HeroName)
	shSetMaxHealth(HeroName, "sh_ernestocruz_health")
	shSetMaxArmor(HeroName, "sh_ernestocruz_armor")
	shSetMinGravity(HeroName, "sh_ernestocruz_gravity")
	shSetMaxSpeed(HeroName, "sh_ernestocruz_speed", "[0]")
}
public plugin_precache()
{ 
	precache_model("models/macdady_mac10.mdl")
	precache_model("models/player/sh_ernestocruz/sh_ernestocruz.mdl")		
} 
public sh_ernestocruz_init()
{
	// First Argument is an id
	new temp[6]
	read_argv(1, temp, 5)
	new id = str_to_num(temp)
	// 2nd Argument is 0 or 1 depending on whether the id has the hero
	read_argv(2, temp, 5)
	new hasPowers = str_to_num(temp) 
	//This hero was made was using jtpizzalover's superhero generator
	// Reset their shield restrict status
	// Shield restrict MUST be before weapons are given out
	shResetShield(id)

	switch(hasPowers)
	{
		case true:
		{
			HasHero[id] = true

			if ( is_user_alive(id) )
			{ 
				sh_ernestocruz_weapons(id)
				switch_model(id)
			}
		} 
		case false:
		{ 
			// Check is needed since this gets run on clearpowers even if user didn't have this hero
	if ( is_user_alive(id) && HasHero[id] )
			{
				// This gets run if they had the power but don't anymore
				engclient_cmd(id, "drop", "weapon_mac10") 
				sh_ernestocruz_unmorph(id) 
				shRemHealthPower(id)
				shRemArmorPower(id)
				shRemGravityPower(id)
				shRemSpeedPower(id)
			}
	HasHero[id] = false 

			}
	} 
}

public new_spawn(id)
{
	if ( shModActive() && is_user_alive(id) && HasHero[id] )
	{
		set_task(0.1, "sh_ernestocruz_weapons", id)

		sh_ernestocruz_tasks(id)
	}
}
sh_ernestocruz_tasks(id)
{
	set_task(1.0, "sh_ernestocruz_morph", id)

} 

public sh_ernestocruz_weapons(id)
{
	if ( !shModActive() || !is_user_alive(id) || !HasHero[id] )
		return

	shGiveWeapon(id, "weapon_mac10")
}
switch_model(id)
{
	if ( !shModActive() || !is_user_alive(id) || !HasHero[id] )
		return

	new clip, ammo, wpnid = get_user_weapon(id, clip, ammo)

	if ( wpnid == CSW_MAC10 )
	{
		set_pev(id, pev_viewmodel2, "models/macdady_mac10.mdl")
	}
}
public weapon_change(id)
{
	if ( !shModActive() || !HasHero[id] )
		return

	new wpnid = read_data(2)

	if ( wpnid != CSW_MAC10 )
		return

	switch_model(id)

	new clip = read_data(3)

	// Never Run Out of Ammo!
	if ( clip == 0 )
		shReloadAmmo(id)
}
public sh_ernestocruz_damage(id)
{
	if ( !shModActive() || !is_user_alive(id) )
		return

	new weapon, bodypart, attacker = get_user_attacker(id, weapon, bodypart)

	if ( attacker <= 0 || attacker > SH_MAXSLOTS )
		return

	if ( HasHero[attacker] && weapon == CSW_MAC10 && is_user_alive(id) )
	{
		new damage = read_data(2)
		new headshot = bodypart == 1 ? 1 : 0

		// do extra damage
		new extraDamage = floatround(damage * get_pcvar_float(Cvarmac10DmgMult) - damage)
		if ( extraDamage > 0 )
			shExtraDamage(id, attacker, extraDamage, "mac10", headshot)
	}
} 
public sh_ernestocruz_morph(id)
{
	if ( HeroModelSet[id] || !is_user_alive(id) || !HasHero[id] )
		return

	cs_set_user_model(id, "Hero")

	HeroModelSet[id] = true
}
sh_ernestocruz_unmorph(id)
{
	if ( HeroModelSet[id] && is_user_connected(id) )
	 {
		cs_reset_user_model(id)

		HeroModelSet[id] = false

	}
}
public sh_ernestocruz_death()
{
	new id = read_data(2)

	if ( !HasHero[id] )
	return

	sh_ernestocruz_unmorph(id)
}
public client_connect(id)
{
	HasHero[id] = false
	HeroModelSet[id] = false
}

morze kto powie w czym jest problem a ten hero dziala dobrze tylko nie daje postaci playera :/

nie chce robic 2 tematow wiec jak ustawic xP na nick ??
  • +
  • -
  • 0




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych