Adminlevel = 0 Money = 0 Scores = 0 Kills = 0 Banned = 0 Hours = 0 Deaths = 0 [Destiny Gang Wars Player Informa] Password = 523B1F27E81DF2C39FE06D9958F88C7D56F1C8669A822481845A0E3C84D68CCC13F69BD8A8A56ADE83D54230396EDA4A8CBA845B7F553D37E99EBCBFB1B6374C AdminLevel = 0 Money = 0 Kills = 0 Banned = 0 PlayingTime = 0 Deaths = 0
Where it saves the INI..probably OnPlayerDisconnect
and also where it creates the INI..most probably OnPlayerConnect |
public OnPlayerDisconnect(playerid, reason)
{
// - - General Stuff - - //
aDuty[playerid] = 0;
new pName[MAX_PLAYER_NAME], Str[64];
GetPlayerName(playerid, pName, sizeof(pName));
// - - Leaving Message - - //
switch(reason)
{
case 0: format(Str, sizeof(Str), "{FF8000}>{C0C0C0} %s Has Left The Server {FF0000}(Timeout)", pName);
case 1: format(Str, sizeof(Str), "{FF8000}>{C0C0C0} %s Has Left The Server {FF0000}(Leaving)", pName);
}
SendClientMessageToAll(-1, Str);
// - - Saving Stats - - //
if(fexist(UserPath(playerid)))
{
new INI:File = INI_Open(UserPath(playerid));
INI_WriteInt(File, "Adminlevel", pInfo[playerid][Adminlevel]);
INI_WriteInt(File, "Money", GetPlayerMoney(playerid));
INI_WriteInt(File, "Scores", GetPlayerScore(playerid));
INI_WriteInt(File, "Kills", pInfo[playerid][Kills]);
INI_WriteInt(File, "Banned", pInfo[playerid][Banned]);
INI_WriteInt(File, "Hours", pInfo[playerid][pPlayingTime]);
INI_WriteInt(File, "Deaths", pInfo[playerid][Deaths]);
INI_Close(File);
return 1;
}
return 1;
}
CMD:register(playerid, params[])
{
if(fexist(UserPath(playerid))) return SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You Are Already Registered");
if(isnull(params)) return SendClientMessage(playerid, -1, "{FF8000}USAGE: {FFFFFF}/register [password]");
new pName[MAX_PLAYER_NAME], HashPass[129];
GetPlayerName(playerid, pName, sizeof(pName));
WP_Hash(HashPass, sizeof(HashPass), params);
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File, "Destiny Gang Wars Player Information");
INI_WriteString(File, "Password", HashPass);
INI_WriteInt(File, "AdminLevel", 0);
INI_WriteInt(File, "Money", 0);
INI_WriteInt(File, "Kills", 0);
INI_WriteInt(File, "Banned", 0);
INI_WriteInt(File, "PlayingTime", 0);
INI_WriteInt(File, "Deaths", 0);
INI_Close(File);
SendClientMessage(playerid, -1, "{FF8000}>>{FFFFFF} You Have Been {00FF00}Successfully{FFFFFF} Registered");
return 1;
}