Raised This Month: $ Target: $400
 0% 

AMXX noob maxlevel attempt


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
notusian
Junior Member
Join Date: Dec 2004
Location: CA
Old 01-29-2005 , 23:19   AMXX noob maxlevel attempt
Reply With Quote #1

I am trying to make the maxlevel 5 for this hero. Any help would be greatly appreciated. PLease view my errors.
Code:
#include <amxmod.inc>
#include <xtrafun>
#include <superheromod.inc>

// GREEN ARROW - Exploding Arrows (bullets from scout)

// CVARS
// noob_arrows- How many Arrows does he get each round
// garrow_getscout - Does he get a free scout on respawn.


// VARIABLES
new gHeroName[]="Noob"
new gHasNoobPower[SH_MAXSLOTS+1]
new gPlayersLevels[SH_MAXSLOTS+1]
new gArrowsFired[33] = 0
// Test
new gLastWeapon[33]=0 
new gLastClipCount[33]=0
new lastammo[33] 
new lastweap[33]

// sprites! 
new spr_laser 
new spr_laser_impact 
new spr_blast_shroom

//----------------------------------------------------------------------------------------------
public plugin_init()
{
  // Plugin Info
  register_plugin("SUPERHERO Noob","1.2","AssKicR")
 
  // FIRE THE EVENT TO CREATE THIS SUPERHERO!
  if ( isDebugOn() ) server_print("Attempting to create Noob Hero")
  if ( !cvar_exists("noob_level") ) register_cvar("noob_level", "0")
  if ( !cvar_exists("maxnoob_level") ) register_cvar("maxnoob_level", "5")
  shCreateHero(gHeroName, "exploding deagle shots", "U WILL HAVE A DEAGE WITH 3 EXPLODING SHOTS!!", false, "noob_level" )
  
  // REGISTER EVENTS THIS HERO WILL RESPOND TO! (AND SERVER COMMANDS)
  // INIT
  register_srvcmd("noob_init", "noob_init")
  shRegHeroInit(gHeroName, "noob_init")
  register_event("ResetHUD","newRound","b")
  // GREEN ARROW DAMAGE
  register_event("Damage", "noob_damage", "b", "2!0")
  // COUTING ARROWS
  register_event("CurWeapon","changeWeapon","be","1=1")
  // MAKE A TRAIL OF THE ARROW
  register_event("CurWeapon","make_tracer", "be", "1=1", "3>0") 


  // DEFAULT THE CVARS
  if ( !cvar_exists("noob_arrows") ) register_cvar("noob_arrows", "random_num ( 1,2 )")
  if ( !cvar_exists("noob_getdeagle") ) register_cvar("noob_getdeagle", "1")
}
//----------------------------------------------------------------------------------------------
public noob_init()
{
  new temp[128]
  // First Argument is an id
  read_argv(1,temp,5)
  new id=str_to_num(temp)
  
  // 2nd Argument is 0 or 1 depending on whether the id has garrow
  read_argv(2,temp,5)
  new hasPowers=str_to_num(temp)
  gHasNoobPower[id]=(hasPowers!=0)
}
//----------------------------------------------------------------------------------------------
public plugin_precache() { 
    spr_laser = precache_model("sprites/laserbeam.spr") 
    spr_laser_impact = precache_model("sprites/zerogxplode.spr") 
    spr_blast_shroom = precache_model("sprites/mushroom.spr") 
    return PLUGIN_CONTINUE 
} 
//----------------------------------------------------------------------------------------------
public newRound(id)
{
  new parm[1]
  parm[0]=id
  gArrowsFired[id] = 0
  gPlayerUltimateUsed[id]=false
  gLastWeapon[id]=-1  // I think the change Weapon automatically gets called on spawn death too...

  if (gHasNoobPower[id] && get_cvar_num("noob_getdeagle")==1) {
	shGiveWeapon(id,"weapon_deagle") 
	}
}
//----------------------------------------------------------------------------------------------
public noob_damage(id)
{
    if (!shModActive()) return PLUGIN_CONTINUE

    new damage = read_data(2)
    new weapon, bodypart, attacker_id = get_user_attacker(id,weapon,bodypart)
    
    if ( attacker_id <=0 || attacker_id>SH_MAXSLOTS ) return PLUGIN_CONTINUE
  
    if ( gHasNoobPower[attacker_id] && weapon == CSW_DEAGLE && is_user_alive(id) && (!gPlayerUltimateUsed[attacker_id]))
{ 
    new health = get_user_health(id) 

    // mah nigga $id wasn't attacked by another player 
    if (!is_user_connected(attacker_id)) return PLUGIN_CONTINUE 
    if (attacker_id == id) return PLUGIN_CONTINUE 

    // damage is less than 10% 
    if (((1.0 * damage) / (1.0 * (health + damage))) < 0.01) return PLUGIN_CONTINUE 

    new origin[3] 
    new attacker_team[2], victim_team[2] 

    get_user_origin(id, origin) 

    // player fades.. 
    set_user_rendering(id, kRenderFxFadeSlow, 255, 255, 255, kRenderTransColor, 4); 

    // beeeg explody! 
    message_begin(MSG_ALL, SVC_TEMPENTITY) 
    write_byte(3)            // TE_EXPLOSION 
    write_coord(origin[0]) 
    write_coord(origin[1]) 
    write_coord(origin[2]-22) 
    write_short(spr_blast_shroom)    // mushroom cloud 
    write_byte(40)            // scale in 0.1u 
    write_byte(12)            // frame rate 
    write_byte(12)            // TE_EXPLFLAG_NOPARTICLES & TE_EXPLFLAG_NOSOUND 
    message_end() 


    // do turn down that awful racket 130

    // ..to be replaced by a blood spurt! 
    message_begin(MSG_ALL, SVC_TEMPENTITY) 
    write_byte(10)        // TE_LAVASPLASH 
    write_coord(origin[0]) 
    write_coord(origin[1]) 
    write_coord(origin[2]-26) 
    message_end() 

    // kill victim
    user_kill(id, 1)
    message_begin( MSG_ALL, get_user_msgid("DeathMsg"),{0,0,0},0)
    write_byte(attacker_id)
    write_byte(id)
    write_byte(0)
    write_string("deagle")
    message_end()
	//Save Hummiliation
    new namea[24],namev[24],authida[20],authidv[20],teama[8],teamv[8] 
    //Info On Attacker
    get_user_name(attacker_id,namea,23) 
    get_user_team(attacker_id,teama,7) 
    get_user_authid(attacker_id,authida,19) 
   //Info On Victim
    get_user_name(id,namev,23) 
    get_user_team(id,teamv,7) 
    get_user_authid(id,authidv,19)
	//Log This Kill
    log_message("^"%s<%d><%s><%s>^" killed ^"%s<%d><%s><%s>^" with ^"Noob^"", 
    namea,get_user_userid(attacker_id),authida,teama,namev,get_user_userid(id),authidv,teamv)          

    /* set_user_health(id, 0) */ 

    // team check! 
    get_user_team(attacker_id, attacker_team, 1) 
    get_user_team(id, victim_team, 1) 

    // for some reason this doesn't update in the hud until the next round.. whatever. 
    if (!equali(attacker_team, victim_team)) { 
        // diff. team;    $attacker_id gets credited for the kill and $250 and XP.
        //        $id gets their suicidal -1 frag back. 
        set_user_frags(attacker_id, get_user_frags(attacker_id)+1) 
        set_user_money(attacker_id, get_user_money(attacker_id)+150)
	shAddXP(attacker_id, id, 1)
    } 
	else { 
        // same team;    $attacker loses a frag and $500 and XP.
        set_user_frags(attacker_id, get_user_frags(attacker_id)-1) 
        set_user_money(attacker_id, get_user_money(attacker_id)-500, 0)
	shAddXP(attacker_id, id, -1)
		} 
    return PLUGIN_CONTINUE 
	} 
    return PLUGIN_CONTINUE
}
//----------------------------------------------------------------------------------------------,
public make_tracer(id) { 

    if (!shModActive()) return PLUGIN_CONTINUE 
        
    
    new weap = read_data(2)        // id of the weapon 
    new ammo = read_data(3)        // ammo left in clip 

    if ( gHasNoobPower[id] && weap == CSW_DEAGLE && is_user_alive(id) && (!gPlayerUltimateUsed[id]) ) {

    if (lastweap[id] == 0) lastweap[id] = weap 

    if ((lastammo[id] > ammo) && (lastweap[id] == weap)) { 

        new vec1[3], vec2[3] 
        get_user_origin(id, vec1, 1) // origin; where you are 
        get_user_origin(id, vec2, 4) // termina; where your bullet goes 

        // tracer beam 
        message_begin(MSG_PAS, SVC_TEMPENTITY, vec1) 
        write_byte(0)        // TE_BEAMPOINTS 
        write_coord(vec1[0]) 
        write_coord(vec1[1]) 
        write_coord(vec1[2]) 
        write_coord(vec2[0]) 
        write_coord(vec2[1]) 
        write_coord(vec2[2]) 
        write_short(spr_laser)    // laserbeam sprite 
        write_byte(0)        // starting frame 
        write_byte(10)        // frame rate 
        write_byte(2)        // life in 0.1s 
        write_byte(4)        // line width in 0.1u 
        write_byte(1)        // noise in 0.1u 
        write_byte(153)        // red
        write_byte(0)      // green 
        write_byte(0)        // blue
        write_byte(80)        // brightness 
        write_byte(100)        // scroll speed 
        message_end() 

        // bullet impact explosion 
        message_begin(MSG_PAS, SVC_TEMPENTITY, vec2) 
        write_byte(3)        // TE_EXPLOSION 
        write_coord(vec2[0])    // end point of beam 
        write_coord(vec2[1]) 
        write_coord(vec2[2]) 
        write_short(spr_laser_impact)    // blast sprite 
        write_byte(10)            // scale in 0.1u 
        write_byte(30)            // frame rate 
        write_byte(8)            // TE_EXPLFLAG_NOPARTICLES 
        message_end()            // ..unless i'm mistaken, noparticles helps avoid a crash 
    } 

    lastammo[id] = ammo 
    lastweap[id] = weap 

    return PLUGIN_CONTINUE 
	}
    return PLUGIN_CONTINUE 
} 
//----------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------
public changeWeapon(id)

//MAXLEVEL RESTRICTION 

{ 
    if ( is_user_alive(id) && gHasNoobPower[id]) { 
    if (gPlayerLevels[id] > get_cvar_num("5")) 
        server_cmd(amx_slay#(id)) 
    else 
        noob(id) 
        } 
{
    if ( !gHasNoobPower[id] || !shModActive() ) return PLUGIN_CONTINUE
    new  clip, ammo
    new wpn_id=get_user_weapon(id, clip, ammo);

    if ( wpn_id!=CSW_DEAGLE ) return PLUGIN_CONTINUE

    // This event gets trigger on a switch to a weapon too...
	// Easy work around
    if ( wpn_id != gLastWeapon[id] )
	{
      gLastWeapon[id]=wpn_id  
      return PLUGIN_CONTINUE // user just switched weapons
	}

    if ( clip >= gLastClipCount[id] )
	{
	  gLastClipCount[id]=clip
	  return PLUGIN_CONTINUE
	}
    gLastClipCount[id]=clip

	// Ok - if it fell through here - you got a user firing the scout
	
	// Bullet Count
    gArrowsFired[id]=(gArrowsFired[id] + 1)
    new arrows = (get_cvar_num("noob_arrows")-gArrowsFired[id])

	if (arrows == 0) {
			gPlayerUltimateUsed[id]=true
						}
	if (arrows <= 0) {
			gPlayerUltimateUsed[id]=true
						}
	if ((arrows != 0) && arrows >= 0 ) {
			new message[128]
			format(message, 127, "You Have %d Red Things left",arrows)
			set_hudmessage(255,0,0,-1.0,0.3,0,0.25,1.0,0.0,0.0,4)
			show_hudmessage(id, message)
						}
        return PLUGIN_CONTINUE
}
//----------------------------------------------------------------------------------------------
public maxnoob_level() 
{ 
  new id[5] 
  new lev[5] 

  read_argv(1,id,4) 
  read_argv(2,lev,4) 

  gPlayerLevels[str_to_num(id)] = str_to_num(lev) 
}
Attached Images
File Type: jpg noobmax.JPG (49.5 KB, 257 views)
notusian is offline
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 01-29-2005 , 23:28  
Reply With Quote #2

uhhh.... dejavu
http://forums.alliedmods.net/showthread.php?t=32325
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 01-29-2005 , 23:43  
Reply With Quote #3

sory i know
Styles is offline
Send a message via AIM to Styles
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 01-30-2005 , 07:35  
Reply With Quote #4

u need to define gplayerLevels
Freecode is offline
Prowler
Senior Member
Join Date: Nov 2004
Old 01-30-2005 , 13:40  
Reply With Quote #5

http://forums.alliedmods.net/showthread.php?t=32107
Prowler is offline
notusian
Junior Member
Join Date: Dec 2004
Location: CA
Old 01-30-2005 , 18:28  
Reply With Quote #6

how could i define the gplayerlevels, i thought i had already.
notusian is offline
notusian
Junior Member
Join Date: Dec 2004
Location: CA
Old 02-18-2005 , 03:04  
Reply With Quote #7

Here is another try of this. (arrgh)
Code:
#include <amxmod.inc>
#include <amxmisc>
#include <xtrafun>
#include <superheromod.inc>
#include <vexd_utilities> 

// GREEN ARROW - Exploding Arrows (bullets from scout)

// CVARS
// noob_arrows- How many Arrows does he get each round
// garrow_getscout - Does he get a free scout on respawn.


// VARIABLES
new gHeroName[]="Noob"
new gHasNoobPower[SH_MAXSLOTS+1]
new gPlayerLevels[SH_MAXSLOTS+1]
new gArrowsFired[33] = 0
// Test
new gLastWeapon[33]=0 
new gLastClipCount[33]=0
new lastammo[33] 
new lastweap[33]

// sprites! 
new spr_laser 
new spr_laser_impact 
new spr_blast_shroom

//----------------------------------------------------------------------------------------------
public plugin_init()
{
  // Plugin Info
  register_plugin("SUPERHERO Noob","1.2","AssKicR")
 
  // FIRE THE EVENT TO CREATE THIS SUPERHERO!
  if ( isDebugOn() ) server_print("Attempting to create Noob Hero")
  if ( !cvar_exists("noob_level") ) register_cvar("noob_level", "0")
  if ( !cvar_exists("maxnoob_level") ) register_cvar("maxnoob_level", "6")
  shCreateHero(gHeroName, "exploding deagle shots", "U WILL HAVE A DEAGE WITH 3 EXPLODING SHOTS!!", false, "noob_level" )
  
  // REGISTER EVENTS THIS HERO WILL RESPOND TO! (AND SERVER COMMANDS)
  // INIT
  register_srvcmd("noob_init", "noob_init")
  shRegHeroInit(gHeroName, "noob_init")
  register_event("ResetHUD","newRound","b")
  // GREEN ARROW DAMAGE
  register_event("Damage", "noob_damage", "b", "2!0")
  // COUTING ARROWS
  register_event("CurWeapon","changeWeapon","be","1=1")
  // MAKE A TRAIL OF THE ARROW
  register_event("CurWeapon","make_tracer", "be", "1=1", "3>0") 
  // LEVELS
  register_srvcmd("noob_levels", "noob_levels")
  shRegLevels(gHeroName,"dracula_levels")

  // DEFAULT THE CVARS
  if ( !cvar_exists("noob_arrows") ) register_cvar("noob_arrows", "1")
  if ( !cvar_exists("noob_getdeagle") ) register_cvar("noob_getdeagle", "1")
}
//----------------------------------------------------------------------------------------------
public noob_init()
{
  new temp[128]
  // First Argument is an id
  read_argv(1,temp,5)
  new id=str_to_num(temp)
  
  // 2nd Argument is 0 or 1 depending on whether the id has garrow
  read_argv(2,temp,5)
  new hasPowers=str_to_num(temp)
  gHasNoobPower[id]=(hasPowers!=0)
}
//----------------------------------------------------------------------------------------------
public plugin_precache() { 
    spr_laser = precache_model("sprites/laserbeam.spr") 
    spr_laser_impact = precache_model("sprites/zerogxplode.spr") 
    spr_blast_shroom = precache_model("sprites/mushroom.spr") 
    return PLUGIN_CONTINUE 
} 
//----------------------------------------------------------------------------------------------
public noob_levels() 
{ 
  new id[5] 
  new lev[5] 

  read_argv(1,id,4) 
  read_argv(2,lev,4) 

  gPlayerLevels[str_to_num(id)] = str_to_num(lev) 
} 
//----------------------------------------------------------------------------------------------
public newRound(id)
{
  new parm[1]
  parm[0]=id
  gArrowsFired[id] = 0
  gPlayerUltimateUsed[id]=false
  gLastWeapon[id]=-1  // I think the change Weapon automatically gets called on spawn death too...

  if (gHasNoobPower[id] && get_cvar_num("noob_getdeagle")==1) {
	shGiveWeapon(id,"weapon_deagle") 
	}
}
//----------------------------------------------------------------------------------------------
public noob_damage(id)
{
    if (!shModActive()) return PLUGIN_CONTINUE

    new damage = read_data(2)
    new weapon, bodypart, attacker_id = get_user_attacker(id,weapon,bodypart)
    
    if ( attacker_id <=0 || attacker_id>SH_MAXSLOTS ) return PLUGIN_CONTINUE
  
    if ( gHasNoobPower[attacker_id] && weapon == CSW_DEAGLE && is_user_alive(id) && (!gPlayerUltimateUsed[attacker_id]))
{ 
    new health = get_user_health(id) 

    // mah nigga $id wasn't attacked by another player 
    if (!is_user_connected(attacker_id)) return PLUGIN_CONTINUE 
    if (attacker_id == id) return PLUGIN_CONTINUE 

    // damage is less than 10% 
    if (((1.0 * damage) / (1.0 * (health + damage))) < 0.01) return PLUGIN_CONTINUE 

    new origin[3] 
    new attacker_team[2], victim_team[2] 

    get_user_origin(id, origin) 

    // player fades.. 
    set_user_rendering(id, kRenderFxFadeSlow, 255, 255, 255, kRenderTransColor, 4); 

    // beeeg explody! 
    message_begin(MSG_ALL, SVC_TEMPENTITY) 
    write_byte(3)            // TE_EXPLOSION 
    write_coord(origin[0]) 
    write_coord(origin[1]) 
    write_coord(origin[2]-22) 
    write_short(spr_blast_shroom)    // mushroom cloud 
    write_byte(40)            // scale in 0.1u 
    write_byte(12)            // frame rate 
    write_byte(12)            // TE_EXPLFLAG_NOPARTICLES & TE_EXPLFLAG_NOSOUND 
    message_end() 


    // do turn down that awful racket 130

    // ..to be replaced by a blood spurt! 
    message_begin(MSG_ALL, SVC_TEMPENTITY) 
    write_byte(10)        // TE_LAVASPLASH 
    write_coord(origin[0]) 
    write_coord(origin[1]) 
    write_coord(origin[2]-26) 
    message_end() 

    // kill victim
    user_kill(id, 1)
    message_begin( MSG_ALL, get_user_msgid("DeathMsg"),{0,0,0},0)
    write_byte(attacker_id)
    write_byte(id)
    write_byte(0)
    write_string("deagle")
    message_end()
	//Save Hummiliation
    new namea[24],namev[24],authida[20],authidv[20],teama[8],teamv[8] 
    //Info On Attacker
    get_user_name(attacker_id,namea,23) 
    get_user_team(attacker_id,teama,7) 
    get_user_authid(attacker_id,authida,19) 
   //Info On Victim
    get_user_name(id,namev,23) 
    get_user_team(id,teamv,7) 
    get_user_authid(id,authidv,19)
	//Log This Kill
    log_message("^"%s<%d><%s><%s>^" killed ^"%s<%d><%s><%s>^" with ^"Noob^"", 
    namea,get_user_userid(attacker_id),authida,teama,namev,get_user_userid(id),authidv,teamv)          

    /* set_user_health(id, 0) */ 

    // team check! 
    get_user_team(attacker_id, attacker_team, 1) 
    get_user_team(id, victim_team, 1) 

    // for some reason this doesn't update in the hud until the next round.. whatever. 
    if (!equali(attacker_team, victim_team)) { 
        // diff. team;    $attacker_id gets credited for the kill and $250 and XP.
        //        $id gets their suicidal -1 frag back. 
        set_user_frags(attacker_id, get_user_frags(attacker_id)+1) 
        set_user_money(attacker_id, get_user_money(attacker_id)+150)
	shAddXP(attacker_id, id, 1)
    } 
	else { 
        // same team;    $attacker loses a frag and $500 and XP.
        set_user_frags(attacker_id, get_user_frags(attacker_id)-1) 
        set_user_money(attacker_id, get_user_money(attacker_id)-500, 0)
	shAddXP(attacker_id, id, -1)
		} 
    return PLUGIN_CONTINUE 
	} 
    return PLUGIN_CONTINUE
}
//----------------------------------------------------------------------------------------------,
public make_tracer(id) { 

    if (!shModActive()) return PLUGIN_CONTINUE 
        
    
    new weap = read_data(2)        // id of the weapon 
    new ammo = read_data(3)        // ammo left in clip 

    if ( gHasNoobPower[id] && weap == CSW_DEAGLE && is_user_alive(id) && (!gPlayerUltimateUsed[id]) ) {

    if (lastweap[id] == 0) lastweap[id] = weap 

    if ((lastammo[id] > ammo) && (lastweap[id] == weap)) { 

        new vec1[3], vec2[3] 
        get_user_origin(id, vec1, 1) // origin; where you are 
        get_user_origin(id, vec2, 4) // termina; where your bullet goes 

        // tracer beam 
        message_begin(MSG_PAS, SVC_TEMPENTITY, vec1) 
        write_byte(0)        // TE_BEAMPOINTS 
        write_coord(vec1[0]) 
        write_coord(vec1[1]) 
        write_coord(vec1[2]) 
        write_coord(vec2[0]) 
        write_coord(vec2[1]) 
        write_coord(vec2[2]) 
        write_short(spr_laser)    // laserbeam sprite 
        write_byte(0)        // starting frame 
        write_byte(10)        // frame rate 
        write_byte(2)        // life in 0.1s 
        write_byte(4)        // line width in 0.1u 
        write_byte(1)        // noise in 0.1u 
        write_byte(153)        // red
        write_byte(0)      // green 
        write_byte(0)        // blue
        write_byte(80)        // brightness 
        write_byte(100)        // scroll speed 
        message_end() 

        // bullet impact explosion 
        message_begin(MSG_PAS, SVC_TEMPENTITY, vec2) 
        write_byte(3)        // TE_EXPLOSION 
        write_coord(vec2[0])    // end point of beam 
        write_coord(vec2[1]) 
        write_coord(vec2[2]) 
        write_short(spr_laser_impact)    // blast sprite 
        write_byte(10)            // scale in 0.1u 
        write_byte(30)            // frame rate 
        write_byte(8)            // TE_EXPLFLAG_NOPARTICLES 
        message_end()            // ..unless i'm mistaken, noparticles helps avoid a crash 
    } 

    lastammo[id] = ammo 
    lastweap[id] = weap 

    return PLUGIN_CONTINUE 
	}
    return PLUGIN_CONTINUE 
} 
//----------------------------------------------------------------------------------------------
//!!!!!!!!!!!!!!!!!!!!!!!!!!LOOK FOR ERRORS BELOW PLEASE!!!!!!!!!!!!!!!!!!!!!!!!!!!!
public changeWeapon(id)
{
    if ( !gHasNoobPower[id] || !shModActive() ) return PLUGIN_CONTINUE
    new  clip, ammo
    new wpn_id=get_user_weapon(id, clip, ammo);

    if ( is_user_alive(id) && gHasNoobPower[id]) { 
    if (gPlayerLevels[id] > get_cvar_num("maxnoob_level")) 
    server_cmd (amx_slay #(id)) 
    else 
        noob(id) 
        } 

    if ( wpn_id!=CSW_DEAGLE ) return PLUGIN_CONTINUE

    // This event gets trigger on a switch to a weapon too...
	// Easy work around
    if ( wpn_id != gLastWeapon[id] )
	{
      gLastWeapon[id]=wpn_id  
      return PLUGIN_CONTINUE // user just switched weapons
	}

    if ( clip >= gLastClipCount[id] )
	{
	  gLastClipCount[id]=clip
	  return PLUGIN_CONTINUE
	}
    gLastClipCount[id]=clip

	// Ok - if it fell through here - you got a user firing the scout
	
	// Bullet Count
    gArrowsFired[id]=(gArrowsFired[id] + 1)
    new arrows = (get_cvar_num("noob_arrows")-gArrowsFired[id])

    if (arrows == 0) {
			gPlayerUltimateUsed[id]=true
						}
    if (arrows <= 0) {
			gPlayerUltimateUsed[id]=true
						}
    if ((arrows != 0) && arrows >= 0 ) {
			new message[128]
			format(message, 127, "You Have %d Red Things left",arrows)
			set_hudmessage(255,0,0,-1.0,0.3,0,0.25,1.0,0.0,0.0,4)
			show_hudmessage(id, message)
						}
    return PLUGIN_CONTINUE
}
All the errors are on line 273; server_cmd (amx_slay #(id))
error 017: undefined symbol "amx_slay"
warning 215: expression has no effect
error 001: expected token ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line.
-These errors are what screws it up obviously--
Any help at all would be greatly appreciated!!! Thank you!
notusian is offline
vittu
SuperHero Moderator
Join Date: Oct 2004
Location: L.A. County, CA
Old 02-18-2005 , 07:44  
Reply With Quote #8

first change:
shRegLevels(gHeroName,"dracula_levels")
to
shRegLevels(gHeroName,"noob_levels")

second change:
server_cmd (amx_slay #(id))
to
user_kill(id,1)

third:
wtf is this - noob(id)
I don't see a function called noob, get rid of it and the else statement. Replace them with a return PLUGIN_HANDLED, if you add this you will have to add brackets on that inner if statement (very important)..

fourth none of these are used delete:
#include <amxmisc>
#include <xtrafun>
#include <vexd_utilities>


Although that a very poor way to do it... Im not helping further...
vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
notusian
Junior Member
Join Date: Dec 2004
Location: CA
Old 02-19-2005 , 03:48  
Reply With Quote #9

Vittu i love you!!!!!! OF coarse i mean that in a normal way i hope... You get it thank you so much! Come to my server sometime if you want to 134.139.151.119:27015 and ill get you up a butload of levels. Im DB-[L] Notus. See ya.
notusian is offline
vittu
SuperHero Moderator
Join Date: Oct 2004
Location: L.A. County, CA
Old 02-19-2005 , 03:53  
Reply With Quote #10

I don't play much cs but thanx...
vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
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 01:30.


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