Help me please.
#1

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.
Reply
#2

maybe this could help you

PHP код:
CMD:getppass(playeridparams[])
{
    new 
id,str[256], name[MAX_PLAYER_NAME];
    if (
adlvl[playerid] < 7) return 0;
    if(
sscanf(params,"i",id)) return SendClientMessage(playeridCOLOR_WHITE"USAGE: /getppass [playerid]");
    if(!
IsPlayerConnected(playerid)) return SendClientMessage(playeridCOLOR_RED"ERROR: Inactive playerid.");
    
GetPlayerName(idname ,sizeof(name));
    
format(strsizeof(str), "%s's Password Is: %s"namedini_Get(AddDirFile(dir_datafilesFILE_REC), name));
    
SendClientMessage(playeridCOLOR_REDstr);
    return 
1;

maybe work rep me if it works ok
Reply
#3

It depends on what saving system your script uses.
Although it's quite user unfriendly if you'd ask me.
Reply
#4

Quote:
Originally Posted by CaptainBoi
Посмотреть сообщение
maybe this could help you

PHP код:
CMD:getppass(playeridparams[])
{
    new 
id,str[256], name[MAX_PLAYER_NAME];
    if (
adlvl[playerid] < 7) return 0;
    if(
sscanf(params,"i",id)) return SendClientMessage(playeridCOLOR_WHITE"USAGE: /getppass [playerid]");
    if(!
IsPlayerConnected(playerid)) return SendClientMessage(playeridCOLOR_RED"ERROR: Inactive playerid.");
    
GetPlayerName(idname ,sizeof(name));
    
format(strsizeof(str), "%s's Password Is: %s"namedini_Get(AddDirFile(dir_datafilesFILE_REC), name));
    
SendClientMessage(playeridCOLOR_REDstr);
    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]
Reply
#5

pls what is bug huh
Reply
#6

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:
Reply
#7

Код:
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)