Jump to content

dxDrawImage for 1 player


Recommended Posts

Posted
its not outputting anything i dont know why

edit: probably because something is wrong in Dealman's code

Nothing is wrong with it. How are you triggering the event onLevelHundred

Posted

data has to be minimum 560001 to trigger the event,and i have 1,5 million and i dont know what u need of code because i posted the code about this triggering thing

Posted

We can't help you if you won't post enough relevant code to help you. We're, well at least not I am gonna sit here and play some sort of guessing game.

If you're scared it might be 'stolen', go ahead and PM me instead.

Posted

sry for doublepost but i got 1 problem left

when i login it doesnt directly draw my image,only when i kill someone

why doesnt this work?

function onLogin (_,account) 
    setElementData(source, "LV", getAccountData(account, "LV") or "0") 
    setElementData(source, "EXP", getAccountData(account, "XP") or "0") 
    local dLevel = getAccountData(account, "LV") or 0 
if dLevel == "100" then 
outputChatBox("1",root) 
triggerClientEvent(source,"onLevelHundred",source) 
outputChatBox("2",root) 
end 
addEventHandler ("onPlayerLogin", root, onLogin) 

it doesnt output anything and its server side

please help

Posted

If it doesn't output anything, then dLevel is not "100", besides, I think you meant:

if dLevel == 100 then 

maybe?

EDIT:

setElementData(source, "LV", getAccountData(account, "LV") or "0") 
    setElementData(source, "EXP", getAccountData(account, "XP") or "0") 
    local dLevel = getAccountData(account, "LV") or 0 

I don't understand why first 2 times "or "0"" and then "or 0" btw.

Posted

oh thank you i thought when checking data that i had to use "value" but seems like " " is useless,anyway thank you Et-win

btw im using or 0 to see if its new account and if it is it sets it to 0

Posted

'123' and "123" are strings. 123 = int = number :P

And it depends on how you save it. You can use the string too but then you have to put 'tonumber(string)' for example.

btw im using or 0 to see if its new account and if it is it sets it to 0

Oh right, forgot that one. ^^

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