[Help]how to make zero gravity applied to specific users??
Featured Replies
Сейчас на странице 0
- Нет пользователей, просматривающих эту страницу
A better way to browse. Learn more.
A full-screen app on your home screen with push notifications, badges and more.
Используя этот сайт, вы соглашаетесь Условия использования.
Hi. i'm tring to use ac130 personally in the sky.
but, there is a problem.. when i apply zero gravity,
entire user's gravity are changed to zero including a user typing "ac130on".
is there a good way to make personal zero gravity?
Thank you for your help.
public override void OnSay(Entity player, string name, string message) { string mapname = Call("getdvar", "mapname"); switch (message) { case "speed": setMemAddrValue(getPlayerSpeed(player.EntRef), "Byte", 255); break; case "gravity": ////////////////////????? setMemAddrValue(getPlayerGravity(player.EntRef), "Byte", ???????); break; case "ac130on": player.AfterDelay(100, entity => { player.Call("setmovespeedscale", 2f); Gravity = 0; ///////////HERE, THIS WAY MAKES ZERO GRAVITY FOR ENTIRE USERS. ///////////IS THERE ANY WAY TO MAKE ZERO GRAVITY FOR SPECIFIC USERS? player.SetField("lastDroppableWeapon", player.CurrentWeapon); entity.Call("setorigin", new Parameter(new Vector3(player.Origin.X, player.Origin.Y, player.Origin.Z+1000))); entity.Call("setModel", "vehicle_ac130_low_mp"); entity.Call("setviewmodel", "viewmodel_base_viewhands"); entity.Call("thermalvisionfofoverlayon"); entity.GiveWeapon("ac130_25mm_mp"); entity.GiveWeapon("ac130_40mm_mp"); entity.GiveWeapon("ac130_105mm_mp"); entity.SwitchToWeaponImmediate("ac130_25mm_mp"); AfterDelay(500, () => { entity.Health = 999; }); break; case "ac130off": player.AfterDelay(100, entity => { Gravity = 800; player.Call("setmovespeedscale", 1f); entity.TakeWeapon("ac130_25mm_mp"); entity.TakeWeapon("ac130_40mm_mp"); entity.TakeWeapon("ac130_105mm_mp"); entity.Call("thermalvisionfofoverlayoff"); entity.Call("SwitchToWeapon", entity.GetField("lastDroppableWeapon")); POSITION.InitialPosition(entity, mapname); AfterDelay(500, () => { entity.Health = 100; }); }); break; public unsafe void setMemAddrValue(IntPtr addr, string datatype, double value, uint size = 0x4, uint pro = 0x40, uint lol = 0) { if (datatype == "int") *(int*)addr = Convert.ToInt32(value); else if (datatype == "uint") *(uint*)addr = Convert.ToUInt32(value); else if (datatype == "float") *(float*)addr = (float)value; else if (datatype == "Byte") *(Byte*)addr = (Byte)value; } IntPtr getPlayerSpeed(int ClientNum) { try { int na = 14500; int fa = 0x1AC54B6 + (ClientNum * na); //0x502B6A return (IntPtr)fa; } catch { return (IntPtr)0x1AC54B6; } } IntPtr getPlayerGravity(int ClientNum) { try { int na = ///?????; int fa = ///???? return (IntPtr)fa; } catch { return (IntPtr)////???????? } } public static unsafe int Gravity { get { return *((int*)0x4768C6); } set { *((int*)0x4768C6) = value; } } public static unsafe int Speed { get { return *((int*)0x4760ea); } set { *((int*)0x4760ea) = value; } }