Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help Load FX's For Each Map
#1
Question 
hi all,

i have this as code: for the fx'es

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

namespace 
Addon
{
    public class 
FX CPlugin
    
{
        
int fx 0;
        
string map "";
        public 
override void OnPrecache()
        {
            
fx Extensions.LoadFX("fire/car_fire_mp");
        }

        public 
override void OnPlayerSpawned(ServerClient Client)
        {
            
map GetDvar("mapname");
            if (
map == "mp_dome")
            {
                
Extensions.PlayFX(fx, new Vector(135.6009f, -261.9915f743.2084f));
                
Extensions.PlayFX(fx, new Vector(-24.5175f, -271.4558f721.1387f));
                
Extensions.PlayFX(fx, new Vector(80.38245f, -382.3839f663.1788f));
            }
            if (
map == "mp_alpha")
            {
                
Extensions.PlayFX(fx, new Vector(-683.41f1666.279f140.1256f));
                
Extensions.PlayFX(fx, new Vector(-693.41f1666.279f140.1256f));
                
Extensions.PlayFX(fx, new Vector(-703.41f1666.279f140.1256f));
            }
        }
    }


so i have a question "how can i spawn for each map a different FX?"

like map dome = fx "fire/car_fire_mp"
and map lockdown = fx "smoke/battlefield_smokebank_S_warm_dense"
and this for each map how can i add that to my plugin?
Reply

#2
Code:
fx,
Is the one you want to change. So, precache all fx's and make like a separate variable per se. And replace it with the "fx".

Code:
fx2 = Extensions.LoadFX("fire/car_fire_SP");
            if (map == "mp_bravo")
            {
                   Extensions.PlayFX(fx2, new Vector(-703.41f, 1666.279f, 140.1256f));
             }
Do not take life too seriously. You will never get out of it alive.
[Image: UGPjFJa.jpg]
Reply

#3
(05-30-2013, 20:34)DidUknowiPwn Wrote:
Code:
fx,
Is the one you want to change. So, precache all fx's and make like a separate variable per se. And replace it with the "fx".

Code:
fx2 = Extensions.LoadFX("fire/car_fire_SP");
            if (map == "mp_bravo")
            {
                   Extensions.PlayFX(fx2, new Vector(-703.41f, 1666.279f, 140.1256f));
             }

thankyou very much Big Grin

+1rep ^^
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Help COD mw3 Error Couln't load image 3_cursor3:s Paylgs 2 14,259 07-18-2013, 18:46
Last Post: Nekochan
  Custom load screen mw3? balakent 4 4,524 05-04-2013, 14:48
Last Post: Nekochan
  [Request] How to change load message? Puffiamo 14 8,155 07-04-2012, 20:11
Last Post: RaZ
  failed to load addon DLL CryTicAL 4 7,995 04-11-2012, 15:46
Last Post: zxz0O0
  Do plugins load on... kraze1994 4 3,119 03-13-2012, 22:10
Last Post: JariZ
  Help Cannot load addon.dll choppson 10 7,888 02-11-2012, 16:04
Last Post: choppson
  Help  "Could not load rumble info file" when building zabidenu 1 2,803 12-16-2011, 18:40
Last Post: Nekochan
  Heeeeeellllp, can't load mod to test it :/ ChazZeromus 6 4,502 08-31-2011, 10:56
Last Post: ChazZeromus
  koilpromod will not load confused 2 2,159 08-16-2011, 19:11
Last Post: koil
  Help Any idea why non-english cant load my promod? koil 0 2,025 07-25-2011, 14:47
Last Post: koil

Forum Jump:


Users browsing this thread:
1 Guest(s)

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