public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch( dialogid )
{
case DIALOG_REGISTER:
{
if(response)
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"Registracija",""COL_RED"Ukucali ste pogresan password.\n"COL_WHITE"Upisite password da registrujete vas racun.","Register","Quit");
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Novac",0);
INI_WriteInt(File,"Admin",0);
INI_WriteInt(File,"Zemlja",0);
INI_WriteInt(File,"Godine",0);
INI_WriteInt(File,"Posao",0);
INI_Close(File);
SetSpawnInfo(playerid, 0, 0, 671.40002441406, -457.89999389648, 16.5, 269.15, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
}
}
case DIALOG_LOGIN:
{
if( response )
{
if(udb_hash(inputtext) == PlayerInfo)
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
GivePlayerMoney(playerid, PlayerInfo);
SetSpawnInfo(playerid, 0, 0, 671.40002441406, -457.89999389648, 16.5, 269.15, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"Ukucali ste pogresan password\n"COL_WHITE"Ukoliko 3 puta pogresis dobijas BAN.","Login","Izlaz");
}
return 1;
}
}
return 1;
}
Odgovorio na
Jul 23, 2012
[Pomoc]Only a singl statament
GTA San Andreas Multiplayer / Pitanja & Pomoć