24.05.2018, 14:35
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.
for example command: /getpass.
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 this could help you
PHP код:
|
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; }