Jump to content

[PLEASE] Script


1LoL1

Recommended Posts

That can be done with just a few lines of code:
function announce(plr, text) 
    outputChatBox(text, root, 255, 255, 255, true) -- Accept color codes as well 
end 
addCommandHandler("dann", announce) 
addCommandHandler("ann", announce) 

It's not really worth to pay for that.

I think when I enter /dann so I text runs up the middle of the screen and a little graphs and when I enter only /dann so it disappears .. and /ann just as admin text

SSSSE.png

Link to comment

Here is serverside command for chatbox output (/ann text):

function shoutAdmin(plr, cmd, ...) 
    local msg = table.concat({...}, " ") 
    outputChatBox("Admin "..getPlayerName(plr)..": "..msg, root, 200, 0, 0) 
end 
addCommandHandler("ann", shoutAdmin) 

And here is the clientside command (/dann text) for custom shout:

local sx, sy = guiGetScreenSize() 
local isShowing = false 
  
function showMessage() 
    dxDrawText(text, sx/2, sy/2, sx, sy, tocolor(255, 255, 255, 255), 2, "sans") 
    isShowing = true 
end 
  
function renderText(cmd, ...) 
    if (not isShowing) then 
        text = table.concat({...}," ") 
        addEventHandler("onClientRender", root, showMessage) 
    else 
        removeEventHandler("onClientRender", root, showMessage) 
        isShowing = false 
    end 
end 
addCommandHandler("dann", renderText) 

Link to comment
Here is serverside command for chatbox output (/ann text):
function shoutAdmin(plr, cmd, ...) 
    local msg = table.concat({...}, " ") 
    outputChatBox("Admin "..getPlayerName(plr)..": "..msg, root, 200, 0, 0) 
end 
addCommandHandler("ann", shoutAdmin) 

And here is the clientside command (/dann text) for custom shout:

local sx, sy = guiGetScreenSize() 
local isShowing = false 
  
function showMessage() 
    dxDrawText(text, sx/2, sy/2, sx, sy, tocolor(255, 255, 255, 255), 2, "sans") 
    isShowing = true 
end 
  
function renderText(cmd, ...) 
    if (not isShowing) then 
        text = table.concat({...}," ") 
        addEventHandler("onClientRender", root, showMessage) 
    else 
        removeEventHandler("onClientRender", root, showMessage) 
        isShowing = false 
    end 
end 
addCommandHandler("dann", renderText) 

its very good.. but can you please use only Admin.

And even when I enter this please ~ only on one row down so Somehow

1 test~2 test~3 test

1 test

2 test

3 test

Please do terribly

Link to comment
Its so easy, JR10 meant like this: use this resource https://community.multitheftauto.com/index.php?p= ... ls&id=4448

And add export this to your script by:

function outputAdminMessage(cmd, ...) 
    local text = table.concat({...}, " ") 
    exports["guimessages"]:outputServer(text, 200, 0, 0) -- Replace "guimessages" with folder name in which you placed the downloaded resource. 
end 

Please can you edit my code? i want to Samp /dann not MTA :/

Link to comment
Its so easy, JR10 meant like this: use this resource https://community.multitheftauto.com/index.php?p= ... ls&id=4448

And add export this to your script by:

function outputAdminMessage(cmd, ...) 
    local text = table.concat({...}, " ") 
    exports["guimessages"]:outputServer(text, 200, 0, 0) -- Replace "guimessages" with folder name in which you placed the downloaded resource. 
end 

i want to Samp /dann not MTA :/

What?

Link to comment
Its so easy, JR10 meant like this: use this resource https://community.multitheftauto.com/index.php?p= ... ls&id=4448

And add export this to your script by:

function outputAdminMessage(cmd, ...) 
    local text = table.concat({...}, " ") 
    exports["guimessages"]:outputServer(text, 200, 0, 0) -- Replace "guimessages" with folder name in which you placed the downloaded resource. 
end 

i want to Samp /dann not MTA :/

What?

Here is serverside command for chatbox output (/ann text):
function shoutAdmin(plr, cmd, ...) 
    local msg = table.concat({...}, " ") 
    outputChatBox("Admin "..getPlayerName(plr)..": "..msg, root, 200, 0, 0) 
end 
addCommandHandler("ann", shoutAdmin) 

And here is the clientside command (/dann text) for custom shout:

local sx, sy = guiGetScreenSize() 
local isShowing = false 
  
function showMessage() 
    dxDrawText(text, sx/2, sy/2, sx, sy, tocolor(255, 255, 255, 255), 2, "sans") 
    isShowing = true 
end 
  
function renderText(cmd, ...) 
    if (not isShowing) then 
        text = table.concat({...}," ") 
        addEventHandler("onClientRender", root, showMessage) 
    else 
        removeEventHandler("onClientRender", root, showMessage) 
        isShowing = false 
    end 
end 
addCommandHandler("dann", renderText) 

its very good.. but can you please use only Admin.

And even when I enter this please ~ only on one row down so Somehow

1 test~2 test~3 test

1 test

2 test

3 test

Please do terribly

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