[FilterScript] Login And register System with Dialogs v1.0
#1

Hey people, today i made my first filterscript.It is a basic login and register system with dialogs.Its a very small script using which a person can register on the server.There are no commands as it is made by using only dialogs.The users are saved in a txt file with their password.Please keep the credits it would be greatly appreciated.


Installation-For installation u have to put the .pwn and .amx file in the filterscripts folder then put "Loginandregister" in your filterscripts line in server.cfg after that create a folder named users in scriptfiles folder.

Credits-Me for the script

Other-Please keep the credits it would be greatly appreciated and please +rep me if you like my work.

Download-http://solidfiles.com/d/0188/

Thank you.....
Reply
#2

Good job, also welcome to sa-mp forums!
9.42635489/10 xD
Reply
#3

Thank you please +rep me
Reply
#4

Don't ask for +1 rep again.
Reply
#5

Srsly? U create a simple as hell script and u ASK FOR REP? no rep for u bad boi
Reply
#6

why put a download link when you can just simply put it like this
pawn Code:
#include <a_samp>
#define Blue 0x06CDFFFF

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print("Login And Register Script Basic v1.0 by §с†¶e®РµРe");
    print("--------------------------------------\n");
    return 1;
}

new pname[20], filename[24];
new File:user;

public OnPlayerConnect(playerid)
{
    GetPlayerName(playerid, pname, 20);
    format(filename, 24, "users/%s.txt", pname);
    if(!fexist(filename))
    {
        ShowPlayerDialog(playerid, 1, 1, "Register", "Please type in a password:", "Register", "Cancel");
    }
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
   
    if(dialogid == 1)
    {
        if(response == 0)
        {
            SendClientMessage(playerid, Blue, "You have been disconnected!");
            Kick(playerid);
            return 1;
        }
        user = fopen(filename, io_write);
        fwrite(user, inputtext);
        fclose(user);
        SendClientMessage(playerid, Blue, "Your Message");
       
    }
    return 1;
}
anyways it looks like a really simple Register system, but i dont really think its a register system because it doesnt save or load any files!
Reply
#7

Quote:
Originally Posted by park4bmx
View Post
why put a download link when you can just simply put it like this
pawn Code:
#include <a_samp>
#define Blue 0x06CDFFFF

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print("Login And Register Script Basic v1.0 by §с†¶e®РµРe");
    print("--------------------------------------\n");
    return 1;
}

new pname[20], filename[24];
new File:user;

public OnPlayerConnect(playerid)
{
    GetPlayerName(playerid, pname, 20);
    format(filename, 24, "users/%s.txt", pname);
    if(!fexist(filename))
    {
        ShowPlayerDialog(playerid, 1, 1, "Register", "Please type in a password:", "Register", "Cancel");
    }
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
   
    if(dialogid == 1)
    {
        if(response == 0)
        {
            SendClientMessage(playerid, Blue, "You have been disconnected!");
            Kick(playerid);
            return 1;
        }
        user = fopen(filename, io_write);
        fwrite(user, inputtext);
        fclose(user);
        SendClientMessage(playerid, Blue, "Your Message");
       
    }
    return 1;
}
anyways it looks like a really simple Register system, but i dont really think its a register system because it doesnt save or load any files!
I said this is my first fs btw it does save and create files u just have to create a folder called users in scriptfiles directory.LOL
Reply
#8

This link is not working
Reply
#9

Quote:
Originally Posted by Divyanshu
View Post
This link is not working
Do not use this plz!
Reply
#10

Quote:
Originally Posted by §с†¶e®РµРe
View Post
I said this is my first fs btw it does save and create files u just have to create a folder called users in scriptfiles directory.LOL
It doesn't register anything other than just creating a txt file with the nickname of the player.
Reply
#11

Post a pastebin or github link.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)