SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Romānă/Romanian

 
 
Thread Tools Display Modes
Old 22/11/2016, 09:51 PM   #1
GabiXx
Huge Clucker
 
GabiXx's Avatar
 
Join Date: Aug 2014
Location: Constanta, Romania
Posts: 222
Reputation: 0
Default Un sistem de register/login?

Salut, vreau sa stiu ce ar trebui sa contina un sistem de register si login?
Ceva simplu, dialoguri in care doar scrii parola, o imagine miscatoare sa dea spawn automat, un anumit skin. Sa salveze conturile.
Cum ar trebui sa incep?
GabiXx is offline  
Old 23/11/2016, 12:32 AM   #2
HeLiOn_PrImE
High-roller
 
HeLiOn_PrImE's Avatar
 
Join Date: Jul 2010
Location: Romania
Posts: 3,006
Reputation: 469
Default Re: Un sistem de register/login?

Daca nu ai experienta in scripting, e complicat sa incepi sa faci un sistem de conturi.
Nu poti folosi un sistem de admin gata facut? Ti-ar fi mult mai simplu sa ii adaugi ce iti trebuie.
__________________

"It's only a game, but people are real. You have to respect them." - Mick88
"You don't deserve a +rep, if you ask for it. Those who deserve it, don't have to ask." - me
"And yet people will still start new threads for the "dying" subject." - me

HeLiOn_PrImE is offline  
Old 25/11/2016, 04:53 AM   #3
Yuri8
Big Clucker
 
Join Date: Nov 2016
Posts: 71
Reputation: 2
Default Re: Un sistem de register/login?

Te pot ajuta eu, skype?
Yuri8 is offline  
Old 26/11/2016, 07:28 AM   #4
BennyX
Little Clucker
 
Join Date: Nov 2016
Posts: 6
Reputation: 0
Default Re: Un sistem de register/login?

Pai, de exemplu, eu iti recomand pe YSI\y_ini, chiar daca unii spun ca este demodat, este un sistem dinamic de register/login cu dialog, care salveaza numele, parola si alte date ale jucatorului. Poti gasii acest sistem register-login, cautand pe ****** "register login YSI samp" si dai pe primul rezultat.
Cu placere.
BennyX is offline  
Old 26/11/2016, 07:32 AM   #5
BennyX
Little Clucker
 
Join Date: Nov 2016
Posts: 6
Reputation: 0
Default Re: Un sistem de register/login?

Pentru a face ca imaginea sa se miste cand jucatorul se intregistreaza/logheaza, te duci in joc, te duci in punctul unde vrei sa inceapa procesul de miscare a camerei si unde vrei sa se opreasca, dupa care te duci la onplayerconnect, daca ai sistemul register/login pe YSI, la onplayerconnect vei avea 2 ShowPlayerDialog. Sub fiecare, pui InterpolateCameraPos(playerid, InceputX, InceputY, InceputZ, SfarsitX, SfarsitY, SfarsitZ, 100, 7777);
Mai adaugi si InterpolateCameraPos(playerid, InceputX, InceputY, InceputZ, SfarsitX, SfarsitY, SfarsitZ, 100, 7777);
*InceputXYZ se refera la coordonatele de unde vrei sa se miste camera, le gasesti in My Documents > Gta SA User Files > SAMP > Savedpositions.
Cu placere.
BennyX is offline  
Old 26/11/2016, 08:32 PM   #6
RaZVaN ^ xD
Huge Clucker
 
Join Date: Jul 2012
Posts: 293
Reputation: 14
Default Re: Un sistem de register/login?

Quote:
Originally Posted by BennyX View Post
Pai, de exemplu, eu iti recomand pe YSI\y_ini, chiar daca unii spun ca este demodat, este un sistem dinamic de register/login cu dialog, care salveaza numele, parola si alte date ale jucatorului. Poti gasii acest sistem register-login, cautand pe ****** "register login YSI samp" si dai pe primul rezultat.
Cu placere.
Toate sistemele de register/login sunt "dinamice", doar nu incarci date constante din fisierul .pwn

Ontopic: Foloseste sqlite/mysql, te va ajuta foarte mult in cazul unor taskuri mai serioase.
RaZVaN ^ xD is offline  
Old 27/11/2016, 04:44 AM   #7
Yuri8
Big Clucker
 
Join Date: Nov 2016
Posts: 71
Reputation: 2
Default Re: Un sistem de register/login?

Quote:
Originally Posted by RaZVaN ^ xD View Post
Toate sistemele de register/login sunt "dinamice", doar nu incarci date constante din fisierul .pwn

Ontopic: Foloseste sqlite/mysql, te va ajuta foarte mult in cazul unor taskuri mai serioase.
SQLite/MySQL sunt grele pentru īncepători, mai bine Y_ini
Yuri8 is offline  
Old 27/11/2016, 12:28 PM   #8
HeLiOn_PrImE
High-roller
 
HeLiOn_PrImE's Avatar
 
Join Date: Jul 2010
Location: Romania
Posts: 3,006
Reputation: 469
Default Re: Un sistem de register/login?

Quote:
Originally Posted by Yuri8 View Post
SQLite/MySQL sunt grele pentru īncepători, mai bine Y_ini
Sistemele ini sunt de domeniul trecutului. Nici eu nu le am cu SQLite, dar acum am inceput sa citesc tutoriale si nu pare sa fie foarte complicat.
Pentru siteme de conturi, are numai avantaje.
__________________

"It's only a game, but people are real. You have to respect them." - Mick88
"You don't deserve a +rep, if you ask for it. Those who deserve it, don't have to ask." - me
"And yet people will still start new threads for the "dying" subject." - me

HeLiOn_PrImE is offline  
Old 30/11/2016, 07:36 AM   #9
GabiXx
Huge Clucker
 
GabiXx's Avatar
 
Join Date: Aug 2014
Location: Constanta, Romania
Posts: 222
Reputation: 0
Default Re: Un sistem de register/login?

Am pus Interpolatecamera dupa dialoguri dar nu functioneaza..
PHP Code:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch( 
dialogid )
    {
        case 
DIALOG_REGISTER:
        {
            
InterpolateCameraPos(playerid,831.0248,-1776.4056,13.5698,833.6517,-2067.6658,12.978612000CAMERA_MOVE);
            if (!
response) return Kick(playerid);
            if(
response)
            {
                if(!
strlen(inputtext)) return ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_PASSWORD""COL_WHITE"Registering...",""COL_RED"Ai introdus o parola gresita.\n"COL_WHITE"Scrie o parola pentru a te inregistra.","Register","Quit");
                new 
INI:File INI_Open(UserPath(playerid));
                
INI_SetTag(File,"data");
                
INI_WriteInt(File,"Password",udb_hash(inputtext));
                
INI_WriteInt(File,"Cash",0);
                
INI_WriteInt(File,"Admin",0);
                
INI_WriteInt(File,"Level",0);
                
INI_WriteInt(File,"Kills",0);
                
INI_WriteInt(File,"Deaths",0);
                
INI_WriteInt(File,"Skin",0);
                
INI_Close(File);
                
GetPlayerSkin(playerid);
                
GivePlayerMoney(playerid,10000);
                   
SetPlayerColor(playerid,0xFFFFFFAA);
                
SetSpawnInfo(playerid,0,PlayerInfo[playerid][pSkin],1283.5896,-1329.5938,13.3824,89.6460,0,0,0,0,0,0);
                
SpawnPlayer(playerid);
            }
        }

        case 
DIALOG_LOGIN:
        {
            
InterpolateCameraPos(playerid,831.0248,-1776.4056,13.5698,833.6517,-2067.6658,12.978612000CAMERA_MOVE);
            if ( !
response ) return Kick playerid );
            if( 
response )
            {
                if(
udb_hash(inputtext) == PlayerInfo[playerid][pPass])
                {
                    
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra true, .extra playerid);
                    
GetPlayerSkin(playerid);
                    
SetSpawnInfo(playerid,0,PlayerInfo[playerid][pSkin],1283.5896,-1329.5938,13.3824,89.6460,0,0,0,0,0,0);
                    
GivePlayerMoney(playeridPlayerInfo[playerid][pCash]);
                    
SetPlayerColor(playerid,0xFFFFFFAA);
                    
SpawnPlayer(playerid);
                }
                else
                {
                    
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_PASSWORD,""COL_WHITE"Login",""COL_RED"Ai introdus o parola gresita.\n"COL_WHITE"Scrie parola mai jos pentru a te loga.","Login","Quit");
                }
                return 
1;
            }
        }
    }
    return 
1;

GabiXx is offline  
Old 30/11/2016, 09:55 PM   #10
POL_george
Gangsta
 
POL_george's Avatar
 
Join Date: Feb 2012
Posts: 512
Reputation: 7
Default Re: Un sistem de register/login?

Incearca s-o pui la OnPlayerComnect, aia cu InterpolateCamera, si la OnPlayerRequestClass, pui un timer pe 1000 care apeleaza la functia public Spawn (playerid) care face SpawnPlayer! Iar aici nush daca merge dar la OnPlayerRequestClass schimba return 1 la return 0, asta nuj daca merge, dar daca merge, ai rezolvat 90% din bugurile de login

Iar la system incearca cu dini, e mai manevrabil si mai usor de folosit
__________________
Cand viata iti da lamai, faci portocale!

When live give you lemons, make oranges!

Last edited by POL_george; 30/11/2016 at 09:57 PM. Reason: Greseli de neatentie
POL_george is offline  
 

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
Register/login sistem SpeedyRO Scripting Help 3 03/08/2013 01:06 PM
[FilterScript] L.R.S (Login Register Sistem) radiobizza Filterscripts 9 29/05/2013 10:02 AM
sistem de login e register no site Guilherme15 Portuguźs/Portuguese 12 29/12/2010 05:12 PM


All times are GMT. The time now is 01:05 AM.


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