Jump to content

Account is buggy


stefutz101

Recommended Posts

Hi i have a server dayz and when a player create a new account his account is buggy and server reset it . But he must wait some time to server solve his account . How i can solve this ?

function checkBuggedAccount() 
    for i,player in ipairs(getElementsByType("player")) do 
        local account = getPlayerAccount(player) 
        if not account then return end 
        if getElementData(player,"logedin") then 
            if getElementModel(player) == 0 then 
                spawnDayZPlayer(player) 
                outputChatBox(getPlayerName(player).."s Account is buggy and has been reset.",getRootElement(),22,255,22,true) 
            end 
        end 
    end  
end 
setTimer(checkBuggedAccount,90000,0) 

Exist a Event called "onPlayerRegister" or something like that ? Thanks in advance!

Link to comment

Ok i do it , but i need a Event what repair account when player register . I do it but i added event "onPlayerLogin" . The player aster he made the accout he must reconnect and server fix his account . But i want to repair his account when he register . Thanks in advance!

I try this event , didn't work , no errors or warnings :

  
addEventHandler("onPlayerLogin",root,checkBuggedAccount) -- Work 
addEventHandler("onPlayerDayZRegister",root,checkBuggedAccount) -- Didn't work. 

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