Jump to content

Help dxdrawText :(


^Dev-PoinT^

Recommended Posts

Posted

Hi all who to Make dxdraw Money For Players :(

i have Made Half of it

but i dont understand dxdrawText :(

exports.scoreboard:addScorboardColumn('Money') 
  
function M () 
local money = getPlayerMoney (source) 
setElementData (source, "Money", "$".. money ) 
    end 
end 
addEventHandler ("onPlayerSpawn", getRootElement(), M ) 
  
function xxx () 
local screenWidth, screenHeight = guiGetScreenSize() 
local name = getPlayerName() 
local money = getPlayerMony(thePlayer) 
  

:roll:

Posted

Could you explain us what are you trying to do? because that's a mess of client side functions and server side events.

P.S: Is getPlayerMoney not getPlayerMony.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Can you tell me what the link between this

exports.scoreboard:addScorboardColumn('Money') 
  
function M () 
local money = getPlayerMoney (source) 
setElementData (source, "Money", "$".. money ) 
    end 
end 
addEventHandler ("onPlayerSpawn", getRootElement(), M ) 

and this

function xxx () 
local screenWidth, screenHeight = guiGetScreenSize() 
local name = getPlayerName() 
local money = getPlayerMony(thePlayer) 

you want dxDrawText

i don't understand why you put a script for add money in Scoreboard

----------------

this make no sense.

function xxx () 
local screenWidth, screenHeight = guiGetScreenSize() 
local name = getPlayerName() 
local money = getPlayerMony(thePlayer) 

look at wiki

https://wiki.multitheftauto.com/wiki/GetPlayerName

https://wiki.multitheftauto.com/wiki/DxDrawText

CiTLh.png
Posted

example

local screenWidth, screenHeight = guiGetScreenSize() 
  
function createText ( ) 
    local money = getPlayerMoney(localPlayer) 
    dxDrawText( "Your Money: "..tostring(money), 44, screenHeight-43, screenWidth, screenHeight, tocolor ( 0, 255, 0, 255 ), 1, "pricedown" ) 
end 
addEventHandler("onClientRender",root, createText) 

CiTLh.png
Posted

Thx Tapl For The example i well study it :D

i Made This see

local screenWidth, screenHeight = guiGetScreenSize() 
  
function M ( ) 
local money = getPlayerMoney(localPlayer) 
local ping = getPlayerPing(localPlayer) 
 dxDrawText( "Your Money: "..tostring(money), 44, screenHeight-43, screenWidth, screenHeight, tocolor ( 0, 255, 0, 255 ), 1, "default-bold" ) 
 dxDrawText( "Your Ping: "..tostring(ping), 44, screenHeight-43, screenWidth, screenHeight, tocolor ( 255, 255, 0, 255 ), 1, "default-bold" ) 
end 
addEventHandler("onClientRender",root, createText) 

is it Right?

Posted
local screenWidth, screenHeight = guiGetScreenSize() 
  
function M ( ) 
local money = getPlayerMoney(localPlayer) 
local ping = getPlayerPing(localPlayer) 
 dxDrawText( "Your Money: "..tostring(money), 44, screenHeight-43, screenWidth, screenHeight, tocolor ( 0, 255, 0, 255 ), 1, "default-bold" ) 
 dxDrawText( "Your Ping: "..tostring(ping), 44, screenHeight-43, screenWidth, screenHeight, tocolor ( 255, 255, 0, 255 ), 1, "default-bold" ) 
end 
addEventHandler("onClientRender",root, M) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Can't you edit it?

Next time, look at the function's wiki page.

local screenWidth, screenHeight = guiGetScreenSize() 
  
function M ( ) 
local money = getPlayerMoney(localPlayer) 
local ping = getPlayerPing(localPlayer) 
 dxDrawText( "Your Money: "..tostring(money), 44, screenHeight-43, screenWidth, screenHeight, tocolor ( 0, 255, 0, 255 ), 2, "default-bold" ) 
 dxDrawText( "Your Ping: "..tostring(ping), 44, screenHeight-55, screenWidth, screenHeight, tocolor ( 255, 255, 0, 255 ), 2, "default-bold" ) 
end 
addEventHandler("onClientRender",root, M) 

Business System viewtopic.php?f=108&t=35797

Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726

SQLite Tutorial viewtopic.php?f=148&t=38203

Posted

You're welcome.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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