-.Paradox.- Posted September 8, 2013 Posted September 8, 2013 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.
Castillo Posted September 8, 2013 Posted September 8, 2013 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. Education is the most powerful weapon which you can use to change the world.
-.Paradox.- Posted September 8, 2013 Author Posted September 8, 2013 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.
-.Paradox.- Posted September 9, 2013 Author Posted September 9, 2013 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.
Castillo Posted September 9, 2013 Posted September 9, 2013 Mind posting the complete script? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
-.Paradox.- Posted September 9, 2013 Author Posted September 9, 2013 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.
Castillo Posted September 9, 2013 Posted September 9, 2013 The one that has to draw the image. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
-.Paradox.- Posted September 9, 2013 Author Posted September 9, 2013 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.
Castillo Posted September 9, 2013 Posted September 9, 2013 The one that has to draw the image. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
-.Paradox.- Posted September 9, 2013 Author Posted September 9, 2013 (edited) anything? Edited September 10, 2013 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.
-.Paradox.- Posted September 10, 2013 Author Posted September 10, 2013 help? 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now