Jump to content

[HELP] MarkerHit PlayerName


Imposter

Recommended Posts

serverside

  
function giveClue ( hitElement, matchingDimension) 
    destroyElement( clueMarker ) 
    local cash = math.random( 10000, 15000 ) 
    givePlayerMoney ( hitElement, cash ) 
    outputChatBox ( hitElement .. " has found the clue, he got $" .. cash .. "! The new clue will be spawned in 10 minutes!" ) 
    setTimer ( putClue, 600000, 1 ) 
end 
  

i need the player name but get this error

[2012-07-25 10:08:16] ERROR: [roleplay]\clue\server.lua:6: attempt to concatenate local 'hitElement ' (a userdata value)

Link to comment
function giveClue ( hitElement, matchingDimension) 
    destroyElement( clueMarker ) 
    local cash = math.random( 10000, 15000 ) 
    givePlayerMoney ( hitElement, cash ) 
    outputChatBox(getPlayerName(hitElement).." has found the clue, he got $" .. cash .. "! The new clue will be spawned in 10 minutes!") 
    setTimer ( putClue, 600000, 1 ) 
end 

Link to comment

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