Command Help
#5

I do it with ZCMD and sscanf:

pawn Код:
CMD:changepassword(playerid, params[])
{
new pass[24];
if(sscanf(params, "s[24]", pass)) return SendClientMessage(playerid, -1, "USAGE: /changepassword <pass>");
new file[128], pName[24];
GetPlayerName(playerid, 24, pName);
format(file, 128, "folder/%s.ini", pName); // Insert the utents' folder. Example: Utents/%s.ini.
new File:INI_Open(file);
INI_WriteString(File, "Password", pass);
INI_Close(File);
SendClientMessage(playerid, -1, "Your password has been changed.");
return 1;
}
Reply


Messages In This Thread
Command Help - by nigga'z - 09.01.2012, 18:15
Re: Command Help - by nigga'z - 10.01.2012, 11:32
Re: Command Help - by ScriptJorkis - 10.01.2012, 11:40
Re: Command Help - by nigga'z - 10.01.2012, 12:57
Re: Command Help - by mitosking - 10.01.2012, 13:02
Re: Command Help - by nigga'z - 10.01.2012, 13:37
Re: Command Help - by nigga'z - 10.01.2012, 16:54

Forum Jump:


Users browsing this thread: 2 Guest(s)