Kenix Posted December 29, 2010 Share Posted December 29, 2010 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
Castillo Posted December 29, 2010 Share Posted December 29, 2010 not sure but maybe if you change: if survivorsCount ~= 0 then to: if survivorsCount == 0 then ? Link to comment
Kenix Posted December 29, 2010 Author Share Posted December 29, 2010 (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 December 29, 2010 by Guest Link to comment
Aibo Posted December 29, 2010 Share Posted December 29, 2010 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
Kenix Posted December 29, 2010 Author Share Posted December 29, 2010 (edited) not work edit: I do not want to count and compare. Edited December 29, 2010 by Guest Link to comment
Kenix Posted December 29, 2010 Author Share Posted December 29, 2010 debug check does not work. Link to comment
Aibo Posted December 29, 2010 Share Posted December 29, 2010 not work edit: I do not want to count and compare. omg, then what do you want? Link to comment
Kenix Posted December 29, 2010 Author Share Posted December 29, 2010 not work edit: I do not want to count and compare. omg, then what do you want? not work Link to comment
Castillo Posted December 30, 2010 Share Posted December 30, 2010 maybe tell us what doesn't works? Link to comment
Kenix Posted December 30, 2010 Author Share Posted December 30, 2010 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
DakiLLa Posted December 30, 2010 Share Posted December 30, 2010 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
Kenix Posted December 30, 2010 Author Share Posted December 30, 2010 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
Kenix Posted December 30, 2010 Author Share Posted December 30, 2010 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. Link to comment
Castillo Posted December 31, 2010 Share Posted December 31, 2010 Stop triple-posting! wait for a f*** answer. Link to comment
Aibo Posted December 31, 2010 Share Posted December 31, 2010 i doubt anyone understands the f*** question. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now