Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Login
- mysql_format(SQL, szString, 63,"SELECT * FROM `users` WHERE `name`='%s'",GetName(playerid));
- new Cache: loginverificare = mysql_query(SQL,szString);
- if(cache_get_row_count() > 0) {
- PlayerAccount[playerid] = 1; }
- else {
- PlayerAccount[playerid] = 0; }
- function CheckClassIP(playerid) {
- if(!RegistrationStep[playerid] && IsPlayerLogged[playerid] != 1) {
- SetPlayerFacingAngle(playerid, 3.41);
- SetPlayerPosEx(playerid, 1479.3499, -1748.4355, 45.1615);
- SetPlayerInterior(playerid, 0);
- TogglePlayerControllable(playerid, false);
- if(PlayerAccount[playerid] != 0) {
- new lastonline[64], string[256];
- mysql_format(SQL, string, sizeof string, "SELECT `lastOn` FROM `users` WHERE `name` = '%s'", GetName(playerid));
- mysql_tquery(SQL, string, "", "");
- if(cache_get_row_count()) cache_get_field_content(0, "lastOn", lastonline, 64);
- format(string, sizeof(string), "Bine ai revenit, %s!\nTasteaza in casuta de mai jos parola contului tau.\n\nUltima logare: {FFFFFF}%s",GetName(playerid),lastonline);
- ShowPlayerDialog(playerid, DIALOG_LOGIN2,DIALOG_STYLE_PASSWORD,"Logare", string,"Logare","Quit");
- }
- else {
- new string[200];
- PlayerAccount[playerid] = 0;
- format(string, sizeof(string), "Bine ai venit, %s!\nAcest cont nu este inregistrat.\n\nPentru a-ti creea unul, introdu o parola in casuta de mai jos.",GetName(playerid));
- ShowPlayerDialog(playerid, DIALOG_LOGIN1,DIALOG_STYLE_PASSWORD,"Register", string,"Register","Quit");
- }
- }
- return 1;
- }
- function MySQLCheckAccount(sqlplayersname[]) {
- new escstr[30];
- mysql_escape_string(sqlplayersname, escstr);
- format(szQuery, 71, "SELECT * FROM `users` WHERE `name`='%s' LIMIT 1", escstr);
- new Cache: result = mysql_query(SQL, szQuery);
- new test = cache_get_row_count();
- cache_delete(result);
- if(test != 0) return true;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement