08.07.2016, 08:31
Why it doesn't work in game?
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == EBoss_Dialog)
{
if(response)
{
if(strlen(inputtext))
{
new string[500], date[20], year, month, day;
getdate(year, month, day);
format(string,sizeof(string),UFMUsers,nama(playerid));
format(date, sizeof(date), "%d/%d/%d", day, month, year);
dini_Create(string);
dini_IntSet(string, "Password", num_hash(inputtext));
dini_IntSet(string, "Skin", 0);
dini_IntSet(string, "Money", 7000);
dini_IntSet(string, "Kill", 0);
dini_IntSet(string, "Death", 0);
dini_IntSet(string, "Headshot", 0);
dini_IntSet(string, "Moneybag", 0);
dini_Set(string, "RegisteredTime", date);
dini_IntSet(string, "hours", 0);
dini_IntSet(string, "mins", 0);
dini_IntSet(string, "secs", 0);
dini_IntSet(string, "ConnectTime", 0);
dini_IntSet(string, "Deposit", 0);
dini_IntSet(string, "Withdraw", 0);
dini_IntSet(string, "DJ", 0);
dini_IntSet(string, "VIP", 0);
dini_IntSet(string, "ADM", 0);
dini_IntSet(string, "Logged", 1);
dini_IntSet(string, "Regged", 1);
dini_Set(string, "Tags", "");
SetData(playerid);
format(haha,sizeof(haha),"{00FF00}[ SUCCESS ]: {FFF000}%s[%d] Successfully Register,Say hi to him! [ Rewards:$70000 ]",nama(playerid),playerid)
SendClientMessage(-1,haha);
// dini_IntSet(string, "", 0);
} else if(!strlen(inputtext)) { return SendClientMessage(playerid,-1,"{FF0000}[ ERROR ]: {FFF000}You must fill in the password on the textbox!"); }
} else if(!response){ return SendClientMessage(playerid,-1,"{FF0000}[ ERROR ]: {FFF000}You must register to play at this server!"); }
}
if(dialogid == EBoss_Dialog+1)
{
if(response)
{
if(strlen(inputtext))
{
new string[500];
format(string,sizeof(string),UFMUsers,nama(playerid));
if(num_hash(inputtext) != dini_Int(string,"Password"))
{
SendClientMessage(playerid,-1,"{FF0000}[ ERROR ]: {FFF000}You're password is incorrect!");
ShowLogin(playerid);
} else if(num_hash(inputtext) == dini_Int(string,"Password"))
SetData(playerid);
} else if(!strlen(inputtext)) { SendClientMessage(playerid,-1,"{FF0000}[ ERROR ]: {FFF000}You must fill in the password on the textbox!"); return ShowLogin(playerid); }
} else if(!response){ SendClientMessage(playerid,-1,"{FF0000}[ ERROR ]: {FFF000}You must login to play at this server!"); return ShowLogin(playerid); }
}
return 1;
}