#include <amxmodx>
#include <superheromod>
#include <cstrike>
new gHeroName[]="Grimreaper"
new bool:gHasgrimPower[SH_MAXSLOTS+1]
new bool:ggrimSelected[SH_MAXSLOTS+1]
public plugin_init() {
register_plugin("SUPERHERO Grimreaper", "1.0", "DON'T STOP ME")
//Cvars copy and paste in to shconfig.cfg
register_cvar("grim_level", "0")
register_cvar("grim_grav", "600")
register_cvar("grim_alpha", "60")
register_cvar("grim_knifemult", "10")
shCreateHero(gHeroName, "Invisibility/Scythe/Float/Silent", "Invisibility/Knife=1 Hit KO/Low Gravity/Silent Walking", false, "grim_level")
//Init
register_srvcmd("grim_init", "grim_init")
shRegHeroInit(gHeroName, "grim_init")
register_event("Damage", "grim_damage", "b", "2!0")
shSetMinGravity(gHeroName, "grim_grav")
register_cvar("DON'T STOP ME", "HC", FCVAR_SERVER|FCVAR_SPONLY)
}
public plugin_precache()
{
precache_model("models/player/grim/grim.mdl")
}
public grim_init() {
new temp[6]
read_argv(1,temp,5)
new id = str_to_num(temp)
read_argv(2,temp,5)
new hasPowers = str_to_num(temp)
gHasgrimPower[id] = (hasPowers != 0)
ggrimSelected[id] = gHasgrimPower[id]
if (!hasPowers && gHasgrimPower[id] && is_user_alive(id)) {
grim_admincheck(id)
grim_set_model(id)
invisible(id)
}
else if ( !hasPowers && gHasgrimPower[id] ) {
shRemGravityPower(id)
visible(id)
}
}
public grim_set_model(id)
{
if (!shModActive() || !is_user_alive(id) || !gHasgrimPower[id]) return PLUGIN_CONTINUE
cs_set_user_model(id, "grim")
return PLUGIN_CONTINUE;
}
public grim_admincheck(id)
{
new accessLevel[10] = "a"
if ( ggrimSelected[id] && !(get_user_flags(id)&read_flags(accessLevel)) ){
client_print(id, print_chat, "[SH](%s) **Admin Only** You are not authorized to use this hero", gHeroName)
gHasgrimPower[id] = false
client_cmd(id, "say drop %s", gHeroName)
}
}
public grim_damage(id)
{
if ( !shModActive() || !is_user_alive(id) ) return
new damage = read_data(2)
new body, weapon, attacker = get_user_attacker(id, weapon, body)
new headshot = body == 1 ? 1 : 0
if ( attacker <= 0 || attacker > SH_MAXSLOTS ) return
if ( gHasgrimPower[attacker] && weapon == CSW_KNIFE && is_user_alive(id) ) {
new extraDamage = floatround(damage * get_cvar_float("grim_10mult") - damage)
if (extraDamage > 0) shExtraDamage(id, attacker, extraDamage, "knife", headshot)
}
}
public client_prethink(id)
{
if( gHasgrimPower[id] ) {
Entvars_Set_Int(id, EV_INT_flTimeStepSound, 999)
}
}
#else
if ( hasPowers && is_user_connected(id) ) {
set_user_footsteps(id, 1)
}
else if ( !hasPowers && gHasgrimPower[id] && is_user_connected(id) ) {
set_user_footsteps(id, 0)
}
ghasgrimPower[id] = (hasPowers != 0)
}
public newSpawn(id)
{
if ( gHasgrimPower[id] && is_user_connected(id) ) {
set_task(1.0, "invisible", id)
set_user_footsteps(id, 1)
}
}
public invisible(id)
{
if ( !is_user_alive(id) ) return
set_user_rendering(id, kRenderFxGlowShell, 8, 8, 8, kRenderTransAlpha, get_cvar_num("grim_alpha"))
}
public visible(id)
{
if ( !is_user_alive(id) ) return
set_user_rendering(id)
}
Pls Help... I'm newby with scripting.... pls help me... this is the errors
/tmp/textM3ZLms.sma(14) : warning 217: loose indentation
/tmp/textM3ZLms.sma(15) : warning 217: loose indentation
/tmp/textM3ZLms.sma(17) : warning 217: loose indentation
/tmp/textM3ZLms.sma(23) : warning 217: loose indentation
/tmp/textM3ZLms.sma(24) : warning 217: loose indentation
/tmp/textM3ZLms.sma(25) : warning 217: loose indentation
/tmp/textM3ZLms.sma(3
: warning 217: loose indentation
/tmp/textM3ZLms.sma(39) : warning 217: loose indentation
/tmp/textM3ZLms.sma(41) : warning 217: loose indentation
/tmp/textM3ZLms.sma(42) : warning 217: loose indentation
/tmp/textM3ZLms.sma(84) : error 017: undefined symbol "Entvars_Set_Int"
/tmp/textM3ZLms.sma(8
: error 026: no matching "#if..."
/tmp/textM3ZLms.sma(90) : error 010: invalid function or declaration
/tmp/textM3ZLms.sma(93) : error 010: invalid function or declaration
/tmp/textM3ZLms.sma(97) : error 010: invalid function or declaration
/tmp/textM3ZLms.sma(103) : warning 217: loose indentation