Jump to content

please help


Kenix

Recommended Posts

Posted

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 ) 
  

Posted (edited)

not working properly, it must scan if that team is 0 players endgame and he immediately crawls :(

edit: He has to check if 0 then.

Edited by Guest
Posted

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 ) 

Posted
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 ) 
  

Posted

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?

Posted
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

Posted

accidentally looked out the window server and saw that when people do not have it on the server switches maps. :(

but when people on the server script does not work.

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...