SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 29/10/2011, 01:20 PM   #1
eеe
Huge Clucker
 
eеe's Avatar
 
Join Date: Oct 2011
Location: pawno.exe :P New Delhi/India
Posts: 339
Reputation: 48
Cool Login And register System with Dialogs v1.0

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.....
__________________
If i have ever helped you please help me back by clicking here.Thank you.
Scripting for $$$ PM me for details.
Developing websites for $$$ for all occasions PM me for details.
Volt-Host 50% OFF use discount coupon - GETBACK

Last edited by eеe; 06/11/2011 at 02:29 PM.
eеe is offline   Reply With Quote
Old 29/10/2011, 01:28 PM   #2
ilikenuts
Huge Clucker
 
ilikenuts's Avatar
 
Join Date: Jan 2011
Location: U. Arab Emirates Admin: 1337
Posts: 239
Reputation: 10
Default Re: Login And register System with Dialogs v1.0

Good job, also welcome to sa-mp forums!
9.42635489/10 xD
__________________
I have stopped scripting, Do NOT PM me about the scripts or anything.
ilikenuts is offline   Reply With Quote
Old 29/10/2011, 01:33 PM   #3
eеe
Huge Clucker
 
eеe's Avatar
 
Join Date: Oct 2011
Location: pawno.exe :P New Delhi/India
Posts: 339
Reputation: 48
Default Re: Login And register System with Dialogs v1.0

Thank you please +rep me
eеe is offline   Reply With Quote
Old 29/10/2011, 02:08 PM   #4
ilikenuts
Huge Clucker
 
ilikenuts's Avatar
 
Join Date: Jan 2011
Location: U. Arab Emirates Admin: 1337
Posts: 239
Reputation: 10
Default Re: Login And register System with Dialogs v1.0

Don't ask for +1 rep again.
__________________
I have stopped scripting, Do NOT PM me about the scripts or anything.
ilikenuts is offline   Reply With Quote
Old 29/10/2011, 02:16 PM   #5
KingHual
High-roller
 
KingHual's Avatar
 
Join Date: Jun 2010
Location: Bulgaria
Posts: 1,809
Reputation: 788
Default Re: Login And register System with Dialogs v1.0

Srsly? U create a simple as hell script and u ASK FOR REP? no rep for u bad boi
__________________
KingHual is offline   Reply With Quote
Old 29/10/2011, 02:32 PM   #6
park4bmx
High-roller
 
park4bmx's Avatar
 
Join Date: Dec 2009
Location: Samokov,Bulgaria
Posts: 2,614
Reputation: 228
Default Re: Login And register System with Dialogs v1.0

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!
park4bmx is offline   Reply With Quote
Old 29/10/2011, 02:55 PM   #7
eеe
Huge Clucker
 
eеe's Avatar
 
Join Date: Oct 2011
Location: pawno.exe :P New Delhi/India
Posts: 339
Reputation: 48
Default Re: Login And register System with Dialogs v1.0

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
__________________
If i have ever helped you please help me back by clicking here.Thank you.
Scripting for $$$ PM me for details.
Developing websites for $$$ for all occasions PM me for details.
Volt-Host 50% OFF use discount coupon - GETBACK

Last edited by eеe; 06/11/2011 at 02:29 PM.
eеe is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tutorial] Login and Register System - Dialogs - Using Y_INI Kush Tutorials 468 22/07/2014 03:21 PM
[Tutorial] Login and Register System - Dialogs - Using SII Kush Tutorials 69 02/07/2013 05:19 PM
[Tutorial] Login & Register system - dialogs - with y_ini Seven_of_Nine Tutorials 29 18/05/2013 05:18 PM
[Tutorial] Register & Login System with Dialogs - DOF2 Jafet_Macario Tutorials 30 14/10/2012 01:48 PM
[FilterScript] Register/login system (Dini, dialogs) pantelimonfl Filterscripts 6 08/03/2011 05:13 PM


All times are GMT. The time now is 11:53 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.