
dialog help
By: a guest on
Aug 3rd, 2012 | syntax:
None | size: 1.80 KB | hits: 18 | expires: Never
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_REGISTER:
{
new dialog[128];{
if(inputtext[0] < 5) return SCM(playerid, COLOR_RED,"Your password must be longer than 4 characters!"); ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,""COL_RED"Password must be longer than 4 characters!", dialog, "Register", "Exit");}
if(response)
{
new
string[179],pFile[35];
format(pFile, 35, Player_File, GetName(playerid));
new
INI:UserFile = INI_Open(pFile);
INI_WriteInt(UserFile, "Password", udb_hash(inputtext));
INI_WriteInt(UserFile, "Admin", 0);
INI_WriteInt(UserFile, "Money", START_MONEY);
INI_WriteInt(UserFile, "Score", 0);
INI_WriteInt(UserFile, "Skin", SKIN_ID);
INI_WriteInt(UserFile, "Warn", 0);
INI_WriteInt(UserFile, "VIP", 0);
INI_WriteInt(UserFile, "B_Time", 0);
INI_WriteInt(UserFile, "B_Till", 0);
INI_Close(UserFile);
SetPVarInt(playerid, "Registered", 1);
SetPVarInt(playerid, "Logged", 1);
SpawnPlayer(playerid);
format(string, 125, ""COL_YELLOW"Name: "COL_WHITE"%s "COL_YELLOW"Password: "COL_WHITE"%s "COL_YELLOW"succesfuly registerd", GetName(playerid), inputtext);
SCM(playerid, 0x46BA29FF, string);
ShowPlayerDialog(playerid,100,DIALOG_STYLE_MSGBOX,"Rules","1.Cheating and hacking - Permban\n2./ask if you want help.\n3Disrespect will end in a ban.\nOnly English in chat.\nDifferent language in chat will end in ban.\n4.Respect All Players!","Agree","Deny");
SpawnPlayer(playerid);
}
else Kick(playerid);
}