Advertisement
Guest User

Untitled

a guest
Nov 29th, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.53 KB | None | 0 0
  1. [CVARINFO]
  2. user bool lca_legmusic = FALSE;
  3.  
  4. [DECORATE]
  5. ACTOR MyZombieMan : ZombieMan {
  6.     States
  7.     {
  8.         Spawn:
  9.             TNT1 A 0
  10.             TNT1 A 0 ACS_ExecuteAlways(333, 0, 5)
  11.             Goto ZombieMan::Spawn
  12.     }
  13. }
  14.  
  15. ACTOR MyZombieMan2 : ZombieMan {
  16.     States
  17.     {
  18.         Spawn:
  19.             TNT1 A 0
  20.             TNT1 A 0 ACS_ExecuteAlways(334, 0, 5)
  21.             Goto Super::Spawn
  22.     }
  23. }
  24.  
  25. [SCRIPTS]
  26. #include "zcommon.acs"
  27.  
  28. bool is_mon_music_playing = false;
  29.  
  30. script 1 OPEN
  31. {
  32.     Delay(70);
  33.     SpawnSpotFacing("MyZombieMan", 1, 100);
  34.     Delay(70);
  35.     SpawnSpotFacing("MyZombieMan", 1, 101);
  36. }
  37.  
  38. script 333 (int mnum) CLIENTSIDE
  39. {
  40.     Delay(1);
  41.  
  42.     if (GetCVar("lca_legmusic") && !is_mon_music_playing)
  43.     {
  44.         SetMusic("D_DOOM");
  45.         is_mon_music_playing = true;
  46.         printbold(s:"playing music.");
  47.     }
  48.     else
  49.     {
  50.         printbold(s:"skipping music.  lca_legmusic is ",i:GetCVar("lca_legmusic"),s:" and is_mon_music_playing is ",i:is_mon_music_playing);
  51.     }
  52. }
  53.  
  54. // Let's try non-CLIENTSIDE
  55. script 334 (int mnum)
  56. {
  57.     Delay(1);
  58.  
  59.     if (GetCVar("lca_legmusic") && !is_mon_music_playing)
  60.     {
  61.         SetMusic("D_DOOM2");
  62.         is_mon_music_playing = true;
  63.         printbold(s:"playing music.");
  64.     }
  65.     else
  66.     {
  67.         printbold(s:"skipping music.  lca_legmusic is ",i:GetCVar("lca_legmusic"),s:" and is_mon_music_playing is ",i:is_mon_music_playing);
  68.     }
  69. }
  70.  
  71. [PLAYER IN-GAME (ONLINE AND OFFLINE) CONSOLE]:
  72. lca_legmusic true
  73.  
  74. [RESULTS]
  75. Always prints "skipping music.  lca_legmusic is 0 and is_mon_music_playing is 0"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement