This is not working -
cloudysky - 26.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] >= 1)
{
TogglePlayerSpectating(playerid, false);
LoginUser(playerid);
SpawnPlayer(playerid);
}
if( PlayerInfo[playerid][tutorial] == 0)
{
SendClientMessage(playerid, RED, "You left during the tutorial, not to worry here it is now.
ShowPlayerDialog(playerid, 100, DIALOG_STYLE_LIST, "What is meant by DM", "Deadmen\nDeathmatching\nDeathmaking\nDudemoaning", "Select", "Quit");
}
}
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");
}
}
The tutorial itself works and at the end it sets PlayerInfo[playerid][tutorial] =1;. The idea is that if they log out during the tutorial then they cannot log in and it puts them back into the tutorial. The problem however is that even if tutorial is = to 1 It still puts me in it. Help please.
Re: This is not working -
iPLEOMAX - 26.06.2011
In which way do you save the Player Info? File Systems, MySQL.. or other?
Re: This is not working -
cloudysky - 26.06.2011
Dini
Re: This is not working -
iPLEOMAX - 26.06.2011
Show us your enum..
Re: This is not working -
cloudysky - 26.06.2011
Why? I check the user file and tutorial is = to 1
Re: This is not working -
iPLEOMAX - 26.06.2011
Quote:
Originally Posted by cloudysky
Why? I check the user file and tutorial is = to 1
|
If you want the tutorial to not repeat when they leave in between. Then change the value to 1 when a player starts the tutorial..
Re: This is not working -
cloudysky - 26.06.2011
But i do want it to repeat when they leave thats the point, so they don't skip the tutorial when they log in. If I change it to 1 where your suggesting it, then they can just leave, join again and play without even looking at the tutorial.
EDIT: I dont want it to repeat for those that have already watched it all.
Re: This is not working -
iPLEOMAX - 26.06.2011
Ok, add another value then.
Example:
0 - Tutorial not seen.
1 - Left during the tut.
2 - Tutorial seen.
In short, When a player connects [First time], it will be 0.
> Showtutorial & set to 1.
> if player finished tutorial, set to 2.
> if player left in between, then it will remain 1...
So, player reconnecting...
> His value is 1, showtutorial.
> If he already seen, his value will be 2. So, let him continue without tut.
Re: This is not working -
cloudysky - 26.06.2011
Ok i see where your coming from i'll try it. But look at my code is there anything wrong with that cause that should be working and it really isn't...