Problem: Prvi puta radim sa dijalozima i tek se ucim 😄 , napravio sam po SAMP:WIKI dialog, i znaci kad utipkam komandu za taj dialog, odgovorim "yes" odma mi prebaci na dialog sa incorrect passwordom... neam pojma sta da radim xD
Dio skripte: evo vam ta dva dialog responsa...
case DIALOG_LOGIN:
{
if ( !response ) return Kick ( playerid );
if( response )
{
if(udb_hash(inputtext) == PlayerInfo)
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
new
tmp2[ 256 ],
playername2[ MAX_PLAYER_NAME ]
;
GetPlayerName(playerid, playername2, sizeof(playername2));
format(tmp2, sizeof(tmp2), "~w~Welcome ~n~~g~%s", playername2);
GameTextForPlayer(playerid, tmp2, 5000, 1);
SetTimerEx("UnsetFirstSpawn", 5000, false, "i", playerid);
GivePlayerCash(playerid, PlayerInfo);
SetSpawnInfo(playerid, PlayerInfo, PlayerInfo, PlayerInfo, PlayerInfo, PlayerInfo, 1.0, -1, -1, -1, -1, -1, -1);
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login","You have entered an incorrect password.\nType your password below to login.","Login","Quit");
}
return 1;
}
}
}
{
if(dialogid == 2)
{
if(response)// They pressed the first button
{
switch(dialogid)// Checking what dialog we're processing
{
case 1:// Our first dialog
{
switch(listitem)// Checking which item was chosen
{
case 0: // The first listitem
{
if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
GivePlayerMoney(playerid, -1);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
}
case 1: // The second listitem
{
if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
GivePlayerMoney(playerid, -2);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
}
case 2: // The third listitem
{
if(GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
GivePlayerMoney(playerid, -3);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
}
}
}
//From here we added things
case 2:// The new dialog
{
ApplyAnimation(playerid,"BEACH","Lay_Bac_Loop",4.1,1,1,1,1,10);//this will let you relax for 10 seconds
}
// Till here
}
}
}
}
return 1;
}