Jump to content

Help mapmanager


JuniorMelo

Recommended Posts

Posted

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 

Posted

any errors? Cause the way of thinking is correct;

local team = getPlayerTeam ( player ); 
if ( team == getTeamFromName ( "" ) ) then 
--make it start the map 
end 

Posted
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

Posted

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

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

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