Jump to content

don't work


manve1

Recommended Posts

Posted

the script i made doesn't output any debugscript 3 or something in chat :|

        function cry_baby( ) 
                setTimer ( 
                    outputChatBox, 
                    100, 
                    1, 
                    "#FF0000 Cries like a baby #0000FF (( #FFFFFF".. getPlayerName(source) .."#0000FF ))", 
                    source, 
                    255, 
                    255, 
                    255, 
                    true 
                ) 
            end 
        end 
    addCommandHandler( "cry", cry_baby ) 

Looking for tutorials or information? check out: www.simpleask.co.uk

Posted (edited)

source isn't defined

try this:

function cry_baby(source) 
    setTimer(outputChatBox,100,1,"#FF0000 Cries like a baby #0000FF (( #FFFFFF".. getPlayerName(source) .."#0000FF ))",source,255,255,255,true) 
end 
addCommandHandler( "cry", cry_baby ) 

BTW, make sure this is server-side, but if it's client-side try this:

function cry_baby() 
    local source = localPlayer 
    setTimer(outputChatBox,100,1,"#FF0000 Cries like a baby #0000FF (( #FFFFFF".. getPlayerName(source) .."#0000FF ))",source,255,255,255,true) 
end 
addCommandHandler( "cry", cry_baby ) 

Edited by Guest

My in-game name: Jaysds1

Retired CMG Scripter

World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode

Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/

 

sE5Qm.png

TiV3C.png

img.php?id=0&text=Lua%20Scripter

Posted
the script i made doesn't output any debugscript 3 or something in chat :|
        function cry_baby( ) 
                setTimer ( 
                    outputChatBox, 
                    100, 
                    1, 
                    "#FF0000 Cries like a baby #0000FF (( #FFFFFF".. getPlayerName(source) .."#0000FF ))", 
                    source, 
                    255, 
                    255, 
                    255, 
                    true 
                ) 
            end 
        end 
    addCommandHandler( "cry", cry_baby ) 

Why a 100ms timer? it's basically the same as outputting the text right after typing the command ._.

"[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007

Posted
the script i made doesn't output any debugscript 3 or something in chat :|
        function cry_baby( ) 
                setTimer ( 
                    outputChatBox, 
                    100, 
                    1, 
                    "#FF0000 Cries like a baby #0000FF (( #FFFFFF".. getPlayerName(source) .."#0000FF ))", 
                    source, 
                    255, 
                    255, 
                    255, 
                    true 
                ) 
            end 
        end 
    addCommandHandler( "cry", cry_baby ) 

Why a 100ms timer? it's basically the same as outputting the text right after typing the command ._.

because it is? i want it to be like this :)

Looking for tutorials or information? check out: www.simpleask.co.uk

Posted
the script i made doesn't output any debugscript 3 or something in chat :|
        function cry_baby( ) 
                setTimer ( 
                    outputChatBox, 
                    100, 
                    1, 
                    "#FF0000 Cries like a baby #0000FF (( #FFFFFF".. getPlayerName(source) .."#0000FF ))", 
                    source, 
                    255, 
                    255, 
                    255, 
                    true 
                ) 
            end 
        end 
    addCommandHandler( "cry", cry_baby ) 

Why a 100ms timer? it's basically the same as outputting the text right after typing the command ._.

because it is? i want it to be like this :)

That makes no sense.

"[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007

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