pawn Код:
dcmd_register(playerid, params[])
{
new string[128];
if(!strlen(params)) return SendClientMessage(playerid, RED, "USAGE: /REGISTER [PASSWORD] [PASSWORD MUST BE 6+ AND -25].");
if((strlen(params) < 6 || strlen(params) > 25)) return SendClientMessage(playerid,RED,"Password must be 6+ and -25");
if(Info[playerid][Registered]) return SendClientMessage(playerid,RED,"there is already a playerfile with yourname");
dini_Create(GetFile(playerid)); SetInfo(playerid,"Registered",1); SetInfo(playerid,"Password",udb_hash(params)); SetInfo(playerid,"logged",1);
format(string, 256, "You succesfully registered the nickname %s with password %s", Name(playerid), params); SetSInfo(playerid,"IP",PlayerIp(playerid));
GivePlayerMoney(playerid, 5000); // Setting $5000
SendClientMessage(playerid, YELLOW, string); Info[playerid][logged] = 1;
SendClientMessage(playerid, YELLOW, "You have been automatically logged in!");
return 1;
}