Help me please. - 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: Help me please. (
/showthread.php?tid=654241)
Help me please. -
Isteven - 24.05.2018
Hello friends i need your help. I want to script a command to get bnew reigsters's passsword can anyone help me?
for example command: /getpass.
Re: Help me please. -
CaptainBoi - 24.05.2018
maybe this could help you
PHP код:
CMD:getppass(playerid, params[])
{
new id,str[256], name[MAX_PLAYER_NAME];
if (adlvl[playerid] < 7) return 0;
if(sscanf(params,"i",id)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /getppass [playerid]");
if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, COLOR_RED, "ERROR: Inactive playerid.");
GetPlayerName(id, name ,sizeof(name));
format(str, sizeof(str), "%s's Password Is: %s", name, dini_Get(AddDirFile(dir_datafiles, FILE_REC), name));
SendClientMessage(playerid, COLOR_RED, str);
return 1;
}
maybe work rep me if it works ok
Re: Help me please. -
saffierr - 24.05.2018
It depends on what saving system your script uses.
Although it's quite user unfriendly if you'd ask me.
Re: Help me please. -
Isteven - 24.05.2018
Quote:
Originally Posted by CaptainBoi
maybe this could help you
PHP код:
CMD:getppass(playerid, params[])
{
new id,str[256], name[MAX_PLAYER_NAME];
if (adlvl[playerid] < 7) return 0;
if(sscanf(params,"i",id)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /getppass [playerid]");
if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, COLOR_RED, "ERROR: Inactive playerid.");
GetPlayerName(id, name ,sizeof(name));
format(str, sizeof(str), "%s's Password Is: %s", name, dini_Get(AddDirFile(dir_datafiles, FILE_REC), name));
SendClientMessage(playerid, COLOR_RED, str);
return 1;
}
maybe work rep me if it works ok
|
Bro i got a bug
[IMG]file:///C:/Users/Umer/Downloads/sa-mp-056.webp[/IMG]
Re: Help me please. -
CaptainBoi - 24.05.2018
pls what is bug huh
Re: Help me please. -
Isteven - 24.05.2018
Bro open this url YOu will get the proof
file:///C:/Users/Umer/Downloads/sa-mp-056.webp
The bug is that we cant see player's password.
it is just showing "Kevin's psasword is:
Re: Help me please. -
CaptainBoi - 24.05.2018
Код:
CMD:getpass(playerid, params[])
{
new string[256], pName[26];
if (adlvl[playerid] < 7) return 0;
GetPlayerName(playerid, pName, sizeof(pName));
if(sscanf(params, "s[26]", pName)) return SendClientMessage(playerid, COLOR_WHITE, "Usage: /getpass [PlayerName]");
if(!dini_Isset(AddDirFile(dir_datafiles, FILE_REC), pName)) return SendClientMessage(playerid, COLOR_RED, "Error: Account Doesn't Exist!");
format(string, sizeof(string), "Account Password Is: %s", dini_Get(AddDirFile(dir_datafiles, FILE_REC), pName));
SendClientMessage(playerid, -1, string);
return 1;
}
try this one maybe work