[HELP] My register system dosnt work like it should
#1

The problem is when players types /login or /register, it's like the cmd's dont got any effect, nothing happends when they try to type it.

Here is my full script, it's a small script so it's easy to read.

http://pastebin.com/f6b996b1a

Thanks
Reply
#2

?
Reply
#3

Quote:
Originally Posted by SanMarinoRP
?
You cant read from Pastebin? Well, waiting for another answer
Reply
#4

Help yourself with the debug-messages.
Reply
#5

Код:
#
if (strcmp(cmd, "/register", true) ==0 )
#
    {
#
      if(IsPlayerConnected(playerid))
#
      {
#
        if(gPlayerLogged[playerid] == 1)
#
            {
#
                SendClientMessage(playerid, COLOR_WHITE, "You are already logged in"); // "You are already registered !" add this..
#

Код:
#
if (hFile)
#
            {
#
                SendClientMessage(playerid, COLOR_WHITE, "This username is already registered, please change your name;)");
#
                fclose(hFile);
#
                return 1; // return 0;
#
            }
return 1;
Код:
#
if(!strlen(tmp))
#
            {
#
            return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /register [password]");
Whats the problem ? You dont register ?
Reply
#6

Quote:
Originally Posted by The_Tough
Код:
#
if (strcmp(cmd, "/register", true) ==0 )
#
    {
#
      if(IsPlayerConnected(playerid))
#
      {
#
        if(gPlayerLogged[playerid] == 1)
#
            {
#
                SendClientMessage(playerid, COLOR_WHITE, "You are already logged in"); // "You are already registered !" add this..
#

Код:
#
if (hFile)
#
            {
#
                SendClientMessage(playerid, COLOR_WHITE, "This username is already registered, please change your name;)");
#
                fclose(hFile);
#
                return 1; // return 0;
#
            }
return 1;
Код:
#
if(!strlen(tmp))
#
            {
#
            return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /register [password]");
Whats the problem ? You dont register ?
Simply, when me and other players want to register and login, nothing happens, it dont register me and dont login.
Reply
#7

I never used the fopen/etc to make /register...I always used dini..:/so I cant help
Reply
#8

Quote:
Originally Posted by The_Tough
I never used the fopen/etc to make /register...I always used dini..:/so I cant help
Okey, thanks anyway, someone else that can help?
Reply
#9

This may explain, if you need in detail

I type my /register [password] command...


And hits Enter, and nothing happends...


Note: I typed a password after /register, just so ya know
Reply
#10

Код:
if (strcmp(cmd, "/register", true) ==0 )
Maybe try
Код:
if(strcmp(cmd, "/register", true) == 0)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)