Jump to content

Little help


-.Paradox.-

Recommended Posts

Posted

Hello all i made this it show levels with images but i have a little problem i want add it to my dxhud

using

  
    local Emblems = getAccountData(account,"LV") 
  
    if emblems and fileExists ( ":experience/ranks/lvl_"..emblems..".png" ) then 
    size = dxGetFontHeight((0.7/1366)*sWidth, "bankgothic") 
    dxDrawImage((557/1024)*sWidth, (745/768)*sHeight, size, size, ":experience/ranks/lvl_"..emblems..".png") 
    end 
  

here is the script i guess there is some errors in it

addEventHandler("onPlayerSpawn",root, 
function() 
    local account = getPlayerAccount(source) 
    local S = getElementData(killer, "Level") 
if tonumber(S) == 0 then 
setElementData(source,"Emblems","ranks/lvl_0.png") 
elseif tonumber(S) == 1 then 
setElementData(source,"Emblems","ranks/lvl_1.png") 
elseif tonumber(S) == 2 then 
setElementData(source,"Emblems","ranks/lvl_2.png") 
elseif tonumber(S) == 3 then 
setElementData(source,"Emblems","ranks/lvl_3.png") 
elseif tonumber(S) == 4 then 
setElementData(source,"Emblems","ranks/lvl_4.png") 
elseif tonumber(S) == 5 then 
setElementData(source,"Emblems","ranks/lvl_5.png") 
elseif tonumber(S) == 6 then 
setElementData(source,"Emblems","ranks/lvl_6.png") 
elseif tonumber(S) == 7 then 
setElementData(source,"Emblems","ranks/lvl_7.png") 
elseif tonumber(S) == 8 then 
setElementData(source,"Emblems","ranks/lvl_8.png") 
elseif tonumber(S) == 9 then 
setElementData(source,"Emblems","ranks/lvl_9.png") 
elseif tonumber(S) == 10 then 
setElementData(source,"Emblems","ranks/lvl_10.png") 
elseif tonumber(S) == 11 then 
setElementData(source,"Emblems","ranks/lvl_11.png") 
elseif tonumber(S) == 12 then 
setElementData(source,"Emblems","ranks/lvl_12.png") 
elseif tonumber(S) == 13 then 
setElementData(source,"Emblems","ranks/lvl_13.png") 
elseif tonumber(S) == 14 then 
setElementData(source,"Emblems","ranks/lvl_14.png") 
elseif tonumber(S) == 15 then 
setElementData(source,"Emblems","ranks/lvl_15.png") 
elseif tonumber(S) == 16 then 
setElementData(source,"Emblems","ranks/lvl_16.png") 
elseif tonumber(S) == 17 then 
setElementData(source,"Emblems","ranks/lvl_17.png") 
elseif tonumber(S) == 18 then 
setElementData(source,"Emblems","ranks/lvl_18.png") 
elseif tonumber(S) == 19 then 
setElementData(source,"Emblems","ranks/lvl_19.png") 
elseif tonumber(S) == 20 then 
setElementData(source,"Emblems","ranks/lvl_20.png") 
elseif tonumber(S) == 21 then 
setElementData(source,"Emblems","ranks/lvl_21.png") 
elseif tonumber(S) == 22 then 
setElementData(source,"Emblems","ranks/lvl_22.png") 
elseif tonumber(S) == 23 then 
setElementData(source,"Emblems","ranks/lvl_23.png") 
end 
end 
) 
  
addEventHandler("onPlayerSpawn",root, 
function () 
    local account = getPlayerAccount(source) 
    if isGuestAccount(account) then return end 
    local Emblems = getAccountData(account,"LV") 
    if emblems then 
        setElementData(source,"Emblems", emblems) 
end 
end 
) 

And here is my Level system Elements

    local XP = getElementData(localPlayer,"XP") 
    local Level = getElementData(localPlayer,"Level") 

Thanks for helping.

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

Posted

getAccountData is a server side only function.

    local emblems = getElementData ( localPlayer, "Emblems" ) 
    if emblems and fileExists ( ":experience/".. emblems ) then 
        size = dxGetFontHeight((0.7/1366)*sWidth, "bankgothic") 
        dxDrawImage((557/1024)*sWidth, (745/768)*sHeight, size, size, ":experience/".. emblems ) 
    end 

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

okay thanks gonna try

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

Posted

Wont work nothing in debug .-.

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

Posted

Mind posting the complete script?

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

exp system or the other one?

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

Posted

The one that has to draw the image.

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
addEventHandler("onPlayerSpawn",root, 
function() 
    local account = getPlayerAccount(source) 
    local S = getElementData(killer, "Level") 
if tonumber(S) == 0 then 
setElementData(source,"Emblems","ranks/lvl_0.png") 
elseif tonumber(S) == 1 then 
setElementData(source,"Emblems","ranks/lvl_1.png") 
elseif tonumber(S) == 2 then 
setElementData(source,"Emblems","ranks/lvl_2.png") 
elseif tonumber(S) == 3 then 
setElementData(source,"Emblems","ranks/lvl_3.png") 
elseif tonumber(S) == 4 then 
setElementData(source,"Emblems","ranks/lvl_4.png") 
elseif tonumber(S) == 5 then 
setElementData(source,"Emblems","ranks/lvl_5.png") 
elseif tonumber(S) == 6 then 
setElementData(source,"Emblems","ranks/lvl_6.png") 
elseif tonumber(S) == 7 then 
setElementData(source,"Emblems","ranks/lvl_7.png") 
elseif tonumber(S) == 8 then 
setElementData(source,"Emblems","ranks/lvl_8.png") 
elseif tonumber(S) == 9 then 
setElementData(source,"Emblems","ranks/lvl_9.png") 
elseif tonumber(S) == 10 then 
setElementData(source,"Emblems","ranks/lvl_10.png") 
elseif tonumber(S) == 11 then 
setElementData(source,"Emblems","ranks/lvl_11.png") 
elseif tonumber(S) == 12 then 
setElementData(source,"Emblems","ranks/lvl_12.png") 
elseif tonumber(S) == 13 then 
setElementData(source,"Emblems","ranks/lvl_13.png") 
elseif tonumber(S) == 14 then 
setElementData(source,"Emblems","ranks/lvl_14.png") 
elseif tonumber(S) == 15 then 
setElementData(source,"Emblems","ranks/lvl_15.png") 
elseif tonumber(S) == 16 then 
setElementData(source,"Emblems","ranks/lvl_16.png") 
elseif tonumber(S) == 17 then 
setElementData(source,"Emblems","ranks/lvl_17.png") 
elseif tonumber(S) == 18 then 
setElementData(source,"Emblems","ranks/lvl_18.png") 
elseif tonumber(S) == 19 then 
setElementData(source,"Emblems","ranks/lvl_19.png") 
elseif tonumber(S) == 20 then 
setElementData(source,"Emblems","ranks/lvl_20.png") 
elseif tonumber(S) == 21 then 
setElementData(source,"Emblems","ranks/lvl_21.png") 
elseif tonumber(S) == 22 then 
setElementData(source,"Emblems","ranks/lvl_22.png") 
elseif tonumber(S) == 23 then 
setElementData(source,"Emblems","ranks/lvl_23.png") 
end 
end 
) 
  
addEventHandler("onPlayerSpawn",root, 
function () 
    local account = getPlayerAccount(source) 
    if isGuestAccount(account) then return end 
    local Emblems = getAccountData(account,"LV") 
    if emblems then 
        setElementData(source,"Emblems", emblems) 
end 
end 
) 

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

Posted
The one that has to draw the image.

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 (edited)

anything?

Edited by Guest

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

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