Jump to content

How do I make a [GameMaster] Tag


SAbJaN

Recommended Posts

I've tried making a [GameMaster] tag for GOOC, And I don't know how to do it, I've got the ShoDown gaming script, the old version so it does not have the tag, and I can't paste the code in hear because the message would contain 89055 characters, when posts only are allowed 60000,

If you could give me a hand, that would be awesome.

Regards,

-Matt

Link to comment

It seems like you just want us to do it for you, anyhow, I don't think you even have a clue what serverside & clientside are.

https://wiki.multitheftauto.com/wiki/Scr ... troduction

learn first, ask for help after you've tried, ask about anything that's confusing you and whatnot.

Also, this is the script correct?:

function globalOOC(thePlayer, commandName, ...) 
        local logged = tonumber(getElementData(thePlayer, "loggedin")) 
        
        if (logged==1) then 
                if not (...) then 
                        outputChatBox("SYNTAX: /" .. commandName .. " [Message]", thePlayer, 255, 194, 14) 
                else 
                        local oocEnabled = exports.global:getOOCState() 
                        message = table.concat({...}, " ") 
                        local muted = getElementData(thePlayer, "muted") 
                        if (oocEnabled==0) and not (exports.global:isPlayerAdmin(thePlayer)) then 
                                outputChatBox("OOC Chat is currently disabled.", thePlayer, 255, 0, 0) 
                        elseif (muted==1) then 
                                outputChatBox("You are currenty muted from the OOC Chat.", thePlayer, 255, 0, 0) 
                        else 
                                local players = exports.pool:getPoolElementsByType("player") 
                                local playerName = getPlayerName(thePlayer) 
                                local playerID = getElementData(thePlayer, "playerid") 
                                        
                                exports.logs:logMessage("[OOC: Global Chat] " .. playerName .. ": " .. message, 1) 
                                for k, arrayPlayer in ipairs(players) do 
                                        local logged = tonumber(getElementData(arrayPlayer, "loggedin")) 
                                        local targetOOCEnabled = getElementData(arrayPlayer, "globalooc") 
                                        local adminlevel = exports.global:getPlayerAdminLevel(thePlayer) 
                                        title = exports.global:getPlayerAdminTitle(thePlayer) 
                                        if adminlevel >= 4 then 
                                                 color = "#CC0000" 
                                        else 
                                                 color = "#00ff00" 
                                        end 
                                        
                                        if adminlevel == 0 or getElementData(thePlayer,"hiddenadmin") == 1 then 
                                                title = false 
                                        end 
                                        if  exports.global:getPlayerDonatorLevel(thePlayer) > 0 and exports.global:getPlayerAdminLevel(thePlayer) == 0 then 
                                                color = "#CC9933" 
                                                title = "Donator" 
                                        end 
                                        if (logged==1) and (targetOOCEnabled==1) then 
  
                                        if  title and color then 
                                                outputChatBox("(( [GOOC] (" .. playerID .. ") ["..color.."" ..title.. "#ffe4c4] " .. playerName .. ": " .. message.." ))",arrayPlayer, 255,228,196,true) 
                                        else 
                                                outputChatBox("(( [GOOC] (" .. playerID .. ") " .. playerName .. ": " .. message.." ))", arrayPlayer, 255,228,196,true) 
                                        end 
                                        end 
                                end 
                        end 
                end 
        end 
end 
addCommandHandler("o", globalOOC, false, false) 
addCommandHandler("GlobalOOC", globalOOC) 

and how can we help you make gamemaster tag without the gamemaster script's arguments? Search in the gamemode.

Link to comment
It seems like you just want us to do it for you, anyhow, I don't think you even have a clue what serverside & clientside are.

https://wiki.multitheftauto.com/wiki/Scr ... troduction

learn first, ask for help after you've tried, ask about anything that's confusing you and whatnot.

Also, this is the script correct?:

function globalOOC(thePlayer, commandName, ...) 
        local logged = tonumber(getElementData(thePlayer, "loggedin")) 
        
        if (logged==1) then 
                if not (...) then 
                        outputChatBox("SYNTAX: /" .. commandName .. " [Message]", thePlayer, 255, 194, 14) 
                else 
                        local oocEnabled = exports.global:getOOCState() 
                        message = table.concat({...}, " ") 
                        local muted = getElementData(thePlayer, "muted") 
                        if (oocEnabled==0) and not (exports.global:isPlayerAdmin(thePlayer)) then 
                                outputChatBox("OOC Chat is currently disabled.", thePlayer, 255, 0, 0) 
                        elseif (muted==1) then 
                                outputChatBox("You are currenty muted from the OOC Chat.", thePlayer, 255, 0, 0) 
                        else 
                                local players = exports.pool:getPoolElementsByType("player") 
                                local playerName = getPlayerName(thePlayer) 
                                local playerID = getElementData(thePlayer, "playerid") 
                                        
                                exports.logs:logMessage("[OOC: Global Chat] " .. playerName .. ": " .. message, 1) 
                                for k, arrayPlayer in ipairs(players) do 
                                        local logged = tonumber(getElementData(arrayPlayer, "loggedin")) 
                                        local targetOOCEnabled = getElementData(arrayPlayer, "globalooc") 
                                        local adminlevel = exports.global:getPlayerAdminLevel(thePlayer) 
                                        title = exports.global:getPlayerAdminTitle(thePlayer) 
                                        if adminlevel >= 4 then 
                                                 color = "#CC0000" 
                                        else 
                                                 color = "#00ff00" 
                                        end 
                                        
                                        if adminlevel == 0 or getElementData(thePlayer,"hiddenadmin") == 1 then 
                                                title = false 
                                        end 
                                        if  exports.global:getPlayerDonatorLevel(thePlayer) > 0 and exports.global:getPlayerAdminLevel(thePlayer) == 0 then 
                                                color = "#CC9933" 
                                                title = "Donator" 
                                        end 
                                        if (logged==1) and (targetOOCEnabled==1) then 
  
                                        if  title and color then 
                                                outputChatBox("(( [GOOC] (" .. playerID .. ") ["..color.."" ..title.. "#ffe4c4] " .. playerName .. ": " .. message.." ))",arrayPlayer, 255,228,196,true) 
                                        else 
                                                outputChatBox("(( [GOOC] (" .. playerID .. ") " .. playerName .. ": " .. message.." ))", arrayPlayer, 255,228,196,true) 
                                        end 
                                        end 
                                end 
                        end 
                end 
        end 
end 
addCommandHandler("o", globalOOC, false, false) 
addCommandHandler("GlobalOOC", globalOOC) 

and how can we help you make gamemaster tag without the gamemaster script's arguments? Search in the gamemode.

I'm not asking you to do it all for me, I'm asking for help to where to put it, and what the code would look like, and stuff like that, I can't see any GameMaster script arguments, When I search inside the GameMode, it can't find anything, I don't know how to make one or anything. It's the ShoDown Roleplay script, the old one.

Link to comment
                                        if helper > 0 then  
                                            outputChatBox("(( [GOOC] (" .. playerID .. ") [GameMaster] " .. playerName .. ": " .. message.." ))",arrayPlayer, 255,228,196,true) 

Link to comment

Thanks again, for the help.

And again.

[2004-01-09 03:32:47] WARNING: chat-system\s_chat_system.lua:1963: Bad argument @ 'getElementData' [Expected element at argument 1, got nil] 
[2004-01-09 03:32:47] ERROR: chat-system\s_chat_system.lua:1964: attempt to concatenate global 'message' (a nil value) 

Line 1963:

 helper = tonumber(getElementData(v,"helper")) 

Line 1964:

outputChatBox("(( [GOOC] (" .. playerID .. ") [GameMaster] " .. playerName .. ": " .. message.." ))",arrayPlayer, 255,228,196,true) 

Link to comment
function globalOOC(thePlayer, commandName, ...) 
        local logged = tonumber(getElementData(thePlayer, "loggedin")) 
        
        if (logged==1) then 
                if not (...) then 
                        outputChatBox("SYNTAX: /" .. commandName .. " [Message]", thePlayer, 255, 194, 14) 
                else 
                        local oocEnabled = exports.global:getOOCState() 
                        message = table.concat({...}, " ") 
                        local muted = getElementData(thePlayer, "muted") 
                        if (oocEnabled==0) and not (exports.global:isPlayerAdmin(thePlayer)) then 
                                outputChatBox("OOC Chat is currently disabled.", thePlayer, 255, 0, 0) 
                        elseif (muted==1) then 
                                outputChatBox("You are currenty muted from the OOC Chat.", thePlayer, 255, 0, 0) 
                        else 
                                local players = exports.pool:getPoolElementsByType("player") 
                                local playerName = getPlayerName(thePlayer) 
                                local playerID = getElementData(thePlayer, "playerid") 
                                        
                                exports.logs:logMessage("[OOC: Global Chat] " .. playerName .. ": " .. message, 1) 
                                for k, arrayPlayer in ipairs(players) do 
                                        local logged = tonumber(getElementData(arrayPlayer, "loggedin")) 
                                        local targetOOCEnabled = getElementData(arrayPlayer, "globalooc") 
                                        local adminlevel = exports.global:getPlayerAdminLevel(thePlayer) 
                                        title = exports.global:getPlayerAdminTitle(thePlayer) 
                                        local helper = tonumber(getElementData(thePlayer,"helper")) 
                                        if adminlevel >= 4 then 
                                                 color = "#CC0000" 
                                        else 
                                                 color = "#00ff00" 
                                        end 
  
                                        if adminlevel == 0 or getElementData(thePlayer,"hiddenadmin") == 1 then 
                                                title = false 
                                        end 
                                        if  exports.global:getPlayerDonatorLevel(thePlayer) > 0 and exports.global:getPlayerAdminLevel(thePlayer) == 0 then 
                                                color = "#CC9933" 
                                                title = "Donator" 
                                        end 
                                         
                                        if (logged==1) and (targetOOCEnabled==1) then 
  
                                        if  title and color then 
                                                outputChatBox("(( [GOOC] (" .. playerID .. ") ["..color.."" ..title.. "#ffe4c4] " .. playerName .. ": " .. message.." ))",arrayPlayer, 255,228,196,true) 
                                        else 
                        if helper > 0 then 
                                            outputChatBox("(( [GOOC] (" .. playerID .. ") [#CC9933GameMaster#ffe4c4] " .. playerName .. ": " .. message.." ))",arrayPlayer, 255,228,196,true) 
                                        else 
                                                outputChatBox("(( [GOOC] (" .. playerID .. ") " .. playerName .. ": " .. message.." ))", arrayPlayer, 255,228,196,true) 
                                                    end 
                                                end 
                                            end 
                                        end 
                                end 
                        end 
                end 
        end 
addCommandHandler("o", globalOOC, false, false) 
addCommandHandler("GlobalOOC", globalOOC) 

also it's helper = tonumber(getElementData(thePlayer,"helper"))

and use [lua] [/ lua] tags

Edited by Guest
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...