Jump to content

Hriki

Member
  • Posts

    9
  • Joined

  • Last visited

Posts posted by Hriki

  1. I know this isn't specifically scripting but was unsure where to ask. I have an issue at the moment on my server where mining an ore vein will either yield no parts or only one gem. In 1.0.6 I got a mixture of ores and maybe a gem but now no ores at all. Anyone aware how to fix this? I have custom mining vendors and ore fields on my server so I would like to keep the mining economy alive.

  2. 14 hours ago, juandayz said:

    its very strange that cause a game crash.. if u go back to the first version.. the game works again?  do you have any kind of error on your rpt about this script?  you said "the sound goes crazy" this means a constant loop whit the song? i ask you cuz i cannot test since i uninstall my test server 

    Thanks for the replies guys! The sound is hard to explain. Have you ever had a computer hang when playing a song? That sharp distorted sound that shrieks out is kind of what happens. It works fine with the original method plays absolutely fine. I am wondering if maybe via this method I am running into the limitations kingpapawawa mentioned about ogg files, or a driver issue? Not sure as it played fine with the original method. 

  3. 2 hours ago, juandayz said:

    mmm try change the carmusicoff.sqf

    by

      Reveal hidden contents
    
    
    _vehicle = vehicle player;
    if (isnil ("musicOn")) then {
        musicOn = 0;
    };
    if (musicOn == 1) then {
    	musicOn = 0;
        systemChat("no more music!");
    	sleep 10;
    	s_player_sounds = _vehicle addAction ["Play Song","custom\carmusic.sqf",dayz_sounds,2,false,true,"",""];
    	} else {
    	systemChat("no more music!");
    };

     

     

    Unfortunately no luck! It still comes out scrambled and locks my game up :/ 

  4. 3 hours ago, juandayz said:

    i guess you will need an extra sqf.  something like this.

    In custom fn_selfactions.sqf  replace this:

      Reveal hidden contents
    
    
    if (_inVehicle && (driver _vehicle == player)) then {
    
        if (s_player_sounds < 0) then {
            dayz_sounds = _vehicle;
            s_player_sounds = dayz_sounds addaction[("<t color=""#F7D708"">" + ("Play Song") +"</t>"),"custom\carmusic.sqf"];  
            };
        } else {
        
            dayz_sounds removeAction s_player_sounds;
            s_player_sounds = -1;
        }; 

     

    by:

      Reveal hidden contents
    
    
    if (_inVehicle && (driver _vehicle == player)) then {
    
        if (s_player_sounds < 0) then {
            dayz_sounds = _vehicle;
            s_player_sounds = dayz_sounds addaction[("<t color=""#F7D708"">" + ("Play Song") +"</t>"),"custom\carmusic.sqf"]; 
    		s_player_soundsoff = dayz_sounds addaction[("<t color=""#F7D708"">" + ("shutdown song") +"</t>"),"custom\carmusicoff.sqf"];
            };
        } else {
        
            dayz_sounds removeAction s_player_sounds;
            s_player_sounds = -1;
    		dayz_sounds removeAction s_player_soundsoff;
            s_player_soundsoff = -1;
        }; 

     

    Now replace the carmusic.sqf by this code:

      Reveal hidden contents
    
    
    
    _vehicle = vehicle player;
    _inVehicle = (_vehicle != player);
    
    if (isnil ("musicOn")) then {musicOn = 0;};
    if (!_inVehicle) then {musicOn = 0;};
    if (musicOn == 0) then {musicOn = 1; systemChat("Play that funky music!");};
    
    while {musicOn == 1} do {
    	if (_inVehicle and (driver _vehicle == player)) then {
    	playSound "mysong";
    	
    		
    	} else {
    		musicOn = 0;
    	};
    };

     

    now in the same folder where carmusic.sqf is locate.. create this new sqf called carmusicoff.sqf

      Reveal hidden contents
    
    
    if (isnil ("musicOn")) then {musicOn = 0;};
    if (musicOn == 1) then {
    	musicOn = 0;
       systemChat("no more music!");
    	} else {
    	systemChat("music off!");
    };

     

     

    Thanks for the reply man! I tried this out but now when I play the song the sound goes crazy and my game locks up/crashes? Any ideas?

  5. Anyone able to help me here. I followed the instruction but after selecting my spawn point I am placed in the debug plains.

    I have this error in my RPT 

    Quote

     Error position: <dayz_clientPreload and !(isNull _agent)>
      Error Undefined variable in expression: dayz_clientpreload
    Error in expression <dayz_clientPreload and !(isNull _agent)>

    I get the spawn selection, etc all fine but end up in the debug plains and this comes up in my RPT. Any ideas on how to fix? Thanks in advance!

×
×
  • Create New...