Raised This Month: $ Target: $400
 0% 

need help on blocking things


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
flyeni6
Senior Member
Join Date: Jun 2006
Location: CAli
Old 06-27-2007 , 16:17   need help on blocking things
Reply With Quote #1

i have this juggernaut code, it frm GHW JUGGERNAUT.
yea so anyways im runnning this with CSDM.
it sets the juggernaut T and the rest CT.
and what a new juggernaut is found, about 5 people get worldspawned on a new round. how can i stop that?
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>
#include <fun>
new hm_jugg_health
new juggernautmodecvar
new juggernaut
new healthhealth3
public plugin_init()
{
 
register_plugin("Juggernaut","3.0","GHW_Chronic")
 
register_concmd("hm_jugg_mode","toggle_cmd",ADMIN_LEVEL_D," <1=on 0=off>")
 
juggernautmodecvar register_cvar("hm_jugg","1")
 
hm_jugg_health  register_cvar("hm_jugg_health","600")
 
 
set_task(0.1,"repeated_task",0,"",0,"b")
 
register_event("DeathMsg","juggdeath","a")
 
find_new_jn()
}
public 
repeated_task()
{
 new 
name[32]
 if(
get_pcvar_num(juggernautmodecvar) && is_user_alive(juggernaut))
 {
  
set_cvar_num("sv_autoteambalance",0)
  
set_cvar_num("mp_limitteams",0)
  
//set_cvar_num("mp_freezetime",0)
  
new players[32], num
  get_players
(players,num)
  for(new 
i=0;i<num;i++)
  {
   if(
cs_get_user_team(players[i])==CS_TEAM_T)
   {
    if(
players[i]!=juggernaut
     
cs_set_user_team(players[i],CS_TEAM_CT)
    else
    {
     if(
health3)
     {
      
set_user_health(juggernaut,health3)
      
health3 0
     
}
     else
     {
      new 
health2 get_user_health(juggernaut)
      if(
health2==100set_user_health(juggernaut,health)
      else if(
health2health health2
      
}
    }
   }
  }
  
cs_set_user_team(juggernaut,CS_TEAM_T)
  
cs_set_user_model(juggernaut"Halo_Red")
  
cs_set_user_plant(juggernaut,0,0)
  
get_user_name(juggernautname31)
  
set_hudmessage(02550, -1.00.0306.00.1)
  
show_hudmessage(0"Current Juggernaut: %s^nJuggernaut Health: %d",name,health)
 }
}
public 
find_new_jn()
{
 if(
get_pcvar_num(juggernautmodecvar))
 {
  new 
players[32], numplayer
  get_players
(players,num)
  for(new 
i=0;i<num;i++)
  {
   if(
cs_get_user_team(players[i])!=CS_TEAM_SPECTATOR && players[i]>juggernaut)
   {
    
player=players[i]
    break;
   }
  }
  if(!
player)
  {
   if(
players[0]) player=players[0]
   else if(
is_user_connected(juggernaut)) player juggernaut
   
}
  if(
player)
  {
   
health3 get_pcvar_num(hm_jugg_health)
   if(
is_user_connected(juggernaut)) set_user_rendering(juggernaut,kRenderFxNone,0,0,0,kRenderTransAlpha,255)
   
juggernaut=player
   set_user_rendering
(juggernaut,kRenderFxGlowShell,255,255,255,kRenderTransAlpha,70)
   new 
name[32]
   
get_user_name(juggernaut,name,31)
  }
  else
  {
   
juggernaut 0
   set_task
(5.0,"find_new_jn")
  }
 }
}
public 
juggdeath()
{
    if(
get_pcvar_num(juggernautmodecvar))
    {
        if(
read_data(2) == juggernaut)
        {
            new 
jugg read_data(1)   
            
juggernaut jugg
            set_user_health
(juggernautget_pcvar_num(hm_jugg_health))
            
// ...
        
}
 
        else if(
read_data(1) == juggernaut)
                    return 
PLUGIN_CONTINUE
    
}
 
    return 
PLUGIN_CONTINUE
}
public 
toggle_cmd(id,level,cid)
{
 if(!
cmd_access(id,level,cid,2))
 {
  return 
PLUGIN_HANDLED
 
}
 new 
arg1[32]
 
read_argv(1,arg1,31)
 if(
str_to_num(arg1))
 {
  
set_pcvar_num(juggernautmodecvar,1)
  
find_new_jn()
  
server_cmd("sv_restard 5")
 }
 else
 {
  
set_pcvar_num(juggernautmodecvar,0)
  
juggernaut 0
 
}
 return 
PLUGIN_HANDLED

__________________


Last edited by flyeni6; 06-28-2007 at 01:44.
flyeni6 is offline
Send a message via AIM to flyeni6
flyeni6
Senior Member
Join Date: Jun 2006
Location: CAli
Old 06-28-2007 , 04:46   Re: need help on blocking things
Reply With Quote #2

ignore my first post. i've found out the problem: it is because there isn't enough spawn points for 17+ player on one team side.

how can i block this or add more spawn points to both sides of a map(t side and CT side)
__________________

flyeni6 is offline
Send a message via AIM to flyeni6
fxfighter
Veteran Member
Join Date: Feb 2007
Location: Trollhättan
Old 06-28-2007 , 04:51   Re: need help on blocking things
Reply With Quote #3

To add more spawn points you wuld need hammer editor but it might be easyer to just move spawned players to origin next to the spawn.
__________________
If one of my plugins become broken, contact me by mail. [email protected]

Last edited by fxfighter; 06-28-2007 at 05:00.
fxfighter is offline
Send a message via MSN to fxfighter
flyeni6
Senior Member
Join Date: Jun 2006
Location: CAli
Old 06-28-2007 , 05:16   Re: need help on blocking things
Reply With Quote #4

no im trying to do this within the plugin.
any ideas?
thx for replying
__________________

flyeni6 is offline
Send a message via AIM to flyeni6
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 06-28-2007 , 12:11   Re: need help on blocking things
Reply With Quote #5

This should work...

PHP Code:
// Make a counter-terrorist spawn
new ent create_entity("info_player_start");
entity_set_string(entEV_SZ_classname"info_player_start");
entity_set_origin(entFloat{1.01.01.0}); // Set the origin you want the spawn to be
entity_set_int(entEV_INT_solidSOLID_NOT);
entity_set_int(entEV_INT_movetypeMOVETYPE_FLY);
entity_set_size(entFloat{1.01.01.0}, Float{1.01.01.0});

// Make a terrorist spawn
new ent create_entity("info_player_deathmatch");
entity_set_string(entEV_SZ_classname"info_player_deathmatch");
entity_set_origin(entFloat{1.01.01.0}); // Set the origin you want the spawn to be
entity_set_int(entEV_INT_solidSOLID_NOT);
entity_set_int(entEV_INT_movetypeMOVETYPE_FLY);
entity_set_size(entFloat{1.01.01.0}, Float{1.01.01.0}); 
hlstriker is offline
flyeni6
Senior Member
Join Date: Jun 2006
Location: CAli
Old 06-30-2007 , 18:07   Re: need help on blocking things
Reply With Quote #6

ok how can i make 10 new spawns no mater what map it is?
__________________

flyeni6 is offline
Send a message via AIM to flyeni6
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 21:24.


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