Raised This Month: $ Target: $400
 0% 

help with my hero


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
detox
Member
Join Date: Nov 2006
Location: Queens, New York
Old 01-30-2007 , 01:32   help with my hero
Reply With Quote #1

hey guys this is the first hero ive actually done now im guessing im missing something here but the hero loads fine but it doesnt get the weapon in the game its just a simple gun hero notting big can some one tell me why heres the code
Code:
//This is my first hero so please just go with it =P
 
#include <amxmodx> //Include the library which it will use.
#include <superheromod> //Superhero Mod library.
//--------------------------------------------------------------------------------------------------
//Global Variables
new gHeroName[]="Toxicv2" //Define the hero name
new bool:gHasToxicv2Power[SH_MAXSLOTS+1]
//--------------------------------------------------------------------------------------------------
public plugin_init() {
//Plugin info
register_plugin("SUPERHERO Toxicv2","1.0","Detox") //Self Explainatory
//DO NOT EDIT THIS FILE TO CHANGE CVARS, USE THE SHCONFIG.CFG
register_cvar("toxicv2_level", "50" ) //What level is this hero available.
register_cvar("toxicv2_getm4a1", "1") //1 get m4a1 0 dont get one
// DEFAULT THE CVARS (GREEN ARROW)
if ( !cvar_exists("toxicv2_level") ) register_cvar("toxicv2_level", "10")
if ( !cvar_exists("toxicv2_getm4a1") ) register_cvar("toxicv2_getm4a1", "1")
//fire the event to create this hero 
shCreateHero(gHeroName, "Toxicv2", "Detox version2", false, "toxicv2_level" )
 
//init
register_srvcmd("toxicv2_init", "toxicv2_init")
register_event("CurWeapon", "make_toxicv2", "be", "1=1", "3>0")
shRegHeroInit(gHeroName, "toxicv2_init")
}
//--------------------------------------------------------------------------------------------------
public plugin_precache()
{
precache_model("models/shmod/toxicv2_v_m4a1.mdl")
precache_model("models/shmod/toxicv2_p_m4a1.mdl")
precache_model("models/shmod/toxicv2_w_m4a1.mdl")
return PLUGIN_CONTINUE
}
//----------------------------------------------------------------------------------------------
public toxicv2_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 GreenLantern
read_argv(2,temp,5)
new hasPowers = str_to_num(temp)
gHasToxicv2Power[id] = (hasPowers!=0)
 
}
//--------------------------------------------------------------------------------------------------
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/
detox is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 01-30-2007 , 01:54   Re: help with my hero
Reply With Quote #2

...you never tell it to...

PS: wrong section of forums
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`
detox
Member
Join Date: Nov 2006
Location: Queens, New York
Old 01-30-2007 , 02:19   Re: help with my hero
Reply With Quote #3

oh sry i thought this was for scripting help sry about that
detox is offline
Reply


Thread Tools
Display Modes

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 00:41.


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