joao1234 Posted March 20, 2013 Share Posted March 20, 2013 Hey guys i want to make a wanted level system, but i want to show the player wanted level in his nametag like: *An0n-[WantedLevel] what functions should i use to do it? Link to comment
PaiN^ Posted March 20, 2013 Share Posted March 20, 2013 getPlayerWantedLevel setPlayerNametagText Link to comment
iPrestege Posted March 20, 2013 Share Posted March 20, 2013 -- Server -- Function's getPlayerWantedLevel getPlayerName outputChatBox cancelEvent Event : "onPlayerChat" Try This Server Side : addEventHandler("onPlayerChat",root, function (text, msgtype) local name = getPlayerName( source ); local Wanted = getPlayerWantedLevel ( source ); cancelEvent() outputChatBox("[ "..Wanted.." ] ".. name .. " : " .. text, root, 255, 255, 255, true); end ); Link to comment
Anderl Posted March 20, 2013 Share Posted March 20, 2013 -- Server -- Function's getPlayerWantedLevel getPlayerName outputChatBox cancelEvent Event : "onPlayerChat" Try This Server Side : addEventHandler("onPlayerChat",root, function (text, msgtype) local name = getPlayerName( source ); local Wanted = getPlayerWantedLevel ( source ); cancelEvent() outputChatBox("[ "..Wanted.." ] ".. name .. " : " .. text, root, 255, 255, 255, true); end ); He wants in the nametag, not in the chat. Link to comment
iPrestege Posted March 20, 2013 Share Posted March 20, 2013 -- Server -- Function's getPlayerWantedLevel getPlayerName outputChatBox cancelEvent Event : "onPlayerChat" Try This Server Side : addEventHandler("onPlayerChat",root, function (text, msgtype) local name = getPlayerName( source ); local Wanted = getPlayerWantedLevel ( source ); cancelEvent() outputChatBox("[ "..Wanted.." ] ".. name .. " : " .. text, root, 255, 255, 255, true); end ); He wants in the nametag, not in the chat. Ah , Sorry Will I Will Edit it soon . Link to comment
joao1234 Posted March 20, 2013 Author Share Posted March 20, 2013 yes its in the nametag xDband thx Pai_[N] Link to comment
X-SHADOW Posted March 20, 2013 Share Posted March 20, 2013 it's Easy to do , setTimer ( function () for index,player in pairs (getElementsByType("player")) do setPlayerNametagText(player,getPlayerName(player).."["..tostring(getPlayerWantedLevel (player)).."]") end end , 5000 , 0) 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