Raised This Month: $ Target: $400
 0% 

combined kills????


Post New Thread Reply   
 
Thread Tools Display Modes
Lee
AlliedModders Donor
Join Date: Feb 2006
Old 06-20-2007 , 13:38   Re: combined kills????
Reply With Quote #21

How do you mean?
Lee is offline
flyeni6
Senior Member
Join Date: Jun 2006
Location: CAli
Old 06-20-2007 , 13:48   Re: combined kills????
Reply With Quote #22

k this is what i have
PHP Code:
else if(get_pcvar_num(teamslayermodecvar))
 {
  new 
teamslayerkills get_pcvar_num(hm_teamslayer_kills)
  if(
teamslayerkills 0)
  {
   switch(
cs_get_user_team(killer))
   {
   
// Red Team
   
case CS_TEAM_T:
    
//When Red Team Wins
    
if(++terrorist_kills >= teamslayerkills && !teamkill && !selfkill)
    {
     
kill_limit_reached()
     
set_hudmessage(02550, -1.0, -1.006.012.0)
     
show_hudmessage(0"Red Team WINS!")
     for (
i=1i<=3i++)
      
halo_chat(0,TEAM_COLOR"Red Team ^x04WINS!")
     
halo_chat(0,TEAM_COLOR"Red Team has made ^x04%i kills"teamslayerkills)
     
set_task(0.2"after_win",id)
     
set_task(10.0,"restart_match",id)
    }
    
    
//Blue Team
    
case CS_TEAM_CT:
  
    
//When Red Team Wins
    
if(++ct_kills >= teamslayerkills && !teamkill && !selfkill)
    {
     
kill_limit_reached()
     
set_hudmessage(02550, -1.0, -1.006.012.0)
     
show_hudmessage(0"Blue Team WINS!")
     for (
i=1i<=3i++)
      
halo_chat(0,TEAM_COLOR"Blue Team ^x04WINS!")
     
halo_chat(0,TEAM_COLOR"Blue Team has made ^x04%i kills"teamslayerkills)
     
set_task(0.2"after_win",id)
     
set_task(10.0,"restart_match",id)
    }
   }
  }
  else if(
teamslayerkills <= 0)
  {
   
set_task(3.0,"mapendtswin"0__"d")
  }
 
public 
mapendtswin(id)
{
 new 
i
 
new killer read_data(1)
 if(!
get_pcvar_num(teamslayermodecvar)) return PLUGIN_CONTINUE
 
switch(cs_get_user_team(killer))
 {
  
// Red Team
  
case CS_TEAM_T:
   
//When Red Team Wins
   
if(terrorist_kills ct_kills)
   {
     
set_hudmessage(02550, -1.0, -1.006.012.0)
     
show_hudmessage(0"Red Team WINS!")
     for (
i=1i<=3i++)
      
halo_chat(0,TEAM_COLOR"Red Team ^x04WINS!")
     
set_task(0.2"after_win",id)
     
set_task(10.0,"restart_match",id)
   }
    
  
//Blue Team
  
case CS_TEAM_CT:
  
  if(
ct_kills terrorist_kills)
  {
     
set_hudmessage(02550, -1.0, -1.006.012.0)
     
show_hudmessage(0"Blue Team WINS!")
     for (
i=1i<=3i++)
      
halo_chat(0,TEAM_COLOR"Blue Team ^x04WINS!")
     
set_task(0.2"after_win",id)
     
set_task(10.0,"restart_match",id)
    }
   }
  }
    
 }
 return 
PLUGIN_CONTINUE 
it doesnt work.

in console it says
"L 06/20/2007 - 1011: [CSTRIKE] Player out of range (0)
L 06/20/2007 - 1011: [AMXX] Run time error 10 (plugin "halomod.amxx") (native "cs_get_user_team") - debug not enabled"
__________________

flyeni6 is offline
Send a message via AIM to flyeni6
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 06-20-2007 , 13:53   Re: combined kills????
Reply With Quote #23

Quote:
Originally Posted by flyeni6 View Post
k this is what i have
PHP Code:
else if(get_pcvar_num(teamslayermodecvar))
 {
  new 
teamslayerkills get_pcvar_num(hm_teamslayer_kills)
  if(
teamslayerkills 0)
  {
   switch(
cs_get_user_team(killer))
   {
   
// Red Team
   
case CS_TEAM_T:
    
//When Red Team Wins
    
if(++terrorist_kills >= teamslayerkills && !teamkill && !selfkill)
    {
     
kill_limit_reached()
     
set_hudmessage(02550, -1.0, -1.006.012.0)
     
show_hudmessage(0"Red Team WINS!")
     for (
i=1i<=3i++)
      
halo_chat(0,TEAM_COLOR"Red Team ^x04WINS!")
     
halo_chat(0,TEAM_COLOR"Red Team has made ^x04%i kills"teamslayerkills)
     
set_task(0.2"after_win",id)
     
set_task(10.0,"restart_match",id)
    }
    
    
//Blue Team
    
case CS_TEAM_CT:
  
    
//When Red Team Wins
    
if(++ct_kills >= teamslayerkills && !teamkill && !selfkill)
    {
     
kill_limit_reached()
     
set_hudmessage(02550, -1.0, -1.006.012.0)
     
show_hudmessage(0"Blue Team WINS!")
     for (
i=1i<=3i++)
      
halo_chat(0,TEAM_COLOR"Blue Team ^x04WINS!")
     
halo_chat(0,TEAM_COLOR"Blue Team has made ^x04%i kills"teamslayerkills)
     
set_task(0.2"after_win",id)
     
set_task(10.0,"restart_match",id)
    }
   }
  }
  else if(
teamslayerkills <= 0)
  {
   
set_task(3.0,"mapendtswin"0__"d")
  }
 
public 
mapendtswin(id)
{
 new 
i
 
new killer read_data(1)
 if(!
get_pcvar_num(teamslayermodecvar)) return PLUGIN_CONTINUE
 
switch(cs_get_user_team(killer))
 {
  
// Red Team
  
case CS_TEAM_T:
   
//When Red Team Wins
   
if(terrorist_kills ct_kills)
   {
     
set_hudmessage(02550, -1.0, -1.006.012.0)
     
show_hudmessage(0"Red Team WINS!")
     for (
i=1i<=3i++)
      
halo_chat(0,TEAM_COLOR"Red Team ^x04WINS!")
     
set_task(0.2"after_win",id)
     
set_task(10.0,"restart_match",id)
   }
    
  
//Blue Team
  
case CS_TEAM_CT:
  
  if(
ct_kills terrorist_kills)
  {
     
set_hudmessage(02550, -1.0, -1.006.012.0)
     
show_hudmessage(0"Blue Team WINS!")
     for (
i=1i<=3i++)
      
halo_chat(0,TEAM_COLOR"Blue Team ^x04WINS!")
     
set_task(0.2"after_win",id)
     
set_task(10.0,"restart_match",id)
    }
   }
  }
    
 }
 return 
PLUGIN_CONTINUE 
it doesnt work.

in console it says
"L 06/20/2007 - 1011: [CSTRIKE] Player out of range (0)
L 06/20/2007 - 1011: [AMXX] Run time error 10 (plugin "halomod.amxx") (native "cs_get_user_team") - debug not enabled"
Show the whole function
Deviance is offline
flyeni6
Senior Member
Join Date: Jun 2006
Location: CAli
Old 06-20-2007 , 13:59   Re: combined kills????
Reply With Quote #24

PHP Code:
public on_game_win(id)
{
 
 if(!
get_pcvar_num(hm_on)) return PLUGIN_CONTINUE
 
 
new i
 
new killer read_data(1)
 new 
victim read_data(2
 new 
selfkill = (killer == victim)
 new 
teamkill =get_user_team(killer) == get_user_team(victim)
 new 
slayerkills get_pcvar_num(hm_slayer_kills
 
get_user_name(killerkillername32)
 
get_user_name(victimvictimname32)
 
// Is Team slayermode active?
 
if(get_pcvar_num(teamslayermodecvar))
 {
  new 
teamslayerkills get_pcvar_num(hm_teamslayer_kills)
  if(
teamslayerkills 0)
  {
   switch(
cs_get_user_team(killer))
   {
   
// Red Team
   
case CS_TEAM_T:
    
//When Red Team Wins
    
if(++terrorist_kills >= teamslayerkills && !teamkill && !selfkill)
    {
     
kill_limit_reached()
     
set_hudmessage(02550, -1.0, -1.006.012.0)
     
show_hudmessage(0"Red Team WINS!")
     for (
i=1i<=3i++)
      
halo_chat(0,TEAM_COLOR"Red Team ^x04WINS!")
     
halo_chat(0,TEAM_COLOR"Red Team has made ^x04%i kills"teamslayerkills)
     
set_task(0.2"after_win",id)
     
set_task(10.0,"restart_match",id)
    }
    
    
//Blue Team
    
case CS_TEAM_CT:
  
    
//When Red Team Wins
    
if(++ct_kills >= teamslayerkills && !teamkill && !selfkill)
    {
     
kill_limit_reached()
     
set_hudmessage(02550, -1.0, -1.006.012.0)
     
show_hudmessage(0"Blue Team WINS!")
     for (
i=1i<=3i++)
      
halo_chat(0,TEAM_COLOR"Blue Team ^x04WINS!")
     
halo_chat(0,TEAM_COLOR"Blue Team has made ^x04%i kills"teamslayerkills)
     
set_task(0.2"after_win",id)
     
set_task(10.0,"restart_match",id)
    }
   }
  }
  else if(
teamslayerkills <= 0)
  {
   
set_task(3.0,"mapendtswin"0__"d")
  }
    
 }
 return 
PLUGIN_CONTINUE
}
public 
mapendtswin(id)
{
 new 
i
 
new killer read_data(1)
 if(!
get_pcvar_num(teamslayermodecvar)) return PLUGIN_CONTINUE
 
switch(cs_get_user_team(killer))
 {
  
// Red Team
  
case CS_TEAM_T:
   
//When Red Team Wins
   
if(terrorist_kills ct_kills)
   {
     
set_hudmessage(02550, -1.0, -1.006.012.0)
     
show_hudmessage(0"Red Team WINS!")
     for (
i=1i<=3i++)
      
halo_chat(0,TEAM_COLOR"Red Team ^x04WINS!")
     
set_task(0.2"after_win",id)
     
set_task(10.0,"restart_match",id)
   }
    
  
//Blue Team
  
case CS_TEAM_CT:
  
  if(
ct_kills terrorist_kills)
  {
     
set_hudmessage(02550, -1.0, -1.006.012.0)
     
show_hudmessage(0"Blue Team WINS!")
     for (
i=1i<=3i++)
      
halo_chat(0,TEAM_COLOR"Blue Team ^x04WINS!")
     
set_task(0.2"after_win",id)
     
set_task(10.0,"restart_match",id)
  }
 }

my bad
__________________

flyeni6 is offline
Send a message via AIM to flyeni6
flye
BANNED
Join Date: May 2007
Old 06-20-2007 , 18:36   Re: combined kills????
Reply With Quote #25

nice code. u makin a halo mod?
flye is offline
flyeni6
Senior Member
Join Date: Jun 2006
Location: CAli
Old 06-20-2007 , 23:05   Re: combined kills????
Reply With Quote #26

yea look at my sig

yea so does anyone know how to make this unlimited?
ive tried i loop but it was confusing. any suggestions?
__________________

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 20:45.


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