21.08.2012, 04:55
I'm not sure what to show, sorry.
Here's the check part I spoke about in the spawn check:
As you can see I've done some debugging, everytime I connect, it prints both "before settimer" and "after settimer".
Here's the actual WelcomeTimer callback:
Now when the player first connects, nothing from that prints, no 1, no 2, nothing. How ever when the player disconnects then re-connects, it all prints and all works 100%.
So yeah I have no idea what else to show because this is one of the weirdest bugs I've ever encountered, lol.
Here's the check part I spoke about in the spawn check:
pawn Код:
if(gIsPlayerLoggedIn[playerid] == 0)
{
ClearScreen(playerid);
TextDrawShowForPlayer(playerid, WelcomeScreen0);
TextDrawShowForPlayer(playerid, WelcomeScreen1);
TextDrawShowForPlayer(playerid, WelcomeScreen2);
TextDrawShowForPlayer(playerid, WelcomeScreen3);
print("before settimer");
WelcomeTimerEx[playerid] = SetTimerEx("WelcomeTimer", 2500, false, "i", playerid);
print("after settimer");
}
Here's the actual WelcomeTimer callback:
pawn Код:
public WelcomeTimer(playerid)
{
print("1");
new string[126];
print("2");
TextDrawHideForPlayer(playerid, WelcomeScreen0);
print("3");
TextDrawHideForPlayer(playerid, WelcomeScreen1);
print("4");
TextDrawHideForPlayer(playerid, WelcomeScreen2);
print("5");
TextDrawHideForPlayer(playerid, WelcomeScreen3);
print("6");
SetPlayerPos(playerid, -2089.1033, 2314.7834, 15.2437);
SetPlayerCameraPos(playerid, -2085.851562, 2313.926513, 27.484699);
SetPlayerCameraLookAt(playerid, -2090.496826, 2315.150634, 26.098077);
TogglePlayerControllable(playerid, 0);
format(string, sizeof(string), "{FFFFFF}You've connected to {33818E}Suburban Roleplay!");
SendClientMessage(playerid, -1, string);
if(fexist(UserPath(playerid)))
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
if(PlayerData[playerid][Registered] == 0) /* Register Player */
{
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "{FFFFFF}Register on Suburban Roleplay", "{FFFFFF}Welcome to Suburban Roleplay.\n\nYour account doesn't exist in our database. Please input a desired password below.", "Continue", "Quit");
}
else if(PlayerData[playerid][Registered] == 1) /* Login Player */
{
format(string, sizeof(string), "{FFFFFF}Welcome back, %s.\n\nPlease input your existing password below.", GetPlayersName(playerid));
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "{FFFFFF}Log back into Suburban Roleplay", string, "Login", "Leave");
}
}
else /* Register Player */
{
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "{FFFFFF}Register on Suburban Roleplay", "{FFFFFF}Welcome to Suburban Roleplay.\n\nYour account doesn't exist in our database. Please input a desired password below.", "Continue", "Quit");
}
KillTimer(WelcomeTimerEx[playerid]);
return 1;
}
So yeah I have no idea what else to show because this is one of the weirdest bugs I've ever encountered, lol.