Advertisement
NewbProgramming

RNPC for SampSharp

Mar 27th, 2017
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 23.73 KB | None | 0 0
  1. using System;
  2.  
  3. using SampSharp.GameMode.API.NativeObjects;
  4. using SampSharp.GameMode.World;
  5. using SampSharp.GameMode.SAMP;
  6. using SampSharp.GameMode.Definitions;
  7. using SampSharp.GameMode;
  8.  
  9. namespace SAMP.Include
  10. {
  11.     class RNPC
  12.     {
  13.         #region Variables
  14.  
  15.         static public readonly string VERSION           = "0.4.1";
  16.         static public readonly int    BUILD             = 14;
  17.         static public readonly string DATE              = "03.12.2014";
  18.         static public readonly string VERSION_DLPAGE    = "www.mauzen.org/rnpc";
  19.         static public readonly string VERSION_STARTURL  = "www.mauzen.org/rnpc/rnpc_start.php";
  20.         static public readonly string VERSION_UPDATEURL = "www.mauzen.org/rnpc/rnpc_update.php";
  21.  
  22.         // Identify messages as RNPC commands
  23.         // (alternative communication protocol for future versions)
  24.         static public readonly int COMM_ID = 520;
  25.        
  26.         public enum RecordingType
  27.         {
  28.             None,
  29.             Driver,
  30.             OnFoot
  31.         }
  32.  
  33.         static public readonly float SPEED_SPRINT   = (0.0095f);
  34.         static public readonly float SPEED_RUN      = (0.0057f);
  35.         static public readonly float SPEED_WALK     = (0.0015f);
  36.        
  37.         // RNPC_PEND_ACTION defines (Connection relevant states)
  38.         enum State
  39.         {
  40.             ActionReady         = (-1),
  41.             NotExisting         = (0),
  42.             ConnectionPending   = (1),
  43.             Connected           = (2),
  44.             Stopping            = (4) // Stop-playback performed
  45.         }
  46.  
  47.         // Adjustable stuff
  48.         static public readonly float VEHICLE_DMG_MOD = (160.0f);  // velocity * this value = vehicle hit damage
  49.  
  50.         // AddPause compatibility mode
  51.         static public readonly bool PAUSE_COMP = false;
  52.  
  53.         static public readonly bool DEBUG = true;
  54.  
  55.         class NonPlayerStruct
  56.         {
  57.             public State State = State.NotExisting;
  58.             public int CurrentSlot = 0;
  59.             public bool IsAttackable = false;
  60.             public float Health = 100.0f;
  61.             public bool IsDead = false;
  62.             public BasePlayer LastAssailant = null;
  63.             public Weapon DamageReason = Weapon.None;
  64.             public int VehicleHit = 0;
  65.         }
  66.  
  67.         static NonPlayerStruct[] NonPlayerData = new NonPlayerStruct[BasePlayer.Max];
  68.  
  69.         public delegate bool OnRNPCPlaybackFinished(BasePlayer npc);
  70.         static public event OnRNPCPlaybackFinished OnPlaybackFinished;
  71.  
  72.         public delegate bool OnRNPCPlaybackStopped(BasePlayer npc);
  73.         static public event OnRNPCPlaybackStopped OnPlaybackStopped;
  74.  
  75.         public delegate bool OnRNPCDeath(BasePlayer npc, BasePlayer assailant, Weapon reason);
  76.         static public event OnRNPCDeath OnDeath;
  77.  
  78.         public delegate bool OnRNPCVehicleHit(BasePlayer npc, BasePlayer driver, BaseVehicle vehicle, int times);
  79.         static public event OnRNPCVehicleHit OnVehicleHit;
  80.  
  81.         #endregion // Variables
  82.  
  83.         #region Functions
  84.        
  85.         static public bool Init()
  86.         {
  87.             BaseMode.Instance.PlayerConnected += (p, e) =>
  88.             {
  89.                 OnPlayerConnect((BasePlayer)p);
  90.             };
  91.             BaseMode.Instance.PlayerDisconnected += (p, e) =>
  92.             {
  93.                 OnPlayerDisconnect((BasePlayer)p, e.Reason);
  94.             };
  95.             BaseMode.Instance.PlayerSpawned += (p, e) =>
  96.             {
  97.                 OnPlayerSpawn((BasePlayer)p);
  98.             };
  99.             BaseMode.Instance.PlayerStreamIn += (p, e) =>
  100.             {
  101.                 OnPlayerStreamIn((BasePlayer)p, e.Player);
  102.             };
  103.             BaseMode.Instance.PlayerGiveDamage += (p, e) =>
  104.             {
  105.                 OnPlayerGiveDamage((BasePlayer)p, e.OtherPlayer, e.Amount, e.Weapon, e.BodyPart);
  106.             };
  107.             BaseMode.Instance.PlayerCommandText += (p, e) =>
  108.             {
  109.                 OnPlayerCommandText((BasePlayer)p, e.Text);
  110.             };
  111.             return true;
  112.         }
  113.  
  114.         static public bool SetAutorepeat(BasePlayer npc, int slot)
  115.         {
  116.             return SendMessage(npc, -1, "RNPC:{0}", 110 + slot);
  117.         }
  118.  
  119.         static public bool PauseRecordingPlayback(BasePlayer npc)
  120.         {
  121.             return SendMessage(npc, -1, "RNPC:103");
  122.         }
  123.  
  124.         static public bool ResumeRecordingPlayback(BasePlayer npc)
  125.         {
  126.             return SendMessage(npc, -1, "RNPC:104");
  127.         }
  128.  
  129.         static public bool ToggleVehicleCollisionCheck(BasePlayer npc, int slot)
  130.         {
  131.             return SendMessage(npc, -1, "RNPC:{0}", 115 + slot);
  132.         }
  133.  
  134.         static public bool StopPlayback(BasePlayer npc)
  135.         {
  136.             return SendMessage(npc, -1, "RNPC:102");
  137.         }
  138.  
  139.         static public bool SetShootable(BasePlayer npc, bool toggle)
  140.         {
  141.             var npcData = GetData(npc);
  142.             if (npcData == null) return false;
  143.  
  144.             npcData.IsAttackable = toggle;
  145.             return true;
  146.         }
  147.  
  148.         static public float GetHealth(BasePlayer npc)
  149.         {
  150.             var npcData = GetData(npc);
  151.             if (npcData == null) return float.NaN;
  152.             return npcData.Health;
  153.         }
  154.  
  155.         static public bool IsValid(BasePlayer npc)
  156.         {
  157.             var npcData = GetData(npc);
  158.             if (npcData == null) return false;
  159.             return true;
  160.         }
  161.  
  162.         static bool SendMessage(BasePlayer npc, Color color, string text)
  163.         {
  164.             var npcData = GetData(npc);
  165.             if(npcData == null) return false;
  166.  
  167.             if (DEBUG == true)
  168.             {
  169.                 Console.WriteLine("RNPC %d <-- [CMD] %s", npc.Id, text);
  170.             }
  171.  
  172.             npc.SendClientMessage(color, text);
  173.             return true;
  174.         }
  175.         static bool SendMessage(BasePlayer npc, Color color, string format, params object[] arguments)
  176.         {
  177.             return SendMessage(npc, color, string.Format(format, arguments));
  178.         }
  179.  
  180.         static NonPlayerStruct GetData(BasePlayer npc)
  181.         {
  182.             if(npc.IsNPC == false) return null;
  183.             return NonPlayerData[npc.Id];
  184.         }
  185.  
  186.         static public BasePlayer Connect(string name)
  187.         {
  188.             BasePlayer npc = Server.ConnectNPC(name, "RNPC");
  189.  
  190.             if(npc != null)
  191.             {
  192.                 return null;
  193.             }
  194.  
  195.             NonPlayerStruct npcData = new NonPlayerStruct();
  196.  
  197.             npcData.State = State.ConnectionPending;
  198.  
  199.             NonPlayerData[npc.Id] = npcData;
  200.             return npc;
  201.         }
  202.  
  203.         static public bool Move(BasePlayer npc, float x, float y, float z, float speed, int useZMap = 0)
  204.         {
  205.             var npcData = GetData(npc);
  206.             if(npcData == null) return false;
  207.  
  208.             RecordingType type = (npc.InAnyVehicle == true) ? RecordingType.Driver : RecordingType.OnFoot;
  209.             Vector3 position = (npc.InAnyVehicle == true) ? npc.Vehicle.Position : npc.Position;
  210.            
  211.             int slot = CreateBuild(npc, type, 95);
  212.             RNPCInternal.Instance.AddMovement(position.X, position.Y, position.Z, x, y, z, speed, useZMap);
  213.             RNPCInternal.Instance.FinishBuild();
  214.             StartBuildPlayback(npc, slot);
  215.             return true;
  216.         }
  217.  
  218.         static public int CreateBuild(BasePlayer npc, RecordingType type, int slot = 0)
  219.         {
  220.             var npcData = GetData(npc);
  221.             if (npcData == null) return -1;
  222.  
  223.             if(npcData.CurrentSlot == slot) {
  224.                 slot = (slot + 1) % 100;
  225.             }
  226.            
  227.             RNPCInternal.Instance.CreateBuild(npc.Id, (int)type, slot);
  228.             return slot;
  229.         }
  230.  
  231.         static public bool StartPlayback(BasePlayer npc, string rec)
  232.         {
  233.             var npcData = GetData(npc);
  234.             if(npcData == null) return false;
  235.            
  236.             SendMessage(npc, -1, "RNPC:109:%s", rec);
  237.             return true;
  238.         }
  239.  
  240.         static public bool StartBuildPlayback(BasePlayer npc, int slot = 0, BaseVehicle vehicle = null)
  241.         {
  242.             var npcData = GetData(npc);
  243.             if(npcData == null) return false;
  244.  
  245.             // If enabled, wait a bit till the NPC actually entered the vehicle
  246.             if(vehicle != null)
  247.             {
  248.                 npc.PutInVehicle(vehicle, 0);
  249.                
  250.                 Timer delayStart = new Timer(TimeSpan.FromMilliseconds(100), false);
  251.                 delayStart.Tick += (sender, e) =>
  252.                 {
  253.                     npc.PutInVehicle(vehicle, 0);
  254.  
  255.                     SendMessage(npc, -1, "RNPC:101:%d", slot);
  256.                     delayStart.Dispose();
  257.                 };
  258.             }
  259.  
  260.             npcData.CurrentSlot = slot;
  261.             SendMessage(npc, -1, "RNPC:101:%d", slot);
  262.             return true;
  263.         }
  264.  
  265.         static public bool SetHealth(BasePlayer npc, float health, BasePlayer assailant = null, Weapon reason = Weapon.Drown)
  266.         {
  267.             var npcData = GetData(npc);
  268.             if(npcData == null) return false;
  269.  
  270.             npcData.Health = health;
  271.  
  272.             npcData.LastAssailant = assailant;
  273.             npcData.DamageReason = reason;
  274.  
  275.             if(npcData.Health > 0.0f)
  276.             {
  277.                 return true;
  278.             }
  279.  
  280.             // Kill the NPC if hes not already dead
  281.             if(npcData.IsDead == true)
  282.             {
  283.                 return true;
  284.             }
  285.  
  286.             // Stop playback
  287.             StopPlayback(npc);
  288.             // --> When stopped, apply death animation
  289.             return true;
  290.         }
  291.  
  292.         static public bool IsVehicleOnPlayer(BasePlayer npc, BaseVehicle vehicle)
  293.         {
  294.             if(npc.InAnyVehicle == true)
  295.             {
  296.                 return false;
  297.             }
  298.             return (npc.Position.DistanceTo(vehicle.Position) <= 0.5);
  299.         }
  300.  
  301.         #endregion // Functions
  302.  
  303.         #region "Callbacks"
  304.  
  305.         static public bool OnPlayerConnect(BasePlayer npc)
  306.         {
  307.             var npcData = GetData(npc);
  308.             if(npcData == null) return false;
  309.  
  310.             npcData.State = State.Connected;
  311.             npcData.IsAttackable = false;
  312.             npcData.Health = 100.0f;
  313.             npcData.IsDead = false;
  314.             return true;
  315.         }
  316.  
  317.         static public bool OnPlayerDisconnect(BasePlayer npc, DisconnectReason reason)
  318.         {
  319.             var npcData = GetData(npc);
  320.             if (npcData == null) return false;
  321.  
  322.             npcData = null;
  323.             return true;
  324.         }
  325.  
  326.         static public bool OnPlayerSpawn(BasePlayer npc)
  327.         {
  328.             var npcData = GetData(npc);
  329.             if (npcData == null) return false;
  330.  
  331.             npcData.Health = 100.0f;
  332.             npcData.IsDead = false;
  333.             return true;
  334.         }
  335.  
  336.         static public bool OnPlayerGiveDamage(BasePlayer assailant, BasePlayer npc, float amount, Weapon weapon, BodyPart bodyPart)
  337.         {
  338.             var npcData = GetData(npc);
  339.             if (npcData == null) return false;
  340.             if (npcData.IsAttackable == false) return false;
  341.  
  342.             SetHealth(npc, npcData.Health - amount, assailant, weapon);
  343.             return true;
  344.         }
  345.  
  346.         static public bool OnPlayerStreamIn(BasePlayer npc, BasePlayer player)
  347.         {
  348.             var npcData = GetData(npc);
  349.             if (npcData == null) return false;
  350.             if (npcData.IsDead == false) return false;
  351.            
  352.             npc.ApplyAnimation("PED", "KO_skid_back", 4.1f, false, true, true, true, 0, true);
  353.             return true;
  354.         }
  355.  
  356.         static public bool OnPlayerCommandText(BasePlayer npc, string text)
  357.         {
  358.             var npcData = GetData(npc);
  359.             if (npcData == null) return false;
  360.  
  361.             string command = text.Substring(1, 8);
  362.  
  363.             if(DEBUG == true)
  364.             {
  365.                 Console.WriteLine("RNPC %d --> [CMD] %s", npc.Id, text);
  366.             }
  367.  
  368.             // NPC finished playback
  369.             if(command == "RNPC:002")
  370.             {
  371.                 // Reset current slot for RNPC_CreateBuild_s
  372.                 npcData.CurrentSlot = -1;
  373.  
  374.                 if(npcData.State != State.Stopping)
  375.                 {
  376.                     OnPlaybackFinished.Invoke(npc);
  377.                     return true;
  378.                 }
  379.  
  380.                 // Call OnRNPCPlaybackStopped instead and reset state
  381.                 npcData.State = State.Connected;
  382.  
  383.                 // Check if it was a stop caused by NPC death
  384.                 if(npcData.Health > 0.0 || npcData.IsDead == true)
  385.                 {
  386.                     // Dont call this for death-stops
  387.                     OnPlaybackStopped.Invoke(npc);
  388.                     return true;
  389.                 }
  390.  
  391.                 // Mark as finally dead in include
  392.                 npcData.IsDead = true;
  393.  
  394.                 // Tell NPC he's dead so he wont execute playbacks anymore
  395.                 SendMessage(npc, -1, "RNPC:112");
  396.  
  397.                 //
  398.                 if(OnDeath.Invoke(npc, npcData.LastAssailant, npcData.DamageReason) == false)
  399.                 {
  400.                     return true;
  401.                 }
  402.  
  403.                 // Default behaviour
  404.                 if(npcData.DamageReason != Weapon.Vehicle)
  405.                 {
  406.                     // If killed by vehicle, animation is already played
  407.                     switch(new Random().Next(0, 4))
  408.                     {
  409.                         case 0: npc.ApplyAnimation("PED", "KO_skid_back", 4.1f, false, true, true, true, 0, true); break;
  410.                         case 1: npc.ApplyAnimation("PED", "KO_skid_front", 4.1f, false, true, true, true, 0, true); break;
  411.                         case 2: npc.ApplyAnimation("PED", "KO_spin_L", 4.1f, false, true, true, true, 0, true); break;
  412.                         case 3: npc.ApplyAnimation("PED", "KO_spin_R", 4.1f, false, true, true, true, 0, true); break;
  413.                     }
  414.                 }
  415.  
  416.                 // CallLocalFunction("OnPlayerDeath", "iii", playerid, rnpcData[playerid][RNPC_LAST_DAMAGER], rnpcData[playerid][RNPC_LAST_REASON]);
  417.  
  418.                 Timer respawnNPC = new Timer(TimeSpan.FromSeconds(4), false);
  419.                 respawnNPC.Tick += (sender, e) =>
  420.                 {
  421.                     npc.Spawn();
  422.                     respawnNPC.Dispose();
  423.                 };
  424.                 return true;
  425.             }
  426.  
  427.             // NPC stopped playback (manual abort)
  428.             if(command == "RNPC:003")
  429.             {
  430.                 // Reset onfoot movements after manual playback stop
  431.                 if (npc.InAnyVehicle == false)
  432.                 {
  433.                     return true;
  434.                 }
  435.                
  436.                 // Create "blank" build and restore old static attributes
  437.                 RNPCInternal.Instance.CreateBuild(npc.Id, (int)RecordingType.OnFoot, 95);
  438.                 RNPCInternal.Instance.SetWeaponID((int)npc.Weapon);
  439.                 RNPCInternal.Instance.SetSpecialAction((int)npc.SpecialAction);
  440.                 RNPCInternal.Instance.SetAngleQuats(0.0f, 360.0f - npc.Angle, 0.0f);
  441.                 RNPCInternal.Instance.AddPause(5);
  442.                 RNPCInternal.Instance.FinishBuild();
  443.  
  444.                 // OnRNPCPlaybackStopped is called when the stop-playback is finished
  445.                 npcData.State = State.Stopping;
  446.  
  447.                 StartBuildPlayback(npc, 95);
  448.                 return true;
  449.             }
  450.  
  451.             // NPC reports possible run-over vehicle
  452.             // Do exact check and handle run-over
  453.             if(command == "RNPC:301")
  454.             {
  455.                 /*
  456.                 BaseVehicle vehicle = npc.Vehicle;
  457.                 BasePlayer driver = npc.Vehicle.Driver;
  458.  
  459.                 if(IsVehicleOnPlayer(npc, vehicle) == false)
  460.                 {
  461.                     return true;
  462.                 }
  463.  
  464. #if !defined RNPC_DONT_PAUSE_ON_VEHICLEHIT
  465.                 // On the first hit, pause playback        
  466.                 if (rnpcData[playerid][RNPC_VEHICLEHIT] == 0)
  467.                 {
  468.                     RNPC_PauseRecordingPlayback(playerid);
  469.                 }
  470.                 // Reset the reset timer
  471.                 if (rnpcData[playerid][RNPC_VEHICLEHIT_RESETTIMER] > 0)
  472.                 {
  473.                     KillTimer(rnpcData[playerid][RNPC_VEHICLEHIT_RESETTIMER]);
  474.                 }
  475.                 // Resets the vehicle hit status, even if the vehicle already is out of range          
  476.                 rnpcData[playerid][RNPC_VEHICLEHIT_RESETTIMER] = SetTimerEx("ResetVehicleHit", 2200, 0, "i", playerid);
  477. #endif
  478.  
  479.                     if (!CallLocalFunction("OnRNPCVehicleHit", "iiii", playerid, driverid, vehicleid, rnpcData[playerid][RNPC_VEHICLEHIT]))
  480.                     {
  481.                         // Default behaviour
  482.                         if (!rnpcData[playerid][RNPC_VEHICLEHIT])
  483.                         {
  484.                             // Initial hit damage
  485.                             new Float:vx, Float: vy, Float: vz;
  486.                             GetVehicleVelocity(vehicleid, vx, vy, vz);
  487.                             SetRNPCHealth(playerid, GetRNPCHealth(playerid) - floatsqroot(vx * vx + vy * vy + vz * vz) * RNPC_VEHICLE_DMG_MOD, driverid, 49);
  488.                         }
  489.                         else
  490.                         {
  491.                             // Constant standing damage
  492.                             SetRNPCHealth(playerid, GetRNPCHealth(playerid) - 1.0, driverid, 49);
  493.                         }
  494.  
  495.                     }
  496.                     rnpcData[playerid][RNPC_VEHICLEHIT]++;
  497.                 } /*else {
  498.             // If vehicle just left the player, resume reset hitstate instantly
  499.             // also setting up the stand-up resume timer
  500.             if (rnpcData[playerid][RNPC_VEHICLEHIT] > 0) {
  501.                 // Reset the reset timer
  502.                 if ((rnpcData[playerid][RNPC_VEHICLEHIT_RESETTIMER] > 0) && 0) {
  503.                     KillTimer(rnpcData[playerid][RNPC_VEHICLEHIT_RESETTIMER]);
  504.                 }  
  505.                 //ResetVehicleHit(playerid, RNPC_RESETVH_RESET);       
  506.             }
  507.         }
  508.                 */
  509.                 return true;
  510.             }
  511.             return true;
  512.         }
  513.  
  514.         #endregion // "Callbacks"
  515.     }
  516.  
  517.     public class RNPCInternal : NativeObjectSingleton<RNPCInternal>
  518.     {
  519.         // @since 0.2
  520.         [NativeMethod(Function = "RNPC_CreateBuild")]
  521.         public virtual int CreateBuild(int npcId, int type, int slot = 0)
  522.         {
  523.             throw new NativeNotImplementedException();
  524.         }
  525.  
  526.         [NativeMethod(Function = "RNPC_FinishBuild")]
  527.         public virtual int FinishBuild(int clear = 1)
  528.         {
  529.             throw new NativeNotImplementedException();
  530.         }
  531.  
  532.         [NativeMethod(Function = "RNPC_AddMovement")]
  533.         public virtual int AddMovement(float startX, float startY, float startZ, float endX, float endY, float endZ, float speed = (0.0057f), int useZMap = 0)
  534.         {
  535.             throw new NativeNotImplementedException();
  536.         }
  537.  
  538.         [NativeMethod(Function = "RNPC_ConcatMovement")]
  539.         public virtual int ConcatMovement(float x, float y, float z, float speed = (0.0057f), int useZMap = 0)
  540.         {
  541.             throw new NativeNotImplementedException();
  542.         }
  543.        
  544.         [NativeMethod(Function = "RNPC_AddPause")]
  545.         public virtual int AddPause(int time, int comp = 0)
  546.         {
  547.             throw new NativeNotImplementedException();
  548.         }
  549.  
  550.         [NativeMethod(Function = "RNPC_SetUpdateRate")]
  551.         public virtual int SetUpdateRate(int rate)
  552.         {
  553.             throw new NativeNotImplementedException();
  554.         }
  555.  
  556.         [NativeMethod(Function = "RNPC_SetLRKeys")]
  557.         public virtual int SetLRKeys(int leftRight)
  558.         {
  559.             throw new NativeNotImplementedException();
  560.         }
  561.  
  562.         [NativeMethod(Function = "RNPC_SetUDKeys")]
  563.         public virtual int SetUDKeys(int upDown)
  564.         {
  565.             throw new NativeNotImplementedException();
  566.         }
  567.  
  568.         [NativeMethod(Function = "RNPC_SetKeys")]
  569.         public virtual int SetKeys(int keys)
  570.         {
  571.             throw new NativeNotImplementedException();
  572.         }
  573.  
  574.         [NativeMethod(Function = "RNPC_SetQuat1")]
  575.         public virtual int SetQuat1(float w)
  576.         {
  577.             throw new NativeNotImplementedException();
  578.         }
  579.  
  580.         [NativeMethod(Function = "RNPC_SetQuat2")]
  581.         public virtual int SetQuat2(float x)
  582.         {
  583.             throw new NativeNotImplementedException();
  584.         }
  585.  
  586.         [NativeMethod(Function = "RNPC_SetQuat3")]
  587.         public virtual int SetQuat3(float y)
  588.         {
  589.             throw new NativeNotImplementedException();
  590.         }
  591.  
  592.         [NativeMethod(Function = "RNPC_SetQuat4")]
  593.         public virtual int SetQuat4(float z)
  594.         {
  595.             throw new NativeNotImplementedException();
  596.         }
  597.  
  598.  
  599.         [NativeMethod(Function = "RNPC_SetHealth")]
  600.         public virtual int SetHealth(int health)
  601.         {
  602.             throw new NativeNotImplementedException();
  603.         }
  604.  
  605.         [NativeMethod(Function = "RNPC_SetArmour")]
  606.         public virtual int SetArmour(int armour)
  607.         {
  608.             throw new NativeNotImplementedException();
  609.         }
  610.  
  611.         [NativeMethod(Function = "RNPC_SetSpecialAction")]
  612.         public virtual int SetSpecialAction(int specialAction)
  613.         {
  614.             throw new NativeNotImplementedException();
  615.         }
  616.  
  617.         [NativeMethod(Function = "RNPC_SetWeaponID")]
  618.         public virtual int SetWeaponID(int weaponId)
  619.         {
  620.             throw new NativeNotImplementedException();
  621.         }
  622.  
  623.         [NativeMethod(Function = "RNPC_SetAnimID")]
  624.         public virtual int SetAnimID(int animationId)
  625.         {
  626.             throw new NativeNotImplementedException();
  627.         }
  628.  
  629.         [NativeMethod(Function = "RNPC_SetAnimParams")]
  630.         public virtual int SetAnimParams(int parameters)
  631.         {
  632.             throw new NativeNotImplementedException();
  633.         }
  634.        
  635.         [NativeMethod(Function = "RNPC_SetAngleQuats")]
  636.         public virtual int SetAngleQuats(float a, float h, float b)
  637.         {
  638.             throw new NativeNotImplementedException();
  639.         }
  640.  
  641.         // @since 0.2.1
  642.         [NativeMethod(Function = "RNPC_GetBuildLength")]
  643.         public virtual int GetBuildLength()
  644.         {
  645.             throw new NativeNotImplementedException();
  646.         }
  647.  
  648.         // @since 0.3
  649.         [NativeMethod(Function = "RNPC_SetSirenState")]
  650.         public virtual int SetSirenState(int state)
  651.         {
  652.             throw new NativeNotImplementedException();
  653.         }
  654.  
  655.         [NativeMethod(Function = "RNPC_SetDriverHealth")]
  656.         public virtual int SetDriverHealth(int health)
  657.         {
  658.             throw new NativeNotImplementedException();
  659.         }
  660.  
  661.         [NativeMethod(Function = "RNPC_SetInternalPos")]
  662.         public virtual int SetInternalPos(float x, float y, float z)
  663.         {
  664.             throw new NativeNotImplementedException();
  665.         }
  666.  
  667.         [NativeMethod(Function = "RNPC_SetAcceleration")]
  668.         public virtual int SetAcceleration(float acceleration)
  669.         {
  670.             throw new NativeNotImplementedException();
  671.         }
  672.  
  673.         [NativeMethod(Function = "RNPC_SetDeceleration")]
  674.         public virtual int SetDeceleration(float deceleration)
  675.         {
  676.             throw new NativeNotImplementedException();
  677.         }
  678.  
  679.         [NativeMethod(Function = "RNPC_AddMovementAlt")]
  680.         public virtual int AddMovementAlt(float startX, float startY, float startZ, float endX, float endY, float endZ, float speed = (0.0057f), bool locked = true)
  681.         {
  682.             throw new NativeNotImplementedException();
  683.         }
  684.  
  685.         // @since 0.3.4
  686.         [NativeMethod(Function = "RNPC_CreateCustomBuild")]
  687.         public virtual int CreateCustomBuild(int type, string name)
  688.         {
  689.             throw new NativeNotImplementedException();
  690.         }
  691.     }
  692. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement