Jump to content

Wanted level...


joao1234

Recommended Posts

Posted

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?

Posted

-- 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 
); 
Posted
-- 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.

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

Posted

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) 

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