Silly thing isn't working - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Silly thing isn't working (
/showthread.php?tid=264337)
Silly thing isn't working -
cloudysky - 25.06.2011
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_LOGIN:
{
if(!response)
{
SendClientMessage(playerid, COLOUR_RED, "Kick due to : Quitted login");
return Kick(playerid);
}
if(CheckUserLogin(playerid, inputtext))
{
if( PlayerInfo[playerid][tutorial] == 0)
{
SendClientMessage(playerid, COLOUR_BEACH, "Welcome to TT:AA. This is a quick test, followed by a tutorial to help you survive!" );
ShowPlayerDialog(playerid, 100, DIALOG_STYLE_LIST, "What is meant by DM", "Deadmen\nDeathmatching\nDeathmaking\nDeathmilk", "Select", "Quit");
}
if( PlayerInfo[playerid][tutorial] >= 1)
{
LoginUser(playerid);
SpawnPlayer(playerid);
}
}
else
{
SendClientMessage(playerid, COLOUR_RED, "Wrong password, please try again");
return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Login", "Type in your password to login", "Login", "Quit");
}
}
This isn't working. When your tutorial is at 0 it is meant to put you in the tutorial, but when it is one it isn't meant to. I really don't get understand why, but even when your tutorial = 1 it still puts me in the tutorial! Help!
Re: Silly thing isn't working -
iPLEOMAX - 25.06.2011
Change this:
pawn Код:
if( PlayerInfo[playerid][tutorial] == 0)
{
SendClientMessage(playerid, COLOUR_BEACH, "Welcome to TT:AA. This is a quick test, followed by a tutorial to help you survive!" );
ShowPlayerDialog(playerid, 100, DIALOG_STYLE_LIST, "What is meant by DM", "Deadmen\nDeathmatching\nDeathmaking\nDeathmilk", "Select", "Quit");
}
To:
pawn Код:
if( PlayerInfo[playerid][tutorial] == 0)
{
SendClientMessage(playerid, COLOUR_BEACH, "Welcome to TT:AA. This is a quick test, followed by a tutorial to help you survive!" );
ShowPlayerDialog(playerid, 100, DIALOG_STYLE_LIST, "What is meant by DM", "Deadmen\nDeathmatching\nDeathmaking\nDeathmilk", "Select", "Quit");
PlayerInfo[playerid][tutorial] = 1;
}
You forgot to change the value to 1. It remains 0, so, it keeps on showing the tut.