Raised This Month: $ Target: $400
 0% 

My first hero... (4 errors)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GLFZero91
Member
Join Date: Oct 2005
Location: Denmark, Frederikssund
Old 12-04-2005 , 07:31   My first hero... (4 errors)
Reply With Quote #1

Hi.. Ill making my first hero with a friend (Blaze) its a ns sg.. But wen i try to compile it to amxx for testing it i just get these errors
[img]http://img528.**************/img528/6562/errors7es.jpg[/img]

And i really wanna make this hero (Its a soldier from ns with a shotgun,.. m3 with mult 3) Can someone fix the script for me?

This is my code
Code:
//Soldier X - Ns Shotgun. Power! //Hero Made with Craze's Superhero Generator v1.0 //http://venus.whbdns.com/~craze3/shero/ /* CVARS - copy and paste to shconfig.cfg //Soldier X SoldierX_level 16 SoldierX_gravity 0.25 SoldierX_speed 700 SoldierX_health 150 SoldierX_armor 150 SoldierX_m3mult 3.0 */ #include <amxmodx> #include <engine> #include <cstrike> #include <superheromod> new gHeroName[]="Soldier X" new gHasSoldierXPower[SH_MAXSLOTS+1] //---------------------------------------------------------------------------------------------- public plugin_init() { register_plugin("SUPERHERO Soldier X","1.0","Blaze and Jason") // DO NOT EDIT THIS FILE TO CHANGE CVARS, USE THE SHCONFIG.CFG register_cvar("SoldierX_level", "16") register_cvar("SoldierX_gravity", "0.25" ) register_cvar("SoldierX_speed", "700" ) register_cvar("SoldierX_health", "150" ) register_cvar("SoldierX_armor", "150" ) register_cvar("SoldierX_m3mult","3.0") // FIRE THE EVENT TO CREATE THIS SUPERHERO shCreateHero(gHeroName, "Ns Shotgun. Power!", "Natural selection shotgun/Hp/Ap/Speed", false, "SoldierX_level" ) // REGISTER EVENTS THIS HERO WILL RESPOND TO // Init register_srvcmd("SoldierX_init", "SoldierX_init") shRegHeroInit(gHeroName, "SoldierX_init") //Checks register_event("ResetHUD", "newSpawn","b") register_event("CurWeapon", "weaponChange","be","1=1") // Power Variables shSetMinGravity(gHeroName, "SoldierX_gravity" ) shSetMaxHealth(gHeroName, "SoldierX_health" ) shSetMaxSpeed(gHeroName, "SoldierX_speed", "[0]" ) shSetMaxArmor(gHeroName, "SoldierX_armor" ) shSetM3Mult(gHeroName, "SoldierX_m3mult" ) } //---------------------------------------------------------------------------------------------- public plugin_precache() { precache_model("models/shmod/v_shotgunns") precache_model("models/shmod/p_shotgunns") precache_model("models/player/soldier/Soldier.mdl") } //---------------------------------------------------------------------------------------------- public SoldierX_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) gHasSoldierXPower[id] = (hasPowers != 0) if ( !is_user_alive(id) ) return if ( gHasSoldierXPower[id] ) { giveGun(id) switchmodel(id) } else { engclient_cmd(id,"drop","weapon_xm1014") shRemGravityPower(id) shRemSpeedPower(id) shRemHealthPower(id) shRemArmorPower(id) shRemM3multPower(id) } } //---------------------------------------------------------------------------------------------- public newSpawn(id) { if ( gHasSoldierXPower[id] && is_user_alive(id) && shModActive() ) { set_task(0.1, "giveGun", id) set_task(0.2, "changePlayer", id) new clip, ammo, wpnid = get_user_weapon(id,clip,ammo) if (wpnid != CSW_XM1014 && wpnid > 0) { new wpn[32] get_weaponname(wpnid,wpn,31) engclient_cmd(id,wpn) } } } //---------------------------------------------------------------------------------------------- public giveGun(id) { if ( is_user_alive(id) && shModActive() ) { shGiveWeapon(id,"weapon_xm1014") } } //---------------------------------------------------------------------------------------------- public switchmodel(id) { if ( !is_user_alive(id) || !gHasSoldierXPower[id] ) return new clip, ammo, wpnid = get_user_weapon(id,clip,ammo) if (wpnid == CSW_XM1014) { Entvars_Set_String(id, EV_SZ_viewmodel, "models/shmod/v_shotgunns") Entvars_Set_String(id, EV_SZ_weaponmodel, "models/shmod/p_shotgunns") } } //---------------------------------------------------------------------------------------------- public weaponChange(id) { if ( !gHasSoldierXPower[id] || !shModActive() ) return new wpnid = read_data(2) new clip = read_data(3) if ( wpnid != CSW_XM1014 ) return switchmodel(id) if ( clip == 0 ) { shReloadAmmo(id) } } //---------------------------------------------------------------------------------------------- public changePlayer(id){ cs_set_user_model(id, "models/shmod/Soldier.mdl") } //----------------------------------------------------------------------------------------------
__________________
My server = 38.113.137.120:27015
GLFZero91 is offline
Send a message via MSN to GLFZero91
GLFZero91
Member
Join Date: Oct 2005
Location: Denmark, Frederikssund
Old 12-04-2005 , 14:34  
Reply With Quote #2

Please help.. Really want this hero
GLFZero91 is offline
Send a message via MSN to GLFZero91
YodaGman
BANNED
Join Date: Dec 2005
Old 12-04-2005 , 15:31  
Reply With Quote #3

Make sure you have the models for him ok.
YodaGman is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 12-04-2005 , 15:36  
Reply With Quote #4

Quote:
Originally Posted by YodaGman
Make sure you have the models for him ok.
dont say anything if you dont know what youre talking about. hes getting errors from the code, not from model placement

GLF, add #include <Vexd_Utilities> to your includes
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
YodaGman
BANNED
Join Date: Dec 2005
Old 12-04-2005 , 17:09  
Reply With Quote #5

well listen ive already tried the craze generater than i talked to him and said well i got compiled errors and lets see he told me i needed real models
YodaGman is offline
notorious-sk8er
Senior Member
Join Date: Jun 2005
Old 12-04-2005 , 18:25  
Reply With Quote #6

no the code generator always gets 4 errors
notorious-sk8er is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 12-04-2005 , 18:58  
Reply With Quote #7

you also dont need
Code:
shSetM3Mult(gHeroName, "SoldierX_m3mult" )
and
Code:
shRemM3multPower(id)
you will need
Code:
	register_event("Damage", "soldierx_damage", "b", "2!0")
and
Code:
public soldierx_damage(id)
{
	if (!shModActive() || !is_user_alive(id)) return

	new damage = read_data(2)
	new weapon, bodypart, attacker = get_user_attacker(id, weapon, bodypart)
	new headshot = bodypart == 1 ? 1 : 0

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

	if ( gHasSoldierXPower[attacker] && weapon == CSW_XM1014 && is_user_alive(id) ) {
		// do extra damage
		new extraDamage = floatround(damage * get_cvar_float("SoldierX_m3mult") - damage)
		if (extraDamage > 0) shExtraDamage( id, attacker, extraDamage, "m3", headshot )
	}
}
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
GLFZero91
Member
Join Date: Oct 2005
Location: Denmark, Frederikssund
Old 12-05-2005 , 05:39  
Reply With Quote #8

i still get the error
p_shotgunns not precached and
v_shotgunns not precached

Sry im only 12 years.. what does it mean?
__________________
My server = 38.113.137.120:27015
GLFZero91 is offline
Send a message via MSN to GLFZero91
The_One
Senior Member
Join Date: Jul 2005
Old 12-05-2005 , 05:46  
Reply With Quote #9

oh yeah and look at line 60 then look at line 147............. notice anything different?
__________________
[img]http://img106.**************/img106/970/spidermancopy5yf.gif[/img]
The_One is offline
GLFZero91
Member
Join Date: Oct 2005
Location: Denmark, Frederikssund
Old 12-05-2005 , 05:47  
Reply With Quote #10

Quote:
Originally Posted by The_One
oh yeah and look at line 60 then look at line 147............. notice anything different?
Still getting the same error....
p_shotgunns not precached and
v_shotgunns not precached
__________________
My server = 38.113.137.120:27015
GLFZero91 is offline
Send a message via MSN to GLFZero91
Reply



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 13:37.


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