Jump to content

Basemode ID Tag Script


Recommended Posts

Posted (edited)

Hey all, i am making a cool script for basemode :D, and i need some help, because i do not understand getElementData

i am using it too get the Scoreboard column called ID.

Solved

Any ideas, btw, i have a funny feeling some guys in suits will take this script. hmm, i am not going to say names.

Edited by Guest
Posted

seems like you took some yourself, judging by "thePlayer" variable that doesn't even exist in your handler function.

Posted

data shown in the scoreboard is taken from element data. so:

  
function idtag(text, msgtype) 
  local tag = getElementData(source, "ID") -- its source, not thePlayer 
  if tag then 
    cancelEvent() 
    local name = getPlayerName(source) 
    outputChatBox("#FF0000["..tag.."] #FFFFFF"..name..": "..text, root, 255, 255, 255, true) 
    outputServerLog(name .. ": " .. text)     
  end 
end 
addEventHandler("onPlayerChat", root, idtag) 
  

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