codeluaeveryday Posted October 5, 2011 Posted October 5, 2011 (edited) Hey all, i am making a cool script for basemode , 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 October 5, 2011 by Guest Tutorials: => getOnlineAdmins() => [TUT] Better Join Country => [TUT] Updating admin countries => [TUT] Updating admin flags Server: K@N Zombies / Freeroam
Aibo Posted October 5, 2011 Posted October 5, 2011 seems like you took some yourself, judging by "thePlayer" variable that doesn't even exist in your handler function. ?
codeluaeveryday Posted October 5, 2011 Author Posted October 5, 2011 Look, this is my first attempt with getElementType. Omg Please help, i dont understand how to get a data from the scoreboard. do i need to call it? Tutorials: => getOnlineAdmins() => [TUT] Better Join Country => [TUT] Updating admin countries => [TUT] Updating admin flags Server: K@N Zombies / Freeroam
Aibo Posted October 5, 2011 Posted October 5, 2011 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) ?
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