JuniorMelo Posted November 12, 2013 Share Posted November 12, 2013 I have a problem with the script mapmanager I'm trying for change put the map just for hunter team,but am not getting can help me =-= I am using this line in mapmanager team = getPlayerTeam ( player ) Name = getTeamFromName ( "HUNTER" ) if ( team ) == Name then Link to comment
tosfera Posted November 12, 2013 Share Posted November 12, 2013 any errors? Cause the way of thinking is correct; local team = getPlayerTeam ( player ); if ( team == getTeamFromName ( "" ) ) then --make it start the map end Link to comment
JuniorMelo Posted November 12, 2013 Author Share Posted November 12, 2013 any errors? Cause the way of thinking is correct; local team = getPlayerTeam ( player ); if ( team == getTeamFromName ( "" ) ) then --make it start the map end Thanks, I'll try Link to comment
JuniorMelo Posted November 13, 2013 Author Share Posted November 13, 2013 I am wanting to put this function, to activate only for the team hunter function changeGamemodeMap_cmd(source, command, ...) local team = getPlayerTeam ( source ); if ( team == getTeamFromName ( "HUNTER" ) ) then local mapName = #{...}>0 and table.concat({...},' ') or nil source = source or serverConsole local map if mapName then map = getMapFromName(mapName) if not isMap(map) then if (refreshResources and hasObjectPermissionTo(getThisResource(), "function.refreshResources", false)) then outputMapManager("'"..mapName.."' is not a valid map.", source) else outputMapManager("'"..mapName.."' is not a valid map. Use the refresh command and try again", source) end return false end else outputMapManager("Usage: /"..command.." map",source) return false end local gamemode = currentGamemode if not isGamemode(gamemode) then outputMapManager("No gamemode is running.",source) elseif not isMapCompatibleWithGamemode(map, gamemode) then outputMapManager("Map '"..getResourceName(map).. "' is not compatible with '"..getResourceName(gamemode).."'.",source) else setInstigator( source ) changeGamemodeMap(map, gamemode) end end end No Work, the screen goes black for another team Link to comment
Castillo Posted November 13, 2013 Share Posted November 13, 2013 Because it's not as simple as that. Link to comment
JuniorMelo Posted November 14, 2013 Author Share Posted November 14, 2013 Because it's not as simple as that. you could answer me, because when the map changes the screen goes black for other teams ? I'm trying to get to change the map only team HUNTER ! sorry my bad english 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