Thread Rating:
  • 9 Vote(s) - 4.56 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Release MW3 Server Addon Extensions
#61
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.
[Image: 30xhrep.png]

A casual conversation between barata and I about Nukem.
Reply

#62
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.
Reply

#63
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.
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#64
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?
[Image: b_560_95_1.png]


[Image: b_560_95_1.png]

Reply

#65
(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
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#66
(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. }
Reply

#67
Alex will probably add as a premium player function
Reply

#68
link??
Reply

#69
/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).
[Image: 30xhrep.png]

A casual conversation between barata and I about Nukem.
Reply

#70
(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.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Help, server Admin largosik 0 2,290 02-02-2019, 18:09
Last Post: largosik
  Add a point shop to my server h1dexyz 1 3,147 03-04-2018, 22:36
Last Post: h1dexyz
Lightbulb Preview Weapon Classe For Infected Clasic Server groochu1982 0 2,441 02-19-2017, 08:35
Last Post: groochu1982
Exclamation Help HOW CAN I TURN OFF THE "CROSSHAIR" IN MY SERVER? Eliichong0 0 2,806 06-16-2016, 16:01
Last Post: Eliichong0
Bug Upload files to FTP server S3VDIT0 4 4,581 01-28-2016, 17:17
Last Post: S3VDIT0

Forum Jump:


Users browsing this thread:
2 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.