Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //tAdmin - V1.1
- // By Thour57
- // Thanks for using it.
- // Dont remove credits, it wont be shown in Game.
- #include <a_samp>
- #include <YSI\y_ini>
- #include <aColors>
- #include <zcmd>
- #include <sscanf2>
- native WP_Hash(buffer[],len,const str[]);
- #define register 1 //Defining register dialog so it won't mixed up with the other dialogs
- #define login 2 //Defining login dialog so it won't mixed up with the other dialogs
- #define UserPath "tAdmin/Users/%s.ini"
- enum PlayerInfo
- {
- Pass[129], //User's password
- Adminlevel, //User's admin level
- VIPlevel, //User's vip level
- Money, //User's money
- Scores, //User's scores
- Kills, //User's kills
- Deaths //User's deaths
- }
- new pInfo[MAX_PLAYERS][PlayerInfo];
- stock Path(playerid) //Will create a new stock so we can easily use it later to load/save user's data in user's path
- {
- new str[128],name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,sizeof(name));
- format(str,sizeof(str),UserPath,name);
- return str;
- }
- forward loadaccount_user(playerid, name[], value[]);
- public loadaccount_user(playerid, name[], value[])
- {
- INI_String("Password", pInfo[playerid][Pass],129); /*we will use INI_String to load user's password.
- ("Password",.. will load user's password inside of user's path. 'pInfo[playerid][Pass]',...We have defined our user's variable above called, pInfo. Now it's time to use it here to load user's password. '129',... 129 is a length of a hashed user's password. Whirlpool will hash 128 characters + NULL*/
- INI_Int("AdminLevel",pInfo[playerid][Adminlevel]);/*We will use INI_Int to load user's admin level. INI_Int stands for INI_Integer. This load an admin level. */
- INI_Int("VIPLevel",pInfo[playerid][VIPlevel]);//As explained above
- INI_Int("Money",pInfo[playerid][Money]); //As explained above
- INI_Int("Scores",pInfo[playerid][Scores]);//As explained above
- INI_Int("Kills",pInfo[playerid][Kills]);//As explained above
- INI_Int("Deaths",pInfo[playerid][Deaths]);//As explained above
- return 1;
- }
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" tAdmin - By thour57 ");
- print("--------------------------------------\n");
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- new name[MAX_PLAYER_NAME]; //Making a new variable called 'name'. name[MAX_PLAYER_NAME] is created so we can use it to get player's name.
- GetPlayerName(playerid,name,sizeof(name)); //Get player's name
- if(fexist(Path(playerid))) /* Check if the connected user is registered or not. fexist stands for file exist. So if file exist in the files(Path(playerid)),*/
- {// then
- INI_ParseFile(Path(playerid),"loadaccount_%s", .bExtra = true, .extra = playerid); //Will load user's data using INI_Parsefile.
- ShowPlayerDialog(playerid,login,DIALOG_STYLE_INPUT,"Login","Welcome back. This account is registered. \nInsert your password to login to your account","Login","Quit");/*A dialog with input style will appear so you can insert your password to login.*/
- }
- else //If the connected user is not registered,
- {//then we will 'force' him to register :)
- ShowPlayerDialog(playerid,register,DIALOG_STYLE_INPUT,"Register","Welcome! This account is not registered.\nEnter your own password to create a new account.","Register","Quit");
- return 1;
- }
- new string[64], pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
- format(string,sizeof string,"..::%s Has Joined the Server::..",pName);
- SendClientMessageToAll(COLOR_CYAN,string);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new INI:file = INI_Open(Path(playerid)); //will open their file
- INI_SetTag(file,"Player's Data");//We will set a tag inside of user's account called "Player's Data"
- INI_WriteInt(file,"AdminLevel",pInfo[playerid][Adminlevel]); //If you've set his/her admin level, then his/her admin level will be saved inside of his/her account
- INI_WriteInt(file,"VIPLevel",pInfo[playerid][VIPlevel]);//As explained above
- INI_WriteInt(file,"Money",GetPlayerMoney(playerid));//We will save his money inside of his account
- INI_WriteInt(file,"Scores",GetPlayerScore(playerid));//We will save his score inside of his account
- INI_WriteInt(file,"Kills",pInfo[playerid][Kills]);//As explained above
- INI_WriteInt(file,"Deaths",pInfo[playerid][Deaths]);//As explained above
- INI_Close(file);
- new
- string[64],
- name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,MAX_PLAYER_NAME);
- switch(reason)
- {
- case 0: format(string,sizeof string,"..::%s left the server. (Timed out)::..",name);
- case 1: format(string,sizeof string,"..::%s left the server. (Leaving)::..",name);
- case 2: format(string,sizeof string,"..::%s left the server. (Kicked/Banned)::..",name);
- }
- SendClientMessageToAll(COLOR_CYAN,string);
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- pInfo[killerid][Kills]++;
- pInfo[playerid][Deaths]++;
- SendDeathMessage(killerid, playerid, reason);
- return 1;
- }
- ////////////////////////////////////////////////////////////////////////////////Common Commands
- stock PlayerName(playerid)
- {
- new Name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Name, sizeof(Name));
- return Name;
- }
- CMD:report(playerid, params[])
- {
- new string[128];
- if(!isnull(params))
- {
- SendClientMessage(playerid, COLOR_YELLOW, "Your report was sent to the Admin Teams.");
- format(string, sizeof(string), "Your Report : %s", params); // Proof to the reporter, that the command worked.
- SendClientMessage(playerid, COLOR_YELLOW, string);
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(pInfo[playerid][Adminlevel] >= 1)
- {
- format(string, sizeof(string), "Report from %s[%d]: %s", PlayerName(playerid), playerid, params);
- SendClientMessage(i, COLOR_ORANGE, string); // Send's the format to the online Rcon'ly Logged in Admins.
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "USAGE: /Report [Text]"); // Show's the player the Usage.
- }
- return 1;
- }
- CMD:ask(playerid, params[])
- {
- new string[128];
- if(!isnull(params))
- {
- SendClientMessage(playerid, COLOR_YELLOW, "Your Question was sent to the Admin Teams.");
- format(string, sizeof(string), "You Asked :%s", params); // Proof to the reporter, that the command worked.
- SendClientMessage(playerid, COLOR_YELLOW, string);
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(pInfo[playerid][Adminlevel] >= 1)
- {
- format(string, sizeof(string), "Question from %s[%d]: %s", PlayerName(playerid), playerid, params);
- SendClientMessage(i, COLOR_ORANGE, string); // Send's the format to the online Rcon'ly Logged in Admins.
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "USAGE: /Ask [Text]"); // Show's the player the Usage.
- }
- return 1;
- }
- CMD:admins(playerid,params[])
- {
- new Count, string[128],n[MAX_PLAYER_NAME];
- new i;
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "__________|Admins|__________");
- {
- if(pInfo[i][Adminlevel] ==1) {
- GetPlayerName(i,n,sizeof(n));
- format(string,sizeof(string),"Global Moderator (Level 1) : %s(%d)",n, playerid);
- SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
- Count++;
- }
- if(pInfo[i][Adminlevel] ==2) {
- GetPlayerName(i,n,sizeof(n));
- format(string,sizeof(string),"Moderator (Level 2) : %s(%d)",n, playerid);
- SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
- Count++;
- }
- if(pInfo[i][Adminlevel] ==3) {
- GetPlayerName(i,n,sizeof(n));
- format(string,sizeof(string),"Administrator (Level 3) : %s(%d)",n, playerid);
- SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
- Count++;
- }
- if(pInfo[i][Adminlevel] ==4) {
- GetPlayerName(i,n,sizeof(n));
- format(string,sizeof(string),"Head Administrator (Level 4) : %s(%d)",n, playerid);
- SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
- Count++;
- }
- if(pInfo[i][Adminlevel] ==5) {
- GetPlayerName(i,n,sizeof(n));
- format(string,sizeof(string),"Server Owner (Level 5) : %s(%d)",n, playerid);
- SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
- Count++;
- }
- }
- if(Count == 0) SendClientMessage(playerid, COLOR_LIGHTBLUE, "No Admins Online");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "____________________________");
- return 1;
- }
- CMD:vips(playerid,params[])
- {
- new Count, string[128],n[MAX_PLAYER_NAME];
- new i;
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "__________|VIPS|__________");
- {
- if(pInfo[i][VIPlevel] ==1) {
- GetPlayerName(i,n,sizeof(n));
- format(string,sizeof(string),"VIP : %s(%d)",n, playerid);
- SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
- Count++;
- }
- }
- if(Count == 0) SendClientMessage(playerid, COLOR_LIGHTBLUE, "No VIP Online");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "____________________________");
- return 1;
- }
- CMD:pm(playerid, params[])
- {
- new str[256], str2[256], id, Name1[MAX_PLAYER_NAME], Name2[MAX_PLAYER_NAME];
- if(sscanf(params, "us", id, str2))
- {
- SendClientMessage(playerid, 0xFF0000FF, "Usage: /pm <id> <message>");
- return 1;
- }
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Player not connected");
- if(playerid == id) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You cannot pm yourself!");
- {
- GetPlayerName(playerid, Name1, sizeof(Name1));
- GetPlayerName(id, Name2, sizeof(Name2));
- format(str, sizeof(str), "PM To %s(ID %d): %s", Name2, id, str2);
- SendClientMessage(playerid, 0xFF0000FF, str);
- format(str, sizeof(str), "PM From %s(ID %d): %s", Name1, playerid, str2);
- SendClientMessage(id, COLOR_PINK, str);
- }
- return 1;
- }
- /// Vip Commands.
- CMD:vskin(playerid, params[])
- {
- if(pInfo[playerid][VIPlevel] < 1) return SendClientMessage(playerid, COLOR_RED,"Only VIP's Can use this Command.");
- {
- SetPlayerSkin(playerid, 101);
- SendClientMessage(playerid, COLOR_LIGHTBLUE,"Skin Changed.");
- }
- return 1;
- }
- ///Admin Commands:
- CMD:makeadmin(playerid, params[])
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You need to be Admin to use this command");
- new targetid, level;
- if(sscanf(params, "ui", targetid, level)) return SendClientMessage(playerid, COLOR_RED, "Usage /makeadmin [playerid/part of name] [admin level]");
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_RED, "Player is not connected!");
- pInfo[targetid][Adminlevel] = level;
- return 1;
- }
- CMD:makevip(playerid, params[])
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You need to be Admin to use this command");
- new targetid, level;
- if(sscanf(params, "ui", targetid, level)) return SendClientMessage(playerid, COLOR_RED, "Usage /makevip [playerid/part of name] [vip level]");
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_RED, "Player is not connected!");
- pInfo[targetid][VIPlevel] = level;
- return 1;
- }
- CMD:kick(playerid, params[])
- {
- new targetid;
- new reason[64]; //the reason, put into a string
- new str[128]; //a new message string
- new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME];
- if(pInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid, -1, "You need to be admin to use this command");
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "USAGE /kick [playerid/part of name]");
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_RED, "Player is not connected!");
- format(str, sizeof(str), "'%s' has been Kicked by administrator '%s'. Reason: %s ", Playername, Adminname, reason); //format the string we've defined to send the message, playername and adminname are used to receive the information about the names
- SendClientMessageToAll(COLOR_RED, str); //send that message to all
- Kick(targetid);
- return 1;
- }
- CMD:ban(playerid, params[])
- {
- if(pInfo[playerid][Adminlevel] < 3) return SendClientMessage(playerid, COLOR_GREY, "You have to be Admin to use that command!"); //return this message
- new PID; //define the playerid we wanna ban
- new reason[64]; //the reason, put into a string
- new str[128]; //a new message string
- new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME]; //defines the function with the playername we wanna get
- GetPlayerName(playerid, Adminname, sizeof(Adminname)); //defines the function with the adminname we wanna get
- GetPlayerName(PID, Playername, sizeof(Playername));
- if(sscanf(params, "us[64]", PID,reason)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /ban [playerid] [reason]"); //tell sscanf if the parameters/the syntax is written wrong to return a message (PID and the reason used here)
- if(!IsPlayerConnected(PID)) return SendClientMessage(playerid, COLOR_RED, "Player is not connected!");
- format(str, sizeof(str), "'%s' has been banned by administrator '%s'. Reason: %s ", Playername, Adminname, reason); //format the string we've defined to send the message, playername and adminname are used to receive the information about the names
- SendClientMessageToAll(COLOR_RED, str); //send that message to all
- Ban(PID); //Ban the playerid we've defined
- return 1;
- }
- CMD:clearchat(playerid,params[])
- {
- if(pInfo[playerid][Adminlevel] < 1 ) return SendClientMessage(playerid, COLOR_RED, "You must be Admin to use this command!" );
- {
- for( new i = 0; i <= 100; i ++ ) SendClientMessageToAll( COLOR_WHITE, "" );
- }
- return 1;
- }
- CMD:askin(playerid, params[])
- {
- if(pInfo[playerid][Adminlevel] < 1 ) return SendClientMessage(playerid, COLOR_RED, "You must be Admin to use this command!" );
- {
- SetPlayerSkin(playerid, 217);
- SendClientMessage(playerid, COLOR_RED, "Skin Changed.");
- }
- return 1;
- }
- CMD:goto(playerid, params[])
- {
- new ID;//creates a new something idk what we call it :P but it is defined later on or used in something this 1 is used in next line
- if(sscanf(params, "u", ID)) SendClientMessage(playerid, 0xFF0000FF, "USAGE: /goto [id]");//checks if you have written something after /goto if no it sends error
- else if(!IsPlayerConnected(ID) || ID == playerid) return SendClientMessage(playerid, 0xFF0000FF, "This player is offline or it is yourself");//checks if the player you are teleporting to is connected or if it is yourself if yes then comes an error
- else if(pInfo[playerid][Adminlevel] < 1 ) return SendClientMessage(playerid, COLOR_RED, "You must be Admin to use this command!" );
- else//ELSE what will happen if no errors
- {
- new Float:x, Float:y, Float:z;//creates new floats
- GetPlayerPos(ID, x, y, z);//gets the player id(which we have entered after /goto position and like saves them into x,y,z defined above as floats
- SetPlayerPos(playerid, x+1, y+1, z);//sets the player position the id of that player +1 in x +1 in y and z remains same as it defines height
- }
- return 1;
- }
- CMD:gethere(playerid,params[])
- {
- new ID;
- new targetid, Float:x, Float:y, Float:z;//defines floats and [U]targetid(same which we did as id above)[/U]
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /gethere [id]");//checks if there is something written after /gethere if no sends the usage error
- if(!IsPlayerConnected(ID) || ID == playerid) return SendClientMessage(playerid, 0xFF0000FF, "This player is offline or it is yourself");//checks if the player is conneted or not and also checks that we are not teleporting ourselves to our self :P if we are it sends error
- else if(pInfo[playerid][Adminlevel] < 1 ) return SendClientMessage(playerid, COLOR_RED, "You must be Admin to use this command!" );
- GetPlayerPos(playerid, x, y, z);//gets player pos PLAYER POS not targetid
- SetPlayerPos(targetid, x+1, y+1, z);//gets the TARGETID player to the PLAYERID x+1,y+1 and z remains same as it defines height
- return 1;
- }
- CMD:akill(playerid, params[])
- {
- new targetid;
- new ID;
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /akill [id]");
- if(!IsPlayerConnected(ID) || ID == playerid) return SendClientMessage(playerid, 0xFF0000FF, "This player is offline or it is yourself");
- else if(pInfo[playerid][Adminlevel] < 1 ) return SendClientMessage(playerid, COLOR_RED, "You must be Admin to use this command!" );
- SetPlayerHealth(ID, 0.00);
- SpawnPlayer(ID);
- SendClientMessage(ID, COLOR_RED, "You Have Been Killed by An Admin.");
- return 1;
- }
- CMD:aspawn(playerid, params[])
- {
- new targetid;
- new ID;
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /aspawn [id]");
- if(!IsPlayerConnected(ID) || ID == playerid) return SendClientMessage(playerid, 0xFF0000FF, "This player is offline or it is yourself");
- else if(pInfo[playerid][Adminlevel] < 1 ) return SendClientMessage(playerid, COLOR_RED, "You must be Admin to use this command!" );
- SetPlayerHealth(ID, 0.00);
- SpawnPlayer(ID);
- SendClientMessage(ID, COLOR_RED, "You Have Been Spawned by An Admin.");
- return 1;
- }
- CMD:aheal(playerid, params[])
- {
- new targetid;
- new ID;
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /aheal [id]");
- if(!IsPlayerConnected(ID) || ID == playerid) return SendClientMessage(playerid, 0xFF0000FF, "This player is offline or it is yourself");
- else if(pInfo[playerid][Adminlevel] < 1 ) return SendClientMessage(playerid, COLOR_RED, "You must be Admin to use this command!" );
- SetPlayerHealth(ID, 100.00);
- SendClientMessage(ID, COLOR_RED, "You Have Been Healed by An Admin.");
- return 1;
- }
- CMD:aarmour(playerid, params[])
- {
- new targetid;
- new ID;
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /aarmour [id]");
- if(!IsPlayerConnected(ID) || ID == playerid) return SendClientMessage(playerid, 0xFF0000FF, "This player is offline or it is yourself");
- else if(pInfo[playerid][Adminlevel] < 1 ) return SendClientMessage(playerid, COLOR_RED, "You must be Admin to use this command!" );
- SetPlayerArmour(ID, 100.00);
- SendClientMessage(ID, COLOR_RED, "You Have Been Armoured by An Admin.");
- return 1;
- }
- CMD:ahelp(playerid, params[])
- {
- if(pInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid, COLOR_RED,"Only Admin's Can use this Command.");
- {
- SendClientMessage(playerid, COLOR_LIGHTGREEN, "Level 1 Commands :\n/kick\n/clearchat\n/askin\n/goto\n/gethere\n/akill\n/aarmour\n/aheal\n/aspawn");
- SendClientMessage(playerid, COLOR_LIGHTGREEN, "Level 2 Commands :\n/kick\n/clearchat\n/askin\n/goto\n/gethere\n/akill\n/aarmour\n/aheal\n/aspawn");
- SendClientMessage(playerid, COLOR_LIGHTGREEN, "Level 3 Commands :\n/ban\n/kick\n/clearchat\n/askin\n/goto\n/gethere\n/akill\n/aarmour\n/aheal\n/aspawn");
- SendClientMessage(playerid, COLOR_LIGHTGREEN, "Level 4 Commands :\n/ban\n/kick\n/clearchat\n/askin\n/goto\n/gethere\n/akill\n/aarmour\n/aheal\n/aspawn");
- SendClientMessage(playerid, COLOR_LIGHTGREEN, "Level 5 Commands :\n/ban\n/kick\n/clearchat\n/askin\n/goto\n/gethere\n/akill\n/aarmour\n/aheal\n/aspawn\n/makeadmin\n/makevip");
- }
- return 1;
- }
- ///////////////////////////////////////////////////////////////////////////////////
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == register) //If dialog id is a register dialog
- {//then
- if(!response) return Kick(playerid); //If they clicked the second button "Quit", we will kick them.
- if(response) //if they clicked the first button "Register"
- {//then
- if(!strlen(inputtext)) //If they didn't enter any password
- {// then we will tell to them to enter the password to register
- ShowPlayerDialog(playerid,register,DIALOG_STYLE_INPUT,"Register","Welcome! This account is not registered.\nEnter your own password to create a new account.\nPlease enter the password!","Register","Quit");
- return 1;
- }
- //If they have entered a correct password for his/her account...
- new hashpass[129]; //Now we will create a new variable to hash his/her password
- WP_Hash(hashpass,sizeof(hashpass),inputtext);//We will use whirlpool to hash their inputted text
- new INI:file = INI_Open(Path(playerid)); // we will open a new file for them to save their account inside of Scriptfiles/Users folder
- INI_SetTag(file,"Player's Data");//We will set a tag inside of user's account called "Player's Data"
- INI_WriteString(file,"Password",hashpass);//This will write a hashed password into user's account
- INI_WriteInt(file,"AdminLevel",0); //Write an integer inside of user's account called "AdminLevel". We will set his level to 0 after he registered.
- INI_WriteInt(file,"VIPLevel",0);//As explained above
- INI_WriteInt(file,"Money",0);//Write an integer inside of user's account called "Money". We will set their money to 0 after he registered
- INI_WriteInt(file,"Scores",0);//Write an integer inside of user's account called "Scores". We will set their score to 0 after he registered
- INI_WriteInt(file,"Kills",0);//As explained above
- INI_WriteInt(file,"Deaths",0);//As explained above
- INI_Close(file);//Now after we've done saving their data, we now need to close the file
- SendClientMessage(playerid,-1,"You have been successfully registered");//Tell to them that they have successfully registered a new account
- return 1;
- }
- }
- if(dialogid == login) //If dialog id is a login dialog
- {//then
- if(!response) return Kick(playerid); //If they clicked the second button "Quit", we will kick them.
- if(response) //if they clicked the first button "Register"
- {//then
- new hashpass[129]; //Will create a new variable to hash his/her password
- WP_Hash(hashpass,sizeof(hashpass),inputtext); //Will hash inputted password
- if(!strcmp(hashpass,pInfo[playerid][Pass])) //If they have insert their correct password
- {//then
- INI_ParseFile(Path(playerid),"loadaccount_user",.bExtra = true, .extra = playerid);//We will load his account's data from user's path
- SetPlayerScore(playerid,pInfo[playerid][Scores]);//We will get their score inside of his user's account and we will set it here
- GivePlayerMoney(playerid,pInfo[playerid][Money]);//As explained above
- SendClientMessage(playerid,-1,"Welcome back! You have successfully logged in");//Tell them that they've successfully logged in
- }
- else //If they've entered an incorrect password
- {//then
- ShowPlayerDialog(playerid,login,DIALOG_STYLE_INPUT,"Login","Welcome back. This account is registered. \nInsert your password to login to your account.\nIncorrect password!","Login","Quit");//We will tell to them that they've entered an incorrect password
- return 1;
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement