Tokio

[QUESTION] How to add this to the admintag script?

Recommended Posts

I want add a function to the admintag script, but i don't know how to create. When i type this for example: "asd", the script make this automatically to "Asd". And may add to this function special characters? For example: é,á,ű,ő,ó,ú...etc? Those too replace to big letter

 

sorry for my bad english:( 

Share this post


Link to post

Edit this

function Upper(str)
    local first = utfSub(str,1,1):upper()
    return (first..utfSub(str,2,#str))
end


function blockChatMessage(message)
    cancelEvent()
    outputChatBox(getPlayerName(source)..": "..Upper(message),255, 255, 255, true)
end
addEventHandler("onPlayerChat", getRootElement(), blockChatMessage)

 

  • Like 1

Share this post


Link to post

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.