コード例 #1
0
 public async Task resurrectPlayer()
 {
     Function.Call((Hash)0x71BC8E838B9C6035, API.PlayerPedId());
     Function.Call((Hash)0x0E3F4AF2D63491FB);
     Function.Call((Hash)0xD63FE3AF9FB3D53F, true);
     Function.Call((Hash)0x1B3DA717B9AFF828, true);
     TriggerServerEvent("vorp:ImDead", false);
     setDead = false;
     SpawnPlayer.setPVP();
 }
コード例 #2
0
        public async Task resurrectPlayer()
        {
            Function.Call((Hash)0x71BC8E838B9C6035, API.PlayerPedId()); //This is from kaners? https://vespura.com/doc/natives/#_0x71BC8E838B9C6035 are u sure? lol amazing
            API.AnimpostfxStop("DeathFailMP01");
            API.DoScreenFadeIn(1000);
            TriggerServerEvent("vorp:ImDead", false);
            setDead = false;
            await Delay(100);

            API.NetworkSetInSpectatorMode(false, API.PlayerPedId());
            Function.Call((Hash)0xD63FE3AF9FB3D53F, true);
            Function.Call((Hash)0x1B3DA717B9AFF828, true);
            SpawnPlayer.setPVP();
        }
コード例 #3
0
        public static async Task resspawnPlayer()
        {
            JToken respawnCoords = Utils.GetConfig.Config["RespawnCoords"];

            Function.Call((Hash)0x203BEFFDBE12E96A, API.PlayerPedId(), respawnCoords[0].ToObject <float>(), respawnCoords[1].ToObject <float>(), respawnCoords[2].ToObject <float>(), respawnCoords[3].ToObject <float>(), false, false, false);
            await Delay(10);

            Function.Call((Hash)0x71BC8E838B9C6035, API.PlayerPedId());
            Function.Call((Hash)0x0E3F4AF2D63491FB);
            Function.Call((Hash)0xD63FE3AF9FB3D53F, true);
            Function.Call((Hash)0x1B3DA717B9AFF828, true);
            TriggerServerEvent("vorp:ImDead", false);
            setDead = false;
            SpawnPlayer.setPVP();
        }
コード例 #4
0
        public static async Task resspawnPlayer()
        {
            Function.Call((Hash)0x71BC8E838B9C6035, API.PlayerPedId());
            API.AnimpostfxStop("DeathFailMP01");
            JToken respawnCoords = Utils.GetConfig.Config["RespawnCoords"];

            Function.Call((Hash)0x203BEFFDBE12E96A, API.PlayerPedId(), respawnCoords[0].ToObject <float>(), respawnCoords[1].ToObject <float>(), respawnCoords[2].ToObject <float>(), respawnCoords[3].ToObject <float>(), false, false, false);
            await Delay(100);

            TriggerServerEvent("vorpcharacter:getPlayerSkin");
            API.DoScreenFadeIn(1000);
            TriggerServerEvent("vorp:ImDead", false); //This is new or copy can u send me a dm?
            setDead = false;
            API.NetworkSetInSpectatorMode(false, API.PlayerPedId());
            Function.Call((Hash)0xD63FE3AF9FB3D53F, true);
            Function.Call((Hash)0x1B3DA717B9AFF828, true);
            SpawnPlayer.setPVP();
        }
コード例 #5
0
ファイル: RespawnSystem.cs プロジェクト: RedWest-RP/VORP-Core
        public static async Task respawnPlayer()
        {
            Function.Call((Hash)0x71BC8E838B9C6035, API.PlayerPedId()); //This is from kaners? https://vespura.com/doc/natives/#_0x71BC8E838B9C6035 are u sure? lol amazing
            API.AnimpostfxStop("DeathFailMP01");
            Vector3 curPos  = API.GetEntityCoords(API.PlayerPedId(), false, false);
            float   heading = API.GetEntityHeading(API.PlayerPedId());

            Function.Call((Hash)0x203BEFFDBE12E96A, API.PlayerPedId(), curPos.X, curPos.Y, curPos.Z, heading, false, false, false);
            await Delay(100);

            TriggerServerEvent("vorpcharacter:getPlayerSkin");
            API.DoScreenFadeIn(1000);
            TriggerServerEvent("vorp:ImDead", false); //This is new or copy can u send me a dm?
            TriggerEvent("vorp:ImDead", false);       //This is new or copy can u send me a dm?
            setDead = false;
            API.NetworkSetInSpectatorMode(false, API.PlayerPedId());
            Function.Call((Hash)0xD63FE3AF9FB3D53F, true);
            Function.Call((Hash)0x1B3DA717B9AFF828, true);
            SpawnPlayer.setPVP();
        }
コード例 #6
0
        public static async Task resspawnPlayer()
        {
            Function.Call((Hash)0x71BC8E838B9C6035, API.PlayerPedId());
            API.AnimpostfxStop("DeathFailMP01");
            string  currentHospital = string.Empty;
            float   minDistance     = -1;
            Vector3 playerCoords    = API.GetEntityCoords(API.PlayerPedId(), true, true);

            foreach (JToken Hospitals in Utils.GetConfig.Config["hospital"].Children())
            {
                foreach (JToken Hospital in Hospitals.Children())
                {
                    Vector3 Doctor          = new Vector3(Hospital["x"].ToObject <float>(), Hospital["y"].ToObject <float>(), Hospital["z"].ToObject <float>());
                    float   currentDistance = API.GetDistanceBetweenCoords(playerCoords.X, playerCoords.Y, playerCoords.Z, Doctor.X, Doctor.Y, Doctor.Z, false);
                    if (minDistance != -1 && minDistance >= currentDistance)
                    {
                        minDistance     = currentDistance;
                        currentHospital = Hospital["name"].ToObject <string>();
                    }
                    else if (minDistance == -1) // 1st time
                    {
                        minDistance     = currentDistance;
                        currentHospital = Hospital["name"].ToObject <string>();
                    }
                }
            }
            Function.Call((Hash)0x203BEFFDBE12E96A, API.PlayerPedId(), Utils.GetConfig.Config["hospital"][currentHospital]["x"].ToObject <float>(), Utils.GetConfig.Config["hospital"][currentHospital]["y"].ToObject <float>(), Utils.GetConfig.Config["hospital"][currentHospital]["z"].ToObject <float>(), Utils.GetConfig.Config["hospital"][currentHospital]["h"].ToObject <float>(), false, false, false);

            await Delay(100);

            TriggerServerEvent("vorpcharacter:getPlayerSkin");
            API.DoScreenFadeIn(1000);
            TriggerServerEvent("vorp:ImDead", false); //This is new or copy can u send me a dm?
            setDead = false;
            API.NetworkSetInSpectatorMode(false, API.PlayerPedId());
            Function.Call((Hash)0xD63FE3AF9FB3D53F, true);
            Function.Call((Hash)0x1B3DA717B9AFF828, true);
            SpawnPlayer.setPVP();
        }