SA-MP Forums Archive
[HELP] My register system dosnt work like it should - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] My register system dosnt work like it should (/showthread.php?tid=95705)



[HELP] My register system dosnt work like it should - FreddeN - 04.09.2009

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


Re: [HELP] My register system dosnt work like it should - SanMarinoRP - 04.09.2009

?


Re: [HELP] My register system dosnt work like it should - FreddeN - 04.09.2009

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


Re: [HELP] My register system dosnt work like it should - Correlli - 04.09.2009

Help yourself with the debug-messages.


Re: [HELP] My register system dosnt work like it should - The_Tough - 04.09.2009

Код:
#
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 ?


Re: [HELP] My register system dosnt work like it should - FreddeN - 04.09.2009

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.


Re: [HELP] My register system dosnt work like it should - The_Tough - 04.09.2009

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


Re: [HELP] My register system dosnt work like it should - FreddeN - 04.09.2009

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?


Re: [HELP] My register system dosnt work like it should - FreddeN - 04.09.2009

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


Re: [HELP] My register system dosnt work like it should - [SD]sphinX - 04.09.2009

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