Welcome, Guest
Username: Password: Remember me

TOPIC: GetDvar()

GetDvar() 2 years 1 week ago #1090

  • Hugo
  • Hugo's Avatar
  • Offline
  • Senior Member
  • Posts: 70
  • Thank you received: 100
  • Karma: 21
:unsure: Hey devs, Its ok?, in the file "raw\maps\createfx\mymap_fx.gsc
if( getDvar( "mymap_fx_sound" ) != "0" )
{
ent = maps\mp\_createfx::createLoopSound();
...
}
So ,the map launched with ( to disable this sound)
+set mymap_fx_sound 0
none or +set mymap_fx_sound 1 , to play it.
Offine work ok, but for servers online Its ok? ( To avoid errors)
To be used in my Plaza map.
:dry:
The administrator has disabled public write access.

GetDvar() 2 years 1 week ago #1091

  • PainKiller.k4f
  • PainKiller.k4f's Avatar
  • Offline
  • Premium Member
  • Create Learn Realize
  • Posts: 126
  • Thank you received: 52
  • Karma: 13
Hi Hugo,

this should work with servers as well.
but i would write it into main() methode in mp_b02plaza.gsc

if(getDvar( "mymap_fx_sound" ) == "" )
{
setDvar("mymap_fx_sound", "1" );
}
if(getDvar( "mymap_fx_sound" ) == "1" )
{
// and herin the script you want to call
// like maps\mp\_createfx::main(); or what ever the name of your starting method is
}

:)
Cheers,
PainKiller_k4f
The administrator has disabled public write access.
The following user(s) said Thank You: Hugo, {cool.G} ingre

GetDvar() 2 years 1 week ago #1092

  • Hugo
  • Hugo's Avatar
  • Offline
  • Senior Member
  • Posts: 70
  • Thank you received: 100
  • Karma: 21
Excellent !, work with "fast_restart", I add ..._createfx::main_sound() to let visual fx in main() :)
The administrator has disabled public write access.
The following user(s) said Thank You: PainKiller.k4f
Time to create page: 0.217 seconds
Powered by Kunena Forum