SAbJaN Posted April 15, 2012 Share Posted April 15, 2012 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
Charlie_Jefferson Posted April 15, 2012 Share Posted April 15, 2012 Post the script you made. Link to comment
Khtsjefen Posted April 15, 2012 Share Posted April 15, 2012 Look at the admin tags in the script and copy/paste, if you make it happen right it should do. The admin tags that follow the script I mean. (I think at least owner got a tag ) Link to comment
SAbJaN Posted April 15, 2012 Author Share Posted April 15, 2012 Post the script you made. I can't the codes to big, ---------- And I can't find where the admin tags would be? Link to comment
Mefisto_PL Posted April 15, 2012 Share Posted April 15, 2012 Put your code here and send url to us Link to comment
SAbJaN Posted April 16, 2012 Author Share Posted April 16, 2012 Server Side: http://pastebin.com/uRA2XUH0 Client Side: http://pastebin.com/1zqEpcpC Link to comment
Absence2 Posted April 16, 2012 Share Posted April 16, 2012 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
SAbJaN Posted April 16, 2012 Author Share Posted April 16, 2012 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
Absence2 Posted April 16, 2012 Share Posted April 16, 2012 if helper > 0 then outputChatBox("(( [GOOC] (" .. playerID .. ") [GameMaster] " .. playerName .. ": " .. message.." ))",arrayPlayer, 255,228,196,true) Link to comment
SAbJaN Posted April 16, 2012 Author Share Posted April 16, 2012 Thanks mate. But now I get this ERROR: chat-system/s_chat_system.lua:1963: attempt to compare number with nil Link to comment
Absence2 Posted April 16, 2012 Share Posted April 16, 2012 and what line is line 1963? Link to comment
Absence2 Posted April 16, 2012 Share Posted April 16, 2012 helper = tonumber(getElementData(thePlayer,"helper")) if helper > 0 then Link to comment
SAbJaN Posted April 16, 2012 Author Share Posted April 16, 2012 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
Absence2 Posted April 16, 2012 Share Posted April 16, 2012 (edited) 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 April 16, 2012 by Guest Link to comment
SAbJaN Posted April 16, 2012 Author Share Posted April 16, 2012 Thanks so much dude, It works. 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