CMD:register(playerid, params[])
{
new filestring[128];
new kname[24];
GetPlayerName(playerid, kname, 24);
format(filestring, sizeof(filestring), "/Users/%s.ini", kname);
if(fexist(filestring)) return SCM(playerid, COLOR_ORANGE, "You are already registered, please /login.");
new hashpass[129];
WP_Hash(hashpass,sizeof(hashpass),hashpass);
if(sscanf(params, "s[129]", hashpass)) return SendClientMessage(playerid, -1, "{F70505}Usage: {FFFFFF}/register [password]");
new Year, Month, Day, Hour, Minute, Second;
getdate(Year, Month, Day);
gettime(Hour, Minute, Second);
new INI:File = INI_Open(Path(playerid));
INI_SetTag(File,"data");
INI_WriteString(File,"Password",hashpass);
INI_WriteInt(File,"Cash",0);
INI_WriteInt(File,"Admin",0);
INI_WriteInt(File,"Kills",0);
INI_WriteInt(File,"Deaths",0);
INI_WriteInt(File,"NoPm",0);
INI_WriteInt(File,"Mute",0);
INI_WriteInt(File,"Vip",0);
INI_WriteInt(File,"C4",0);
INI_WriteInt(File,"Banned",0);
INI_WriteInt(File,"Cookies",0);
INI_WriteInt(File,"Warn",0);
INI_WriteInt(File,"RegisterDate_day", Day);
INI_WriteInt(File,"RegisterDate_mon", Month);
INI_WriteInt(File,"RegisterDate_year",Year);
INI_WriteInt(File,"RegisterDate_hour",Hour);
INI_WriteInt(File,"RegisterDate_min", Minute);
INI_WriteInt(File,"RegisterDate_sec", Second);
INI_WriteInt(File,"Jailed", 0);
INI_WriteInt(File,"Logged", 1);
INI_WriteInt(File,"AdminActions", 0);
INI_WriteInt(File, "Rank", 0);
INI_Close(File);
PlayerInfo[playerid][pLogged] ++;
TotalRegister++;
SendClientMessage(playerid, COLOR_SYSTEM, "System: Registered and autologged! Next time you join be sure to /login!");
GameTextForPlayer(playerid, "~r~Registered ~w~and ~r~autologged~w~! Next time you join be sure to ~g~/login!", 5000, 3);
new echo[250];
new echo2[140];
new admin[140];
new IP[16];
GetPlayerIp(playerid, IP, 16);
format(echo,sizeof(echo),"0,3System: %s (%d) (IP: %s) has registered a new account - %02d:%02d:%02d - %02d:%02d:%02d",kname,playerid,IP,Day,Month,Year,Hour,Minute,Second);
format(echo2,sizeof(echo2),"0,3System: %s (%d) has registered a new account - Total Accounts: %d",kname,playerid,TotalRegister);
format(admin,sizeof(admin),"System: %s (%d) (IP: %s) has registered a new account - Total Accounts: %d.",kname,playerid,IP,TotalRegister);
IRC_GroupSay(gGroupID, IRC_ACHANNEL, echo);
IRC_GroupSay(gGroupID, IRC_CHANNEL, echo2);
SendMessageToAdmins(0x00FFFFFF,admin);
return 1;
}
Register Date: %02d/%02d/%02d - %02d:%02d:%02d\n",PlayerInfo[giveplayerid][RegisterDate_day],PlayerInfo[giveplayerid][RegisterDate_mon],PlayerInfo[giveplayerid][RegisterDate_year],PlayerInfo[giveplayerid][RegisterDate_hour],PlayerInfo[giveplayerid][RegisterDate_min],PlayerInfo[giveplayerid][RegisterDate_sec]);
RegisterDate_day,
RegisterDate_mon,
RegisterDate_year,
RegisterDate_hour,
RegisterDate_min,
RegisterDate_sec
well cant you open up the saved location and see if they are saved ?
|
For the love of god, stop coming to the forum for EVERY single thing you need help with.
|
Do you have a saving function what oyu use on disconnect or something, the fault can also be there.
And a loading function? |
new INI:File = INI_Open(Path(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Cash",GetPlayerCash(playerid));
INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
INI_WriteInt(File,"Kills",GetPlayerScore(playerid));
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
INI_WriteInt(File,"NoPm",PlayerInfo[playerid][pNopm]);
INI_WriteInt(File,"Mute",PlayerInfo[playerid][pMuted]);
INI_WriteInt(File,"Vip",PlayerInfo[playerid][pVip]);
INI_WriteInt(File,"C4",PlayerInfo[playerid][pC4]);
INI_WriteInt(File,"Banned",PlayerInfo[playerid][pBanned]);
INI_WriteInt(File,"Cookies",PlayerInfo[playerid][pCookies]);
INI_WriteInt(File,"Warn",PlayerInfo[playerid][pWarn]);
INI_WriteInt(File, "RegisterDate_day", PlayerInfo[playerid][RegisterDate_day]);
INI_WriteInt(File, "RegisterDate_mon", PlayerInfo[playerid][RegisterDate_mon]);
INI_WriteInt(File, "RegisterDate_year", PlayerInfo[playerid][RegisterDate_year]);
INI_WriteInt(File, "RegisterDate_hour", PlayerInfo[playerid][RegisterDate_hour]);
INI_WriteInt(File, "RegisterDate_min", PlayerInfo[playerid][RegisterDate_min]);
INI_WriteInt(File, "RegisterDate_sec", PlayerInfo[playerid][RegisterDate_sec]);
INI_WriteInt(File,"Jailed",PlayerInfo[playerid][pJailed]);
INI_WriteInt(File,"Logged",0);
INI_WriteInt(File,"B_Time",PlayerInfo[playerid][B_Time]);
INI_WriteInt(File,"B_Till",PlayerInfo[playerid][B_Till]);
INI_WriteInt(File,"AdminActions",PlayerInfo[playerid][pAdminActions]);
INI_WriteInt(File,"Rank",PlayerInfo[playerid][pRank]);
INI_Close(File);
do a "printf" see if the variables "Hour, Minute, Second" are actually set to anything
|