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
(12-12-2012, 14:41)archit Wrote: [ -> ]Where is my QCZM folder I now feel bad I abandoned it

Oh noes... Dumb Bitch

Ontopic, i would see qczm there. ( Not 4d1 )
/updated

Added angle craps. FX coming soon.
/updated

Added FX support (LoadFX/PlayFX), refer to the main post for the example.
Yaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaay
rep++;
Thank you for FX !!!!

It looks like this:

dang it, can't get it to work
Fog:

Notice:

Sometimes int something = LoadFx( - won't work. So just do PlayFx(LoadFx("fx"), pos)
(01-06-2013, 14:47)hillbilly Wrote: [ -> ]dang it, can't get it to work

Show me your code.

(01-06-2013, 16:39)SailorMoon Wrote: [ -> ]Notice:

Sometimes int something = LoadFx( - won't work. So just do PlayFx(LoadFx("fx"), pos)

Hmm? What do you mean it won't work? And also, pretty sure any FX must be loaded on the OnPrecache override so LoadFX will probably return 0 if you do that.
Partially Working


Code:
using System.Collections.Generic;
using System.Text;
using Addon;

namespace Boxes
{
    public class Class1 : CPlugin
    {
        private int stealthBombFx;
    
        public override void OnPrecache()
        {
            // Load the stealth_bomb_mp FX, it is important to preload ALL fx in the OnPrecache override.
            stealthBombFx = Extensions.LoadFX("explosions/stealth_bomb_mp");
        }
        public override void OnPlayerSpawned(ServerClient Client)
        {
            // public override void OnMapChange() // When the map changes
            // }

            string map = GetDvar("mapname");
            {
                if (map == "mp_carbon")

then this in the map i want it to spawn etc.
Code:
// Spawn a care package with a collision, making it solid.
                    var origin = new Vector(-724f, -1760f, 3f);
                    Entity ent15 = SpawnModel("script_model", "com_plasticcase_green_big_us_dirt", origin);
                    Extensions.CloneBrushModelToScriptModel(ent15, Extensions.FindAirdropCrateCollisionId());

                    // Rotate the care package 90 degrees.
                    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

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

Spawn and angles work just not Extensions.PlayFX(stealthBombFx, origin); // Play the explosion on the place of origin (the var origin)
origin.Z += 30; // this will make it be on the top of carepackage
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22