Skin Selection problem [Only when registering]
#1

I have this annoying bug, when you register players camera is set in one place and not showing the "Spawn" button nor the arrows to choose the skin. When logging in i dont have this problem.

OnPlayerRequestClass:
Код:
public OnPlayerRequestClass(playerid, classid)
{
		SetPlayerInterior(playerid,11);
		SetPlayerPos(playerid,508.7362,-87.4335,998.9609);
		SetPlayerFacingAngle(playerid,0.0);
    	SetPlayerCameraPos(playerid,508.7362,-83.4335,998.9609);
		SetPlayerCameraLookAt(playerid,508.7362,-87.4335,998.9609);
		return 1;
}
OnPlayerConnect:
Код:
public OnPlayerConnect(playerid)
{
	{
	new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(string, sizeof(string), "%s has joined the server", pname);
    SendClientMessageToAll(0xAAAAAAAA, string);
    }
    if(fexist(UserPath(playerid)))
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit");
        SetPlayerScore(playerid,PlayerInfo[playerid][pScore]);
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
        SendClientMessage(playerid,COLOR_RED,"Type /spawn to spawn yourself succesfully.");
    }
	SetPlayerMapIcon(playerid, 12, 2413.159912, 1123.804077, 10.820312, 52, 0, MAPICON_LOCAL);
    return 1;
}
OnPlayerDisconnect:
Код:
public OnPlayerDisconnect(playerid, reason)
{
	{
	new pname[MAX_PLAYER_NAME], string[39 + MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    switch(reason)
    {
        case 0: format(string, sizeof(string), "%s has left the server. (Lost Connection)", pname);
        case 1: format(string, sizeof(string), "%s has left the server. (Leaving)", pname);
        case 2: format(string, sizeof(string), "%s has left the server. (Kicked)", pname);
    }
    SendClientMessageToAll(0xAAAAAAAA, string);
    }
    new INI:File = INI_Open(UserPath(playerid));
    INI_SetTag(File,"data");
    INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
    INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
    INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
    INI_WriteInt(File,"Score",GetPlayerScore(playerid));
    INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
    INI_Close(File);
    return 1;
}
OnPlayerSpawn:
Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerInterior(playerid,0);
	return 1;
}
I have no errors nor warnings when compiling the script, any suggestions?
Reply
#2

If I misunderstood, let me know.

Add in "OnPlayerRequestClass" CB

Код:
 TogglePlayerSpectating(playerid, false);
"OnPlayerConnect" CB

Код:
TogglePlayerSpectating(playerid, true);
Reply
#3

Quote:
Originally Posted by Bolex_
Посмотреть сообщение
If I misunderstood, let me know.

Add in "OnPlayerRequestClass" CB

Код:
 TogglePlayerSpectating(playerid, false);
"OnPlayerConnect" CB

Код:
TogglePlayerSpectating(playerid, true);
Tried it, even worse. The Truth skin is flying towards the sky with half of his body.
Any other suggestions?
Reply
#4

Disable spectating when player spawn
Reply
#5

Quote:
Originally Posted by Bolex_
Посмотреть сообщение
Disable spectating when player spawn
Now it works, but the player doesent get to chose the skin, just spawns with CJ skin.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)