Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Skin Selection problem [Only when registering]

$
0
0
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:
Code:

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:
Code:

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:
Code:

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:
Code:

public OnPlayerSpawn(playerid)
{
    SetPlayerInterior(playerid,0);
        return 1;
}

I have no errors nor warnings when compiling the script, any suggestions?

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>