1

Topic: [HELP] Account system 060

I wrote
if(!strncmp(pMsg->m_pMessage, "/register", 9))
    {
        m_pPlayer->last_chat = time_get();

        if(m_pPlayer->logged_in){
            GameServer()->SendBroadcast("You are allready logged in!" ,m_pPlayer->GetCID());
            return;}
       
        char name[32];
        char pass[32];
        if(sscanf(pMsg->m_pMessage, "/register %s %s", name, pass) != 2)
        {
            // notify the user that he is stupid
            GameServer()->SendChatTarget(m_pPlayer->GetCID(), "Please stick to the given structure:");
            GameServer()->SendChatTarget(m_pPlayer->GetCID(), "/register <user> <pass>");
            return;
        }

        m_pPlayer->account->create(name, pass);
    }

but it doesnt work(

Botox help me, its from [N]City

2

Re: [HELP] Account system 060

Start coding by yourself, copying isnt coding at all.

3

Re: [HELP] Account system 060

Copying is coding too, but you have to understand what you copied. Have you added the variable account and logged_in to the player structure? Why don't you use the new naming style?

4

Re: [HELP] Account system 060

If you have no idea about C++, then don't code with it or learn it. When you know how to write your own little programms and/or know how to change things in teeworlds source but get stuck then you can ask in the forum or in the irc.
But please don't ask us to write a whole mod for you.

5

Re: [HELP] Account system 060

Even the mod forum has limits. Besides, plagiarism is discouraged.