Here it is. So if i run do function register function fails to load properly...
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_REGISTER:
{
if (!response) return Kick(playerid);
if(response)
{
new strText[179], naslov2[128];
if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,"Register","Welcome! This account is not registered.\nEnter your own password to create a new account.\nPlease enter the password!","Register","Quit");
format(naslov2, sizeof(naslov2), ""COL_GREEN2" Welcome"COL_WHITE" %s!", GetName(playerid)); //formating our title
format(strText, 179, ""COL_WHITE"______________________________\n\n"COL_GREEN2"Name"COL_WHITE" %s"COL_GREEN2" isn't registered!\n\n{F81414}Password must be between 4 and 35 characters!", GetName(playerid));
new INI:playerFile = INI_Open(UserPath(playerid));
new HashPass[129];
WP_Hash(HashPass, sizeof(HashPass), inputtext);
INI_SetTag(playerFile,"DATA");
INI_WriteString(playerFile, "Password", HashPass);
INI_WriteInt(playerFile, "Admin",0);
INI_WriteInt(playerFile, "VIP",0);
INI_WriteInt(playerFile, "BankAccount",0);
INI_WriteInt(playerFile, "Money",0);
INI_WriteInt(playerFile, "Score",0);
INI_WriteInt(playerFile, "Kills",0);
INI_WriteInt(playerFile, "Deaths",0);
INI_WriteInt(playerFile, "Online",0);
INI_WriteInt(playerFile, "Skin",0);
INI_WriteInt(playerFile, "Class",0);
INI_WriteInt(playerFile, "LastX",0);
INI_WriteInt(playerFile, "LastY",0);
INI_WriteInt(playerFile, "LastZ",0);
INI_WriteInt(playerFile, "Interior",0);
INI_WriteInt(playerFile, "VirtualWorld",0);
INI_WriteInt(playerFile, "Warned",0);
INI_WriteInt(playerFile, "Kicked",0);
INI_WriteInt(playerFile, "Banned",0);
INI_WriteInt(playerFile, "BanReason",0);
INI_WriteInt(playerFile, "Muted",0);
INI_WriteInt(playerFile, "Jailed",0);
INI_WriteInt(playerFile, "AdminJail",0);
INI_WriteInt(playerFile, "BizID",0);
INI_WriteInt(playerFile, "Rank",0);
INI_WriteInt(playerFile, "Faction",0);
INI_WriteInt(playerFile, "Leader",0);
INI_WriteInt(playerFile, "Vehicles",0);
INI_WriteInt(playerFile, "PhoneNumber",0);
INI_WriteInt(playerFile, "Pin",0);
INI_WriteInt(playerFile, "GunLic",0);
INI_WriteInt(playerFile, "DrivingLic",0);
INI_WriteInt(playerFile, "FlyingLic",0);
INI_WriteInt(playerFile, "Wanted",0);
INI_WriteInt(playerFile, "Cuffed",0);
INI_WriteInt(playerFile, "Drunk",0);
INI_WriteInt(playerFile, "UsedDrugs",0);
INI_WriteInt(playerFile, "Job",0);
INI_WriteInt(playerFile, "FishingLic",0);
INI_WriteInt(playerFile, "WantedLvl",0);
INI_WriteInt(playerFile, "Exp",0);
INI_WriteInt(playerFile, "Gps",0);
INI_WriteInt(playerFile, "JailTime",0);
INI_Close(playerFile);
format(strText, 179, "You have registered with name {FFFFFF}'%s' {FFFF00}and password {FFFFFF}'%s'{FFFF00}, you are automatic logged in!", GetName(playerid), inputtext);
ShowInfoDialog(playerid, strText);
ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"Fell free to have fun while server is in beta!","Ok","");
SetPVarInt(playerid, "Registered", 0);
SetPVarInt(playerid, "Logged", 1);
// do
// {
// PlayerInfo[playerid][pPin] = 1000 + random(8999);
// }
// while(PinUsed(playerid));
}
}