ItsMods

Full Version: MW3 Server Addon Extensions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
Code:
Vector angles = Extensions.GetAngles(ent15); // Get the angles of entity pro
angles.Y += 45; // Set the angels of entity pro with + 90 degrees
Extensions.SetAngles(ent15, angles); // Set the angels of entity pro

The default angles are (0, 0, 0), this can be simplified to:
Extensions.SetAngles(ent15, new Vector(0, 45, 0));

Code:
origin.Z += 30; // this will make it be on the top of carepackage
Extensions.PlayFX(stealthBombFx, origin); // Play the explosion on the place of origin (the var origin)

What do you mean by not working? Like nothing happens or what? Also, you're supposed to increase the Z axis before playing the FX to have it on the top the carepackage. Are you sure that you are looking at this care package when you spawn? That's why I always spawned the care package under the player's feet to always make sure the FX was working.
All works! You just can't see it! Make binding FX to any action!
For example. The approach to the box, as in my video.
It needs right spawn like mw2....
I spawned fire, and another fxs, you need to wait 2 secs before spawning/creating

Conclusion: its perfectly works.
Well i eventually got it to work, only problem now is the explosion goes off as soon as i spawn.

@alex, you say do it like yours, can i have an example?
(01-07-2013, 15:40)hillbilly Wrote: [ -> ]Well i eventually got it to work, only problem now is the explosion goes off as soon as i spawn.

@alex, you say do it like yours, can i have an example?

He just spawned it via player notify
(01-07-2013, 15:40)hillbilly Wrote: [ -> ]Well i eventually got it to work, only problem now is the explosion goes off as soon as i spawn.

@alex, you say do it like yours, can i have an example?

CSHARP Code
  1. public override ChatType OnSay(String Message, ServerClient Client, bool Teamchat)
  2. {
  3. float x = Client.OriginX + 100f;
  4. float y = Client.OriginY;
  5. float z = Client.OriginZ;
  6.  
  7. if (Message == "1")
  8. {
  9. var origin = new Vector(x, y, z);
  10. Extensions.PlayFX(Fx, origin);
  11. }
  12. return ChatType.ChatContinue;
  13. }
Alex will probably add as a premium player function
link??
/updated main post

I've added the Timing class which allows code to be executed/run on an interval like what the Timer class does or run code after a delay like using Thread.Sleep on a new thread, but what's great about this is that no extra threads need to be created because it relies on OnServerFrame and it's super easy to use.

Please refer to the main post for the example and the Timing.cs source. Make sure to uncomment the code at the top of the file if your project is using .NET Framework 2.0 or .NET Framework 3.0 (there is a comment at the top of the file if you forget).
(01-07-2013, 20:34)JariZ Wrote: [ -> ]Alex will probably add as a premium player function

I will do a global atmospheric mod.

But, PlayFX work only for Players currently on the map. If Player connect after PlayerFX, he sees no effect. If Player reconnect, effect also disappears.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22