Can i change texts below? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Can i change texts below? (
/showthread.php?tid=601083)
Can i change texts below? -
EmiGjoni - 16.02.2016
Hello ive got code below and im not sure if i can change some things below
Код:
Dialog:Login(playerid, response, listitem, inputtext[])
{
if(!response) KickPlayer(playerid, "Failed to login"); //HERE FAILED to login can i change it to desired one?
if(response)
{
new query[300];
if(!strcmp(PasswordHash(inputtext), pInfo[playerid][pPass], false))
{
mysql_format(MysqlCon, query, sizeof(query), "SELECT * FROM `users` WHERE `user` = '%e' LIMIT 1", PlayerName(playerid));
mysql_tquery(MysqlCon, query, "OnAccountLoad", "i", playerid); //ALSO HERE OnAccountLoad
} else {
pInfo[playerid][LoginAttempt]++;
if(pInfo[playerid][LoginAttempt] == 1)
{
ShowDialog(playerid, 0);
SendClientMessage(playerid, COLOR_ERROR, "[ERROR]: "WHITE"You have entered an incorrect password. [1/3]");
} else if(pInfo[playerid][LoginAttempt] == 2)
{
ShowDialog(playerid, 0);
SendClientMessage(playerid, COLOR_ERROR, "[ERROR]: "WHITE"You have entered an incorrect password. [2/3]");
} else if(pInfo[playerid][LoginAttempt] == 3)
{
SendClientMessage(playerid, COLOR_ERROR, "[ERROR]: "WHITE"You have entered an incorrect password. [3/3]");
KickPlayer(playerid, "Max Password Attemps (3/3)"); //ALSO HERE MAX PW ATTEMPTS
}
}
}
return 1;
}
Re: Can i change texts below? -
zPain - 16.02.2016
It's okay to change items 1 and 3.
As for item 2, you'll have to search for something such as
PHP код:
forward OnAccountLoad(playerid);
public OnAccountLoad(playerid) {
//
}
and change it as well.
Re: Can i change texts below? -
EmiGjoni - 16.02.2016
OK TYSM, You can lock this @admin if u want