Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help play FX
#1
Question 
Say whether to run my code playback FX? and here we go I copied the code from here Nyan Cat http://www.itsmods.com/forum/Thread-Rele...Boxes.html and added some lines from one mode Nyan Cat, and then I found a list of FX http://www.itsmods.com/forum/Thread-Tuto...st-V1.html, and we've got here is a code Extensions.PlayFX (Extensions.LoadFX ("car_fire_mp_mp"), new Vector (265.0659f, 2875.967f,-254.875f)); and then I put together and I got it here Nyan Cat
Code:
using System;
using Addon;

namespace Addon
{
    public class Boxes : CPlugin
    {
        public override ChatType OnSay(String Message, ServerClient Client, bool Teamchat)
        {
            if (Message == "!noclip")
            {
                Client.Other.NoClip = !Client.Other.NoClip;
                return ChatType.ChatNone;

            }
            if (Message == "!pos")
            {
                ServerPrint(Client.Name + "is on the position X: " + Client.OriginX + " Y: " + Client.OriginY + " Z: " + Client.OriginZ);
                TellClient(Client.ClientNum, "You are on the position X: " + Client.OriginX + " Y: " + Client.OriginY + " Z: " + Client.OriginZ, true);
                return ChatType.ChatNone;
            }
        }
        public override void OnMapChange()
        {
            string map = GetDvar("mapname");
            if (map == "mp_dome")
            {
                Extensions.PlayFX(Extensions.LoadFX("car_fire_mp_mp"), new Vector(265.0659f, 2875.967f, -254.875f));
            }
        }
    }
}

when I go to these coordinates, I see the fire? or am I mistaken? help please! SSORY me is that I do not teach English!
Reply

#2
you have to preload the fx in OnPrecache(), look at the example code in the extension thread.
Reply

#3
you need to load FX on precache
Reply

#4
also check your actual FX it's car_fire_mp NOT car_fire_mp_mp
Reply

#5
(04-30-2013, 20:32)hillbilly Wrote: also check your actual FX it's car_fire_mp NOT car_fire_mp_mp

This FX is not even exists. All FXs was sorted in folders.

Note: Some FXs won't work at some maps. Because every map has different FXs. (Sometimes same).
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#6
please example example!
Reply

#7
(05-07-2013, 05:40)Jone Calerone Wrote: please example example!

look ad this example Smile

Code:
}
         public override void OnPrecache()
         {
            string map = GetDvar("mapname");
            if (map == "mp_terminal_cls")
            {
                Extensions.PlayFX(Extensions.LoadFX("explosions/stealth_bomb_mp"), new Vector(0f, 0f, 70f));
            }
Reply

#8
(05-08-2013, 10:27)X-Track Wrote:
(05-07-2013, 05:40)Jone Calerone Wrote: please example example!

look ad this example Smile

Code:
}
         public override void OnPrecache()
         {
            string map = GetDvar("mapname");
            if (map == "mp_terminal_cls")
            {
                Extensions.PlayFX(Extensions.LoadFX("explosions/stealth_bomb_mp"), new Vector(0f, 0f, 70f));
            }
dont work
using System;
using Addon;
using System.IO;

namespace Addon
{
public class Boxes : CPlugin // : CPlugin
{
public override void OnPrecache()
{
string map = GetDvar("mapname");
if (map == "mp_dome")
{
Extensions.PlayFX(Extensions.LoadFX("hallway_smoke_mp"), new Vector(-512.7782f, 409.5407f, -368.6243f));
}
}
}
}
Reply

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

namespace ClassLibrary1
{
    public class Class1:CPlugin
    {
        int fx = 0;
        string map = "";
        public override void OnPrecache()
        {
            fx = Extensions.LoadFX("smoke/hallway_smoke_light");
        }
        public override void OnMapChange()
        {
            map = GetDvar("mapname");
        }
        public override ChatType OnSay(string Message, ServerClient Client)
        {
            if (Message == "!fx")
            {
                if (map == "mp_dome")
                {
                    Extensions.PlayFX(fx, new Vector(Client.OriginX, Client.OriginY, Client.OriginX));
                }
            }
        }
    }
}

load fx OnPrecache and play it on your location when you type !fx
is it really that hard to look at the example in the Extensions thread?
Reply

#10
(05-08-2013, 14:37)8q4s8 Wrote:
Code:
using System;
using System.Collections.Generic;
using Addon;
using System.Text;

namespace ClassLibrary1
{
    public class Class1:CPlugin
    {
        int fx = 0;
        string map = "";
        public override void OnPrecache()
        {
            fx = Extensions.LoadFX("smoke/hallway_smoke_light");
        }
        public override void OnMapChange()
        {
            map = GetDvar("mapname");
        }
        public override ChatType OnSay(string Message, ServerClient Client)
        {
            if (Message == "!fx")
            {
                if (map == "mp_dome")
                {
                    Extensions.PlayFX(fx, new Vector(Client.OriginX, Client.OriginY, Client.OriginX));
                }
            }
        }
    }
}

load fx OnPrecache and play it on your location when you type !fx
is it really that hard to look at the example in the Extensions thread?
I have not seen an example of the code I was given to me as a noob put Troll
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Do you play runescape? :D check this out xD [BTK]Foxy 1 3,025 04-05-2013, 18:16
Last Post: SuperNovaAO
Video Just Let`s Play [Z00MBY] Alex 24 15,077 03-10-2013, 20:59
Last Post: Arteq
  Play Guild Wars 2 Lemon 4 3,999 02-09-2013, 14:14
Last Post: Lemon
  Let's play a game JariZ 10 6,169 01-28-2013, 22:10
Last Post: House
  How to play all Dlc for free Gladio 2 4,130 01-12-2013, 13:53
Last Post: 99IRock
  Anyone play the Need for Speed games? dylankrajewski 7 5,015 10-27-2012, 15:44
Last Post: Arteq
  [untested] Play fetch tonymamoni1 2 2,738 09-04-2012, 16:36
Last Post: tonymamoni1
  Wanna play Doom 3 coop Arteq 3 3,054 07-10-2012, 15:29
Last Post: Arteq
  Can't play any unreal engine games. Pozzuh 2 3,352 07-09-2012, 19:53
Last Post: Pozzuh
  New Free to Play on Steam - The Lord of the Rings Online Steam 0 1,784 06-22-2012, 12:48
Last Post: Steam

Forum Jump:


Users browsing this thread:
1 Guest(s)

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