Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Login & Register + TextDraw + mysql
- FilterScript created by: Cleyson Stein
- Contact Skype: cleyson.stein
- sorry for my bad english .. I am Brazilian and I used the google translator
- */
- #include <a_samp>
- #include <a_mysql>
- #define Host "localhost"
- #define User "root"
- #define DB "samp"
- #define Password ""
- #define DIALOG_REGISTER 1500
- #define DIALOG_LOGIN 1501
- #define DIALOG_SEX 1502
- #define DIALOG_AGE 1503
- #define DIALOG_EMAIL 1504
- #define DIALOG_FORUM 1505
- #define DIALOG_CREDITS 1506
- enum pInfo
- {
- pID,
- pPassword[129],
- pEmail[129],
- pSex,
- pAge,
- pMoney,
- pSkin,
- pKill,
- pDeath,
- pScore,
- pAdmin,
- pWrongPass,
- bool:pLogged
- };
- new PlayerInfo[MAX_PLAYERS][pInfo];
- new Connection;
- new Text:Background[7];
- new Text:Register[9];
- new Text:Login[MAX_PLAYERS][7];
- new WrotePass[MAX_PLAYERS], WroteSex[MAX_PLAYERS], WroteAge[MAX_PLAYERS], WroteEmail[MAX_PLAYERS];
- public OnFilterScriptInit()
- {
- print("\n----------------------------------");
- print(" Login and Registration system ");
- print(" All rights reserved ");
- print(" Made by: Cleyson Stein");
- print("----------------------------------\n");
- Connection = mysql_connect(Host, User, DB, Password);
- mysql_query(Connection, "CREATE TABLE IF NOT EXISTS `Account`(`ID`int AUTO_INCREMENT PRIMARY KEY, `Name` varchar(24) NOT NULL, `Password` varchar(129) NOT NULL, `Email` varchar(129) NOT NULL, `Admin` int(11) NOT NULL, `Sex` int(11) NOT NULL, `Age` int(11) NOT NULL, `Score` int(11) NOT NULL, `Money` int(11) NOT NULL, `Skin` int(11) NOT NULL, `Kill` int(11) NOT NULL, `Death` int(11) NOT NULL)", false);
- if(mysql_errno(Connection) != 0)
- {
- print("Failed MySql connection");
- }else{
- print("Success in MySql connection");
- }
- LoadTextDraw();
- return 1;
- }
- public OnFilterScriptExit()
- {
- for(new i = 0; i < MAX_PLAYERS; i++) SaveAccount(i);
- mysql_close(Connection);
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- InterpolateCameraPos(playerid, -2397.553710, 1436.038452, 140.798019, -2876.055175, 1382.189697, 159.150161, 17000);
- InterpolateCameraLookAt(playerid, -2401.776855, 1438.431640, 139.599197, -2872.188964, 1384.818359, 157.377395, 17000);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- LoadTextDrawToPlayer(playerid);
- new Query[70];
- mysql_format(Connection, Query, sizeof(Query), "SELECT `Password`, `ID`, `Skin` FROM Account WHERE Name='%e'", Name(playerid));
- mysql_tquery(Connection, Query, "Check_Account", "d", playerid);
- return 1;
- }
- forward Check_Account(playerid);
- public Check_Account(playerid)
- {
- SelectTextDraw(playerid, 0xFF0000FF);
- for(new i = 0; i < sizeof(Background); i++) TextDrawShowForPlayer(playerid, Background[i]);
- if(cache_get_row_count(Connection) == 1)
- {
- SendClientMessage(playerid, -1, "You already have an account, enter your password to login.");
- new tmp[129];
- cache_get_field_content(0, "Password", tmp); format(PlayerInfo[playerid][pPassword], 129, "%s", tmp);
- PlayerInfo[playerid][pID] = cache_get_field_content_int(0, "ID");
- new skin = cache_get_field_content_int(0, "Skin");
- Login[playerid][6] = TextDrawCreate(343.000000, 110.000000, "skin");
- TextDrawBackgroundColor(Login[playerid][6], 0);
- TextDrawFont(Login[playerid][6], 5);
- TextDrawLetterSize(Login[playerid][6], 0.479999, 10.600000);
- TextDrawColor(Login[playerid][6], -1);
- TextDrawSetOutline(Login[playerid][6], 1);
- TextDrawSetProportional(Login[playerid][6], 1);
- TextDrawUseBox(Login[playerid][6], 1);
- TextDrawBoxColor(Login[playerid][6], 255);
- TextDrawTextSize(Login[playerid][6], 99.000000, 120.000000);
- TextDrawSetPreviewModel(Login[playerid][6], skin);
- TextDrawSetPreviewRot(Login[playerid][6], 1.000000, 1.000000, 1.000000, 1.000000);
- TextDrawSetSelectable(Login[playerid][6], 0);
- new NomeText[32], Tid[20];
- format(NomeText, sizeof(NomeText), "~g~~h~Nick: ~w~%s", Name(playerid));
- TextDrawSetString(Login[playerid][1], NomeText);
- format(Tid, sizeof(Tid), "~g~~h~ID: ~w~%d", playerid);
- TextDrawSetString(Login[playerid][2], Tid);
- for(new i = 0; i < 7; i++) TextDrawShowForPlayer(playerid, Login[playerid][i]);
- } else {
- SendClientMessage(playerid, -1, "Do not have an account, enter your password to register.");
- for(new i = 0; i < 8; i++) TextDrawShowForPlayer(playerid, Register[i]);
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- SaveAccount(playerid);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- if(PlayerInfo[playerid][pLogged] == false) return 1;
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- PlayerInfo[playerid][pDeath]++;
- PlayerInfo[killerid][pKill]++;
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- new string[70];
- switch(dialogid)
- {
- case DIALOG_REGISTER:
- {
- if(!response) return 1;
- if(strlen(inputtext) < 4) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "REGISTER PASSWORD ACCOUNT", "\nPlease enter a password with more than 4 digits :\n\n", "Ok", "Cancel");
- format(string, sizeof(string), "PASSWORD: {058AFF}%s{ffffff}.", inputtext);
- SendClientMessage(playerid, -1, string);
- format(PlayerInfo[playerid][pPassword], 129, inputtext);
- WrotePass[playerid] = 1;
- }
- case DIALOG_EMAIL:
- {
- if(!response) return 1;
- if(strlen(inputtext) < 4) return ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, "REGISTER EMAIL ACCOUNT", "\nPlease enter a valid email address :\n\n", "Ok", "Cancel");
- format(string, sizeof(string), "EMAIL: {058AFF}%s{FFFFFF}.", inputtext);
- SendClientMessage(playerid, -1, string);
- format(PlayerInfo[playerid][pEmail], 129, inputtext);
- WroteEmail[playerid] = 1;
- }
- case DIALOG_SEX:
- {
- if(response) // Male
- {
- SendClientMessage(playerid, -1, "SEX: {058AFF}Male{ffffff}.");
- PlayerInfo[playerid][pSex] = 1;
- PlayerInfo[playerid][pSkin] = 26;
- WroteSex[playerid] = 1;
- } else { // Female
- SendClientMessage(playerid, -1, "SEX: {EE3B3B}Female{ffffff}.");
- PlayerInfo[playerid][pSex] = 2;
- PlayerInfo[playerid][pSkin] = 56;
- WroteSex[playerid] = 1;
- }
- }
- case DIALOG_AGE:
- {
- if(!response) return 1;
- if(response)
- {
- if(strval(inputtext) < 5 || strval(inputtext) > 99) return ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "REGISTER AGE ACCOUNT", "\nError, your age should be 5-99.\nPlease enter the age correctly.\n\n", "OK", "Cancel");
- format(string, sizeof(string), "AGE: {058AFF}%d{ffffff} years.", strval(inputtext));
- SendClientMessage(playerid, -1, string);
- PlayerInfo[playerid][pAge] = strval(inputtext);
- WroteAge[playerid] = 1;
- }
- }
- case DIALOG_LOGIN:
- {
- if(!response) return 1;
- if(!strcmp(PlayerInfo[playerid][pPassword], inputtext, true, 129))
- {
- new Query[70];
- mysql_format(Connection, Query, sizeof(Query), "SELECT * FROM Account WHERE Name = '%e'", Name(playerid));
- mysql_tquery(Connection, Query, "Load_Account", "d", playerid);
- } else {
- PlayerInfo[playerid][pWrongPass] ++;
- SendClientMessage(playerid, -1, "Error, incorrect password!");
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "LOGIN ACCOUNT", "\n{FF0000}Incorrect password\n{FFFFFF}Enter your password below to log in:\n\n", "Login", "Cancel");
- if(PlayerInfo[playerid][pWrongPass] == 3)
- {
- SendClientMessage(playerid, -1, "Error, you missed your password 3 times!");
- SetTimerEx("TKick", 100, false, "i", playerid);
- }
- }
- }
- }
- return 1;
- }
- forward TKick(playerid);
- public TKick(playerid) return Kick(playerid);
- stock Name(playerid)
- {
- new name[MAX_PLAYER_NAME];
- return(GetPlayerName(playerid, name, sizeof(name)), name);
- }
- stock HideTextDraw(playerid)
- {
- CancelSelectTextDraw(playerid);
- for(new i = 0; i < sizeof(Register); i++) TextDrawHideForPlayer(playerid, Register[i]);
- for(new i = 0; i < sizeof(Background); i++) TextDrawHideForPlayer(playerid, Background[i]);
- for(new i = 0; i < 8; i++) TextDrawHideForPlayer(playerid, Login[playerid][i]);
- return 1;
- }
- public OnPlayerClickTextDraw(playerid, Text:clickedid)
- {
- if(clickedid == Register[2]) ShowPlayerDialog(playerid, DIALOG_SEX, DIALOG_STYLE_MSGBOX, "REGISTER SEX ACCOUNT", "\nChoose your gender by clicking the buttons below:\n\n", "Male", "Female");
- if(clickedid == Register[3]) ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "REGISTER PASSWORD ACCOUNT", "\nEnter your password below:\n\n", "Ok", "Cancel");
- if(clickedid == Register[4]) ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "REGISTER AGE ACCOUNT", "\nPlease enter your age:\n\n", "OK", "Cancel");
- if(clickedid == Register[5]) ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, "REGISTER EMAIL ACCOUNT", "\nPlease enter your email address below:\nWill be important if you lose your password.\n\n", "Ok", "Cancel");
- if(clickedid == Register[7]) Kick(playerid);
- if(clickedid == Register[6])
- {
- if(WrotePass[playerid] == 1 && WroteSex[playerid] == 1 && WroteAge[playerid] == 1 && WroteEmail[playerid] == 1)
- {
- RegisterAccount(playerid);
- } else {
- TextDrawShowForPlayer(playerid, Register[8]); // prompted to enter all data
- }
- }
- if(clickedid == Login[playerid][3]) ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "LOGIN ACCOUNT", "\nEnter your password below to log in:\n\n", "Login", "Cancel");
- if(clickedid == Login[playerid][4]) ShowPlayerDialog(playerid, DIALOG_FORUM, DIALOG_STYLE_MSGBOX, "FORUM", "\nVisit and register on our forum:\n\n {FFFFFF}Edit\n\n", "Ok", "");
- if(clickedid == Login[playerid][5]) ShowPlayerDialog(playerid, DIALOG_CREDITS, DIALOG_STYLE_MSGBOX, "CREDITS", "\nLogin|Register by: Cleyson Stein\nGamemode by: Edit\n\n", "Ok", "");
- return 1;
- }
- forward RegisterAccount(playerid);
- public RegisterAccount(playerid)
- {
- PlayerInfo[playerid][pLogged] = true;
- PlayerInfo[playerid][pScore] = 0;
- PlayerInfo[playerid][pAdmin] = 0;
- PlayerInfo[playerid][pMoney] = 5000;
- PlayerInfo[playerid][pDeath] = 0;
- PlayerInfo[playerid][pWrongPass] = 0;
- ResetPlayerMoney(playerid);
- new Query[300];
- mysql_format(Connection, Query, sizeof(Query), "INSERT INTO `Account`(`Name`, `Password`, `Email`, `Admin`, `Sex`, `Age`, `Score`, `Money`, `Skin`, `Kill`, `Death`) VALUES ('%e','%e','%e','%d','%d','%d','%d','%d','%d','%d','%d')",
- Name(playerid),
- PlayerInfo[playerid][pPassword],
- PlayerInfo[playerid][pEmail],
- PlayerInfo[playerid][pAdmin],
- PlayerInfo[playerid][pSex],
- PlayerInfo[playerid][pAge],
- PlayerInfo[playerid][pScore],
- PlayerInfo[playerid][pMoney],
- PlayerInfo[playerid][pSkin],
- PlayerInfo[playerid][pKill],
- PlayerInfo[playerid][pDeath]);
- mysql_tquery(Connection, Query, "Account_Registered", "d", playerid);
- SendClientMessage(playerid, -1, "Account successfully registered.");
- SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);
- GivePlayerMoney(playerid, PlayerInfo[playerid][pMoney]);
- SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], 1721.8422, -1880.1793, 13.5649, 269.15, 0, 0, 0, 0, 0, 0);
- SpawnPlayer(playerid);
- HideTextDraw(playerid);
- return 1;
- }
- forward Account_Registered(playerid);
- public Account_Registered(playerid)
- {
- PlayerInfo[playerid][pID] = cache_insert_id();
- printf("New registered account: ID SQL: %d", PlayerInfo[playerid][pID]);
- return 1;
- }
- forward Load_Account(playerid);
- public Load_Account(playerid)
- {
- new tmp[129];
- cache_get_field_content(0, "Email", tmp); format(PlayerInfo[playerid][pEmail], 129, "%s", tmp);
- PlayerInfo[playerid][pAdmin] = cache_get_field_content_int(0, "Admin");
- PlayerInfo[playerid][pSex] = cache_get_field_content_int(0, "Sex");
- PlayerInfo[playerid][pAge] = cache_get_field_content_int(0, "Age");
- PlayerInfo[playerid][pScore] = cache_get_field_content_int(0, "Score");
- PlayerInfo[playerid][pMoney] = cache_get_field_content_int(0, "Money");
- PlayerInfo[playerid][pSkin] = cache_get_field_content_int(0, "Skin");
- PlayerInfo[playerid][pKill] = cache_get_field_content_int(0, "Kill");
- PlayerInfo[playerid][pDeath] = cache_get_field_content_int(0, "Death");
- PlayerInfo[playerid][pLogged] = true;
- SendClientMessage(playerid, -1, "Account successfully loaded.");
- SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);
- GivePlayerMoney(playerid, PlayerInfo[playerid][pMoney]);
- SetSpawnInfo(playerid, 1, PlayerInfo[playerid][pSkin], 1721.8422, -1880.1793, 13.5649, 269.15, 0, 0, 0, 0, 0, 0);
- SpawnPlayer(playerid);
- HideTextDraw(playerid);
- return 1;
- }
- forward SaveAccount(playerid);
- public SaveAccount(playerid)
- {
- if(PlayerInfo[playerid][pLogged] == false) return 1;
- PlayerInfo[playerid][pMoney] = GetPlayerMoney(playerid);
- ResetPlayerMoney(playerid);
- new Query[300];
- mysql_format(Connection, Query, sizeof(Query), "UPDATE `Account` SET `Name`='%e', `Password`='%e', `Email`='%e', `Admin`='%d', `Sex`='%d', `Age`='%d', `Score`='%d', `Money`='%d', `Skin`='%d', `Kill`='%d', `Death`='%d' WHERE `ID`='%d'",
- Name(playerid),
- PlayerInfo[playerid][pPassword],
- PlayerInfo[playerid][pEmail],
- PlayerInfo[playerid][pAdmin],
- PlayerInfo[playerid][pSex],
- PlayerInfo[playerid][pAge],
- PlayerInfo[playerid][pScore],
- PlayerInfo[playerid][pMoney],
- PlayerInfo[playerid][pSkin],
- PlayerInfo[playerid][pKill],
- PlayerInfo[playerid][pDeath],
- PlayerInfo[playerid][pID]);
- mysql_tquery(Connection, Query, "Account_Saved", "d", playerid);
- PlayerInfo[playerid][pLogged] = false;
- return 1;
- }
- forward Account_Saved(playerid);
- public Account_Saved(playerid) return printf("New saved account: ID SQL: %d", PlayerInfo[playerid][pID]);
- stock LoadTextDraw()
- {
- Background[0] = TextDrawCreate(197.000000, 2.000000, "#"); // box total
- TextDrawBackgroundColor(Background[0], 255);
- TextDrawFont(Background[0], 2);
- TextDrawLetterSize(Background[0], 0.500000, 49.499992);
- TextDrawColor(Background[0], -1);
- TextDrawSetOutline(Background[0], 0);
- TextDrawSetProportional(Background[0], 1);
- TextDrawSetShadow(Background[0], 1);
- TextDrawUseBox(Background[0], 1);
- TextDrawBoxColor(Background[0], 136);
- TextDrawTextSize(Background[0], 442.000000, -21.000000);
- TextDrawSetSelectable(Background[0], 0);
- Background[1] = TextDrawCreate(270.000000, 13.000000, "~r~~h~L~w~ife~g~~h~V~w~irtual"); // logo SERVER
- TextDrawBackgroundColor(Background[1], 255);
- TextDrawFont(Background[1], 1);
- TextDrawLetterSize(Background[1], 0.600000, 2.900000);
- TextDrawColor(Background[1], -1);
- TextDrawSetOutline(Background[1], 0);
- TextDrawSetProportional(Background[1], 1);
- TextDrawSetShadow(Background[1], 1);
- TextDrawSetSelectable(Background[1], 0);
- Background[2] = TextDrawCreate(250.000000, 38.000000, "~w~-"); // linha embaixo do logo
- TextDrawBackgroundColor(Background[2], 255);
- TextDrawFont(Background[2], 1);
- TextDrawLetterSize(Background[2], 9.510000, 1.000000);
- TextDrawColor(Background[2], -1);
- TextDrawSetOutline(Background[2], 0);
- TextDrawSetProportional(Background[2], 1);
- TextDrawSetShadow(Background[2], 1);
- TextDrawSetSelectable(Background[2], 0);
- Background[3] = TextDrawCreate(197.000000, 97.000000, "#"); // barra de cima
- TextDrawBackgroundColor(Background[3], 255);
- TextDrawFont(Background[3], 2);
- TextDrawLetterSize(Background[3], 0.610000, 0.199999);
- TextDrawColor(Background[3], -1);
- TextDrawSetOutline(Background[3], 0);
- TextDrawSetProportional(Background[3], 1);
- TextDrawSetShadow(Background[3], 1);
- TextDrawUseBox(Background[3], 1);
- TextDrawBoxColor(Background[3], 255);
- TextDrawTextSize(Background[3], 442.000000, -20.000000);
- TextDrawSetSelectable(Background[3], 0);
- Background[4] = TextDrawCreate(250.000000, 370.000000, "Good Game! Team CS"); // CS Acronym Server
- TextDrawBackgroundColor(Background[4], 255);
- TextDrawFont(Background[4], 2);
- TextDrawLetterSize(Background[4], 0.290000, 1.000000);
- TextDrawColor(Background[4], -1);
- TextDrawSetOutline(Background[4], 1);
- TextDrawSetProportional(Background[4], 1);
- TextDrawSetSelectable(Background[4], 0);
- Background[5] = TextDrawCreate(193.000000, 2.000000, "#"); // barra esquerda
- TextDrawBackgroundColor(Background[5], 255);
- TextDrawFont(Background[5], 2);
- TextDrawLetterSize(Background[5], 0.610000, 51.099998);
- TextDrawColor(Background[5], -1);
- TextDrawSetOutline(Background[5], 0);
- TextDrawSetProportional(Background[5], 1);
- TextDrawSetShadow(Background[5], 1);
- TextDrawUseBox(Background[5], 1);
- TextDrawBoxColor(Background[5], 255);
- TextDrawTextSize(Background[5], 194.000000, -20.000000);
- TextDrawSetSelectable(Background[5], 0);
- Background[6] = TextDrawCreate(446.000000, 2.000000, "#"); // barra direita
- TextDrawBackgroundColor(Background[6], 255);
- TextDrawFont(Background[6], 2);
- TextDrawLetterSize(Background[6], 0.610000, 51.099998);
- TextDrawColor(Background[6], -1);
- TextDrawSetOutline(Background[6], 0);
- TextDrawSetProportional(Background[6], 1);
- TextDrawSetShadow(Background[6], 1);
- TextDrawUseBox(Background[6], 1);
- TextDrawBoxColor(Background[6], 255);
- TextDrawTextSize(Background[6], 438.000000, -20.000000);
- TextDrawSetSelectable(Background[6], 0);
- // == Register
- Register[0] = TextDrawCreate(197.000000, 80.000000, " Register");
- TextDrawBackgroundColor(Register[0], 255);
- TextDrawFont(Register[0], 3);
- TextDrawLetterSize(Register[0], 0.540000, 1.699998);
- TextDrawColor(Register[0], -1);
- TextDrawSetOutline(Register[0], 1);
- TextDrawSetProportional(Register[0], 1);
- TextDrawUseBox(Register[0], 1);
- TextDrawBoxColor(Register[0], 255);
- TextDrawTextSize(Register[0], 314.000000, 0.000000);
- TextDrawSetSelectable(Register[0], 0);
- Register[1] = TextDrawCreate(197.000000, 332.000000, "#"); // barra de baixo
- TextDrawBackgroundColor(Register[1], 255);
- TextDrawFont(Register[1], 2);
- TextDrawLetterSize(Register[1], 0.610000, 0.199999);
- TextDrawColor(Register[1], -1);
- TextDrawSetOutline(Register[1], 0);
- TextDrawSetProportional(Register[1], 1);
- TextDrawSetShadow(Register[1], 1);
- TextDrawUseBox(Register[1], 1);
- TextDrawBoxColor(Register[1], 255);
- TextDrawTextSize(Register[1], 442.000000, -20.000000);
- TextDrawSetSelectable(Register[1], 0);
- Register[2] = TextDrawCreate(235.000000, 139.000000, " SEX");
- TextDrawBackgroundColor(Register[2], 255);
- TextDrawFont(Register[2], 1);
- TextDrawLetterSize(Register[2], 0.500000, 1.499999);
- TextDrawColor(Register[2], -1);
- TextDrawSetOutline(Register[2], 1);
- TextDrawSetProportional(Register[2], 1);
- TextDrawUseBox(Register[2], 1);
- TextDrawBoxColor(Register[2], 102);
- TextDrawTextSize(Register[2], 403.000000, 10.000000);
- TextDrawSetSelectable(Register[2], true);
- Register[3] = TextDrawCreate(235.000000, 184.000000, " PASS");
- TextDrawBackgroundColor(Register[3], 255);
- TextDrawFont(Register[3], 1);
- TextDrawLetterSize(Register[3], 0.500000, 1.499999);
- TextDrawColor(Register[3], -1);
- TextDrawSetOutline(Register[3], 1);
- TextDrawSetProportional(Register[3], 1);
- TextDrawUseBox(Register[3], 1);
- TextDrawBoxColor(Register[3], 102);
- TextDrawTextSize(Register[3], 403.000000, 10.000000);
- TextDrawSetSelectable(Register[3], true);
- Register[4] = TextDrawCreate(235.000000, 230.000000, " AGE");
- TextDrawBackgroundColor(Register[4], 255);
- TextDrawFont(Register[4], 1);
- TextDrawLetterSize(Register[4], 0.500000, 1.499999);
- TextDrawColor(Register[4], -1);
- TextDrawSetOutline(Register[4], 1);
- TextDrawSetProportional(Register[4], 1);
- TextDrawUseBox(Register[4], 1);
- TextDrawBoxColor(Register[4], 102);
- TextDrawTextSize(Register[4], 403.000000, 10.000000);
- TextDrawSetSelectable(Register[4], true);
- Register[5] = TextDrawCreate(235.000000, 276.000000, " EMAIL");
- TextDrawBackgroundColor(Register[5], 255);
- TextDrawFont(Register[5], 1);
- TextDrawLetterSize(Register[5], 0.500000, 1.499999);
- TextDrawColor(Register[5], -1);
- TextDrawSetOutline(Register[5], 1);
- TextDrawSetProportional(Register[5], 1);
- TextDrawUseBox(Register[5], 1);
- TextDrawBoxColor(Register[5], 102);
- TextDrawTextSize(Register[5], 403.000000, 10.000000);
- TextDrawSetSelectable(Register[5], true);
- Register[6] = TextDrawCreate(197.000000, 332.000000, " Start");
- TextDrawBackgroundColor(Register[6], 255);
- TextDrawFont(Register[6], 3);
- TextDrawLetterSize(Register[6], 0.540000, 1.699998);
- TextDrawColor(Register[6], -1);
- TextDrawSetOutline(Register[6], 1);
- TextDrawSetProportional(Register[6], 1);
- TextDrawUseBox(Register[6], 1);
- TextDrawBoxColor(Register[6], 255);
- TextDrawTextSize(Register[6], 287.000000, 10.000000);
- TextDrawSetSelectable(Register[6], true);
- Register[7] = TextDrawCreate(326.000000, 332.000000, " Cancel");
- TextDrawBackgroundColor(Register[7], 255);
- TextDrawFont(Register[7], 3);
- TextDrawLetterSize(Register[7], 0.540000, 1.699998);
- TextDrawColor(Register[7], -1);
- TextDrawSetOutline(Register[7], 1);
- TextDrawSetProportional(Register[7], 1);
- TextDrawUseBox(Register[7], 1);
- TextDrawBoxColor(Register[7], 255);
- TextDrawTextSize(Register[7], 442.000000, 10.000000);
- TextDrawSetSelectable(Register[7], true);
- Register[8] = TextDrawCreate(210.000000, 309.000000, " Please fill in all the data !");
- TextDrawBackgroundColor(Register[8], 255);
- TextDrawFont(Register[8], 2);
- TextDrawLetterSize(Register[8], 0.250000, 1.000000);
- TextDrawColor(Register[8], -16776961);
- TextDrawSetOutline(Register[8], 1);
- TextDrawSetProportional(Register[8], 1);
- TextDrawSetSelectable(Register[8], 0);
- }
- stock LoadTextDrawToPlayer(playerid)
- {
- // == Login
- Login[playerid][0] = TextDrawCreate(197.000000, 80.000000, " Login");
- TextDrawBackgroundColor(Login[playerid][0], 255);
- TextDrawFont(Login[playerid][0], 3);
- TextDrawLetterSize(Login[playerid][0], 0.540000, 1.699998);
- TextDrawColor(Login[playerid][0], -1);
- TextDrawSetOutline(Login[playerid][0], 1);
- TextDrawSetProportional(Login[playerid][0], 1);
- TextDrawUseBox(Login[playerid][0], 1);
- TextDrawBoxColor(Login[playerid][0], 255);
- TextDrawTextSize(Login[playerid][0], 299.000000, 0.000000);
- TextDrawSetSelectable(Login[playerid][0], 0);
- Login[playerid][1] = TextDrawCreate(220.000000, 138.000000, "Nick: ~w~");
- TextDrawBackgroundColor(Login[playerid][1], 255);
- TextDrawFont(Login[playerid][1], 2);
- TextDrawLetterSize(Login[playerid][1], 0.260000, 1.899999);
- TextDrawColor(Login[playerid][1], -1);
- TextDrawSetOutline(Login[playerid][1], 0);
- TextDrawSetProportional(Login[playerid][1], 1);
- TextDrawSetShadow(Login[playerid][1], 1);
- TextDrawSetSelectable(Login[playerid][1], 0);
- Login[playerid][2] = TextDrawCreate(220.000000, 170.000000, "ID: ~w~00");
- TextDrawBackgroundColor(Login[playerid][2], 255);
- TextDrawFont(Login[playerid][2], 2);
- TextDrawLetterSize(Login[playerid][2], 0.389999, 1.899999);
- TextDrawColor(Login[playerid][2], -1);
- TextDrawSetOutline(Login[playerid][2], 0);
- TextDrawSetProportional(Login[playerid][2], 1);
- TextDrawSetShadow(Login[playerid][2], 1);
- TextDrawSetSelectable(Login[playerid][2], 0);
- Login[playerid][3] = TextDrawCreate(235.000000, 248.000000, " PLAY");
- TextDrawBackgroundColor(Login[playerid][3], 255);
- TextDrawFont(Login[playerid][3], 1);
- TextDrawLetterSize(Login[playerid][3], 0.500000, 1.499999);
- TextDrawColor(Login[playerid][3], -1);
- TextDrawSetOutline(Login[playerid][3], 1);
- TextDrawSetProportional(Login[playerid][3], 1);
- TextDrawUseBox(Login[playerid][3], 1);
- TextDrawBoxColor(Login[playerid][3], 102);
- TextDrawTextSize(Login[playerid][3], 403.000000, 10.000000);
- TextDrawSetSelectable(Login[playerid][3], true);
- Login[playerid][4] = TextDrawCreate(235.000000, 292.000000, " FORUM");
- TextDrawBackgroundColor(Login[playerid][4], 255);
- TextDrawFont(Login[playerid][4], 1);
- TextDrawLetterSize(Login[playerid][4], 0.500000, 1.499999);
- TextDrawColor(Login[playerid][4], -1);
- TextDrawSetOutline(Login[playerid][4], 1);
- TextDrawSetProportional(Login[playerid][4], 1);
- TextDrawUseBox(Login[playerid][4], 1);
- TextDrawBoxColor(Login[playerid][4], 102);
- TextDrawTextSize(Login[playerid][4], 403.000000, 10.000000);
- TextDrawSetSelectable(Login[playerid][4], true);
- Login[playerid][5] = TextDrawCreate(235.000000, 337.000000, " CREDITS");
- TextDrawBackgroundColor(Login[playerid][5], 255);
- TextDrawFont(Login[playerid][5], 1);
- TextDrawLetterSize(Login[playerid][5], 0.500000, 1.499999);
- TextDrawColor(Login[playerid][5], -1);
- TextDrawSetOutline(Login[playerid][5], 1);
- TextDrawSetProportional(Login[playerid][5], 1);
- TextDrawUseBox(Login[playerid][5], 1);
- TextDrawBoxColor(Login[playerid][5], 102);
- TextDrawTextSize(Login[playerid][5], 403.000000, 10.000000);
- TextDrawSetSelectable(Login[playerid][5], true);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement