AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   superhero help (https://forums.alliedmods.net/showthread.php?t=9112)

mader 01-06-2005 05:30

superhero help
 
i have make a superhero but when i compile it it dont work

Quote:

// vegeta-power up
//created for by funniest

copy and paste in shconfig.ini
//vegeta
vegeta_level 10 //what level is he avalible
vegeta_heal 2000 //how much he heal
vegeta_gravity 0 //how much the gravity is for him




#include <amxmodx>
#include <xtrafun>
#include <vexd_utilities>
#include <superheromod.ini>


// VARIABLES
new gheroname[]="vegeta"
new ghasvegetapower[SH_MAXSLOTS+1]
new bool:gcanheal[SH_MAXSLOTS+1]
new bool:gcangravity[SH_MAXSLOTS+1]
//--------------------------------------
public plugin_init()
{
// Plugin info
register_plugin("SUPERHERO VEGETA","1.6","funniest")

// DO NOT EDIT THIS FILE CVARS, USE THE SHCONFI:GHF
register_cvar("vegeta_level", "10")
register_cvar("vegeta_heal", "2000")
register_cvar("vegeta_gravity", "0")

// fire the event to create this hero!
shCreatehero(gheroname, "vegeta_heal", "you dont need to do something!", false; "vegeta_level10")

// register events this hero will respond to! (and server commands)
// INIT
register_srvcmd("vegeta_init", "vegeta_init")
shregheroInit(gheroname, "vegeta_init")

//new round
register_event("resethud","newround","b"

// vegeta_heal
set_task(0.1,"vegeta_loop",0,"",0,"b" )
}
//-------------------------------------------------------------------------------
public vegeta_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 vegeta
read_argv(2,temp,5)
new haspowers=str_to_num(temp)

ghasvegetapower[id]=!0)
gheal[id]=true
}
//-------------------------------------------------------------------------------
public newround(id)
{
gheal[id]=true
}
//-------------------------------------------------------------------------------
public_vegeta_loop()
{
// first argument is an id with vegeta powers!
new temp[6]
read_argv(1,temp,5)
new id=str_to_num(temp)
new float:velocity[3]

if ( !is_user_alive(id) || !ghasvegetapower[id] ) return plugin_handled

Entvars_get_vector(id, EV_VEC_Velocity, Vlocity)
if ( ( velocity[2] >= -10.0 && velocity[2] <=10.0 ) ) {
gheal[id]=true
}

if ( gheal[id] ) {
Entvars_Get_Vector(id, EV_VEC_velocity, velocity)
if ( (Entvars_Get_Int(id,EV_INT_button)&IN_JUMP) && (velocity[2] < -10.0 || velocity[2] > 10.0) ) {
velocity[2]=velocity[2] + get_cvar_float("vegeta_heal")
Entvars_Set_Vector(id, EV_VEC_velocity, velocity)
gheal[id]=false
}
}
return PLUGIN_HANDLED
}
//-----------------------------------------------------------------------




it only stand 1 error

mader 01-06-2005 10:29

hmm
 
1 Attachment(s)
here is the file

LUNCHBOX!!! 01-06-2005 12:02

[offtopic]You search help here because you got banned on rocks-hideout for spamming :lol: [/offtopic]

XxAvalanchexX 01-06-2005 16:45

Die twice.

Finished?

Okay, now why don't you ask a question or something? Simply telling us that your code does not work will not accomplish anything.

mader 01-08-2005 07:33

?
 
well it stand cant compile this file because of error i dont know whats wrong

XxAvalanchexX 01-08-2005 12:36

You're trying to include Vexd_Utilities. This is an include from AMX. This was removed in AMXx.


All times are GMT -4. The time now is 19:15.

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