Jump to content

please help


Kenix

Recommended Posts

script not working :(

the logic of the script: to crawl if the team "survivors"has run out of players then run a function endgame.

tried to debug script errors no =(

  
g_Root = getRootElement() 
  
function mapstart() 
    local survivorsCount = 0 
for i, player in ipairs(getPlayersInTeam(teamSurvivor)) do  
if survivorsCount ~= 0 then       
 Endgame(teamzombie, true)  
 end 
end 
end  
addEventHandler ( "onGamemodeMapStart", g_Root, mapstart ) 
  

Link to comment

this is nonsense, if you want to count players in team, then:

g_Root = getRootElement() 
  
function mapstart() 
   if countPlayersInTeam(teamSurvivor) == 0 then 
     Endgame(teamzombie, true) 
   end 
end 
addEventHandler ( "onGamemodeMapStart", g_Root, mapstart ) 

Link to comment
maybe tell us what doesn't works?

script does not work :( no errors in debug Pamo error check == 0

EDIT: tried like this but did not get.

  
g_Root = getRootElement() 
  
function MapStart() 
 if countPlayersInTeam(teamSurvivor) and getAlivePlayers () == 0 then 
     outputChatBox ( "1" ) 
     Endgame(teamzombie, true) 
     outputChatBox ( "2" ) 
   end 
end 
addEventHandler ( "onGamemodeMapStart", g_Root, MapStart ) 
  

Link to comment

Following by the "if the team "survivors"has run out of players":

g_Root = getRootElement() 
  
function mapstart() 
  if countPlayersInTeam( teamSurvivor ) == 0 then 
    Endgame(teamzombie, true) 
  end 
end 
addEventHandler ( "onGamemodeMapStart", g_Root, mapstart ) 

uh?

Link to comment
Following by the "if the team "survivors"has run out of players":
g_Root = getRootElement() 
  
function mapstart() 
  if countPlayersInTeam( teamSurvivor ) == 0 then 
    Endgame(teamzombie, true) 
  end 
end 
addEventHandler ( "onGamemodeMapStart", g_Root, mapstart ) 

uh?

yeah right. DakiLLa

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...