Jump to content

Roleplay commands and proximity


Antoni

Recommended Posts

I am unsure of the /do command as I'm sure its an RP command, but I can help you with the /me command locally, I made this small script for my K@N Zombies server some time ago:

You may also use the function again:

function outputNearElement(message, element, red, green, blue, bool, chatRadius) 
    local posX, posY, posZ = getElementPosition(element) 
    local chatSphere = createColSphere(posX, posY, posZ, chatRadius) 
    local nearbyPlayers = getElementsWithinColShape(chatSphere, "player") 
    destroyElement(chatSphere) 
    for i, v in ipairs(nearbyPlayers) do 
        outputChatBox(message, v, red, green, blue, bool) 
    end 
end 
  
addEventHandler('onPlayerChat', getRootElement(), 
function(message, mType) 
    if mType == 1 then 
        cancelEvent() 
        outputNearElement('* '..getPlayerName(source):gsub('#%x%x%x%x%x%x', '')..' '..message, source, 255, 0, 255, true, 30) 
    end 
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...