Jump to content

getAccountData


TorNix~|nR

Recommended Posts

Hello guys, I have this code, I don't know why it's not working correctly

when I have 2999 zombie kills, I can't join the clan, and when I have 3001 zombie kils, I can't join the clan too :/ help please?

	local account = getPlayerAccount(source)
    if getAccountData(account, "Zombie kills") < 3000 then -------------
	outputChatBox("fail", source)
	return end

 

Link to comment

Try to output in chat the content of the account data. Maybe it's not a number?

Do this in a separate function:

function testStuff (player)

local acc = getPlayerAccount (player)

if acc and isGuestAccount (acc) then return end

local data = getAccountData (acc, "Zombie kills")

if data then

outputChatBox (data, player, 255, 0, 0)

end

addCommandHandler ("testdata", testStuff)

Just type "testdata" in chat and tell me what comes up. Server side script btw.

Edited by koragg
  • Thanks 1
Link to comment

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