Jump to content

Problema spawn.


Casio

Recommended Posts

Salut,

Am si eu o problemuta. Cand cineva isi face un cont nou, arata ca si cum cade in aer 2-3 secunde si dupa aceea il spawneaza la locul respectiv.

As vrea ca atunci cand isi face cont, sa il dea direct acolo fara sa mai cada prin mapa. Sa ii dea un freeze cateva secunde.

Am postat mai jos codul care cred eu ca este. Multumesc!

Spoiler

        if(PNewReg[playerid] == 0)
        {
            //SetSpawnInfo(playerid, 0, PlayerStat[playerid][LastSkin], 1536.2251, -1675.9830, 13.3828, PlayerStat[playerid][LastA], 0, 0, 0, 0, 0, 0);
            //SetSpawnInfo(playerid, 0, PlayerStat[playerid][LastSkin],412.7721,1564.6931,1001.0000,167.5607, 0, 0, 0, 0, 0, 0);
            SetSpawnInfo(playerid, 0, PlayerStat[playerid][LastSkin], PlayerStat[playerid][LastX], PlayerStat[playerid][LastY], PlayerStat[playerid][LastZ], PlayerStat[playerid][LastA], 0, 0, 0, 0, 0, 0);
            SpawnPlayer(playerid);
            TogglePlayerControllable(playerid, 0);
            SetTimerEx("SpawnPlayerNoCrash", 2500, false, "d", playerid);
        }
        else if(PNewReg[playerid] == 2)
        {
            SetSpawnInfo(playerid, 0, PlayerStat[playerid][LastSkin], PlayerStat[playerid][LastX], PlayerStat[playerid][LastY], PlayerStat[playerid][LastZ], PlayerStat[playerid][LastA], 0, 0, 0, 0, 0, 0);
            //SetSpawnInfo(playerid, 0, PlayerStat[playerid][LastSkin], 1536.2251, -1675.9830, 13.3828, PlayerStat[playerid][LastA], 0, 0, 0, 0, 0, 0);
            //SetSpawnInfo(playerid, 0, PlayerStat[playerid][LastSkin],412.7721,1564.6931,1001.0000,167.5607, 0, 0, 0, 0, 0, 0);

            SpawnPlayer(playerid);
            TogglePlayerControllable(playerid, 0);
            SetTimerEx("SpawnPlayerNoCrash", 2500, false, "d", playerid);
        }
        else if(PNewReg[playerid] == 1)
        {
            SetSpawnInfo(playerid, 0, PlayerStat[playerid][LastSkin], PlayerStat[playerid][LastX], PlayerStat[playerid][LastY], PlayerStat[playerid][LastZ], PlayerStat[playerid][LastA], 0, 0, 0, 0, 0, 0);
            //SetSpawnInfo(playerid, 0, PlayerStat[playerid][LastSkin], 1536.2251, -1675.9830, 13.3828, PlayerStat[playerid][LastA], 0, 0, 0, 0, 0, 0);
            //SetSpawnInfo(playerid, 0, PlayerStat[playerid][LastSkin],412.7721,1564.6931,1001.0000,167.5607, 0, 0, 0, 0, 0, 0);
            SpawnPlayer(playerid);
            TogglePlayerControllable(playerid, 0);
            SetTimerEx("SpawnPlayerNoCrash", 2500, false, "d", playerid);
        }
        TextDrawShowForPlayer(playerid, ServerNameTextDraw);
        PlayerTextDrawShow(playerid, Serverurl[playerid]);
        PlayerStat[playerid][Spawned] = 1;
        SetMoney(playerid, PlayerStat[playerid][Money]);
        SetPlayerInterior(playerid, PlayerStat[playerid][LastInt]);
        SetPlayerVirtualWorld(playerid, PlayerStat[playerid][LastVW]);
        SetHealth(playerid, PlayerStat[playerid][Health]);
        SetArmour(playerid, PlayerStat[playerid][Armour]);
        SetCameraBehindPlayer(playerid);
        TogglePlayerControllable(playerid, 0);
        SetTimerEx("LoadingObjects", 4000, false, "d", playerid);
        SetPlayerFightingStyle(playerid, PlayerStat[playerid][FightStyle]);

        //}
        INI_Save();
        INI_Close();
    }
    return 1;

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.