else { ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,"Registering...","Type your password below to register a new account.","Register","Quit"); } PlayerInfo[playerid][pAdminLevel] = 0; PlayerInfo[playerid][pDeaths] = 0; GivePlayerMoney(playerid, 2500); PlayerInfo[playerid][pBanned] = 0; PlayerInfo[playerid][pScore] = 0; PlayerInfo[playerid][pKills] = 0; PlayerInfo[playerid][Team] = -1;
Hello,
I have this under the OnPlayerConnect callback.. Код:
else { ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,"Registering...","Type your password below to register a new account.","Register","Quit"); } PlayerInfo[playerid][pAdminLevel] = 0; PlayerInfo[playerid][pDeaths] = 0; GivePlayerMoney(playerid, 2500); PlayerInfo[playerid][pBanned] = 0; PlayerInfo[playerid][pScore] = 0; PlayerInfo[playerid][pKills] = 0; PlayerInfo[playerid][Team] = -1; |
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Cash",0);
INI_WriteInt(File,"Admin",0);
INI_WriteInt(File,"Kills",0);
INI_WriteInt(File,"Deaths",0);
INI_WriteInt(File,"Score",0);
INI_WriteInt(File,"Online",1);
INI_WriteInt(File,"Banned",0);
INI_WriteInt(File,"Bans",0);
INI_WriteInt(File,"Vip",0);
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"Login","Type your password below to login.","Login","Quit");
ForceClassSelection(playerid);
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,"Registering...","Type your password below to register a new account.","Register","Quit");
}
PlayerInfo[playerid][pAdminLevel] = 0;
PlayerInfo[playerid][pDeaths] = 0;
GivePlayerMoney(playerid, 2500);
PlayerInfo[playerid][pBanned] = 0;
PlayerInfo[playerid][pScore] = 0;
PlayerInfo[playerid][pKills] = 0;
PlayerInfo[playerid][Team] = -1;
new name[24];
GetPlayerName(playerid, name, sizeof name);
new string[128];