• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua action + broadcastmessage

EduardoQuintela

New Member
Joined
Mar 10, 2014
Messages
27
Reaction score
1
Hello Community,

How do I put the player name on broadcastmessage?

function onUse(player, item, fromPosition, target, toPosition, isHotkeym, cid)



function onUse(player, item, fromPosition, target, toPosition, isHotkeym, cid)


if target.itemid == 26398 then
target:transform(26443)
target:decay()
item:remove(1)
broadcastMessage("|player| improved Zap Plate to +1", MESSAGE_EVENT_ADVANCE)
return true
end

end
 
for future reference, read these before posting in the support board again:
How to display CODE properly in your post
Rules for the Support board

Lua:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    if target.itemid == 26398 then
        target:transform(26443)
        target:decay()
        item:remove(1)
        broadcastMessage(player:getName() .." improved Zap Plate to +1", MESSAGE_EVENT_ADVANCE)
    end
    return true
end
 
Solution
Back
Top