Jump to content

Recommended Posts

Posted

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;

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.