Jump to content

Help my script


Flipi

Recommended Posts

Posted

whats is the problem :/? I throws an error

function player () 
    local join = getPlayerName ( source ) 
    local text = source, "#FFFFFF" ..join.. " #0080FFis logged!" 
    dxDrawText( text, 25,166.09, screenWidth, screenHeight, tocolor(0,0,0), 1.2, "default-bold","left") 
    dxDrawText( text, 24,166.09, screenWidth, screenHeight, tocolor(0,128,255), 1.2, "default-bold","left")    
end 
addEventHandler ( "onPlayerLogin", getRootElement(), player ) 

Posted
local tunaColor = tocolor(255, 0, 0, 255) 
function player () 
    local join = getPlayerName ( source ) 
    local text = source, "#FFFFFF" ..join.. " #0080FFis logged!" 
    dxDrawText( text, 25,166.09, screenWidth, screenHeight, tocolor(0,0,0), 1.2, "default-bold","left") 
    dxDrawText( text, 24,166.09, screenWidth, screenHeight, tocolor(0,128,255), 1.2, "default-bold","left")    
end 
addEventHandler ( "onPlayerLogin", getRootElement(), player ) 

tocolor wasn't defined, try now.

YOU HAVE TO TRUST SOMEONE TO BE BETRAYED.I NEVER DID

Posted

check wiki examples and it's functions explanation and you will know what you need to do.

YOU HAVE TO TRUST SOMEONE TO BE BETRAYED.I NEVER DID

Posted

GUI and DX functions / events are all client sided. If you need something that is server side only ( getPlayerAccount, setAccountData etc) then use triggerClientEvent from server side, else do the whole script client side.

Posted
GUI and DX functions / events are all client sided. If you need something that is server side only ( getPlayerAccount, setAccountData etc) then use triggerClientEvent from server side, else do the whole script client side.

ah ok thanks :D!

  • Moderators
Posted

this is how you do that serverside.

https://wiki.multitheftauto.com/wiki/TextCreateDisplay

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

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