Jump to content

Donnovan

Member
  • Posts

    840
  • Joined

  • Last visited

  • Days Won

    12

Posts posted by Donnovan

  1. Taszi,

     

    Try to find a way to assing objects on ground to a player, i believe there is no way to do that, like a stone in the middle os the road in front of my home does not have a owner.

     

    I can think of owner objects as the ones inside player gear, and i believe those objects are not in the object_data table.

     

    So, using the oportunity to ask: Objects into the player gear are in the table object_data?

  2. Since you guys are talking about REsec.sqf...

     

    The installation procedure of a script requires the remove of REsec.sqf, changind this line, on init.sqf...

    #include "\z\addons\dayz_code\system\REsec.sqf"

    to this...

    //#include "\z\addons\dayz_code\system\REsec.sqf"

    As i see on the REsec.sqf code, it generate a ethernal loop that can result in the message "WARNING possible code injection args:...", so i believe its a monitoring Anti Hack solution. Anyone can help?

     

    Thankyou.

  3. Ghost, yes.

     

    Send me your mission files, and i will do it for you.

     

    The mission files are all files and folders where the init.sqf file is. But if you have the files untouched, i already have then here, just tell me the instance you is using: example - DayZ_Epoch_11.Chernarus.

     

    Can also you confirm your DayZ Epoch version, server and client? It's 1.0.4.2 and 1.0.4.2a?

  4. 1) - Put the Suicide Script Self Action code on the end of your fn_selfActions.sqf file.

     

    2) - In your mission folder, create [YourMissionFolder]\dayz_code\compile\ and put the changed fn_selfActions.sqf there: [YourMissionFolder]\dayz_code\compile\fnselfActions.sqf.

     

    (future custom self actions you need to add, can be put in this custom fn_selfActions.sqf file).

     

    3) - Now back to the file dayz_code.pbo and get inside it the file \init\compiles.sqf and put it in your mission folder, on the folder [YourMissionFolder]\dayz_code\init\compiles.sqf.

     

    4) - Edit this file (the compiles.sqf in your mission folder), changing the line...

    fnc_usec_selfActions = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_selfActions.sqf";

    to...

    fnc_usec_selfActions = compile preprocessFileLineNumbers "dayz_code\compile\fn_selfActions.sqf";

    5) - Now, in your Mission Folder, edit the file init.sqf and change the line...

    call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";

    to...

    call compile preprocessFileLineNumbers "dayz_code\init\compiles.sqf";

    6) - Try again and tell me if its ok.

     

    Now you garantee that your init.sqf file (the first file loaded) will call compiles.sqf that will call your custom fn_selfActions.sqf file! And the option will be avaliable on the self action menu.

     

    P.S.: Ghost, can you edit and remove the fn_selfActions.sqf script from your post? If you need help puting my self action code in it, i will helpyou, but its too big to put here.

  5. The main goal is to show vehicles in map, but not show then all. So it will show only a x percentage of it, in a r radius from player. This percentage and radius can be set by the server admin.

     

    Other simple features, that make me call it Tools (along with others i could inplement later, or players can ask for), are:

     

    - See player on map.

     

    - Player Steps: You can see your evolution along the map, like the "line over map" in movies. If you turn off/on the Tool, the steps are reseted.

     

    By the way, i'm missing the real sense of it until i get servers using it. As a matter of fact, i can always help others on their scripts other than doing my ones.

  6. Chocolat Tools is a Self Action Option that you can turn on/off any moment.
     
    Chocolat Tools Off: Game plays as normal.
    Chocolat Tools On:
     
    1) Land vehicles *1000 m arround player have a chance of *50% to be show on map:
    - Turn on/off Chocolat Tools don't change the land vehicles that are show and not show.
    - New land vehicles have also a *50% chance to be show on map.
    - If the player enters a land vehicle that is not show on map, the land vehicle will be show on map.
    - Diferent players can see diferent land vehicles.
     
    Extras:
    2) Player icon on map:
    - Player position and direction is show on map.
    - If player enters in a land vehicles, the player icon turns in a blue land vehicle icon.
     
    3) Player step marks:
    - With chocolat on, player steps are marked on map on a *250 m evolution.
    - Steps are marked with a arrow pointing in the direction of travel.
    - A message show on screen the total travel distance each *5 km.
    - Running on the same place does not generate steps on map.
    * configurable.
     
    INSTALLATION! Chocolat consists in only two files:
    File 1) code that goes on fn_selfActions.sqf
    The Self Action code: place this code on the bottom of your custom fn_selfActions.sqf file.
    //CHOCOLAT TOOLS SELF ACTION VARIABLES
    if (isNil "s_don_nearveh_a" || isNil "s_don_nearveh_b" || isNil "s_don_nearveh_onoff") then {
        s_don_nearveh_a = -1;
        s_don_nearveh_b = -1;
        s_don_nearveh_onoff = 0;
    };
    //CHOCOLAT TOOLS ON
    if (s_don_nearveh_a < 0 && s_don_nearveh_onoff == 0) then {
        s_don_nearveh_a = player addaction[("<t color=""#0044aa"">" + ("Turn On Chocolat Tools [ON]") +"</t>"),"custom\nearveh.sqf","",5,false,true,"", ""];
    };
    //CHOCOLAT TOOLS OFF
    if (s_don_nearveh_b < 0 && s_don_nearveh_onoff == 1) then {
        s_don_nearveh_b = player addaction[("<t color=""#0044aa"">" + ("Turn Off Chocolat Tools [OFF]") +"</t>"),"custom\nearveh.sqf","",5,false,true,"", ""];
    };
    
    File 2) nearveh.sqf
    The Chocolat Script code (nearveh.sqf): put the file, on the link bellow, in YourMissionFolder\custom\nearveh.sqf. Create \custom\ if necessary.
     
     
    End - Any problem, opnion, idea, fell fre to ask or comment. The code is comented.
     
    Old Stuff:
    nearveh.sqf old files - you don't need this anymore:
  7. This goes in your custom fn_selfActions.sqf:

    This is the avaliable options "Retire from Life" and "Confirm Retire from Life!" for the player self actions, that appears when you scrool the mouse wheel.

    private ["_handGun"];
    _handGun = currentWeapon player;
    if ((_handGun in ["glock17_EP1","M9","M9SD","Makarov","MakarovSD","revolver_EP1","UZI_EP1","Sa61_EP1","Colt1911"]) && (player ammo _handGun > 0) && canStand player && (speed player <= 1) && _canDo) then {
    	if ((is_confirmation == 0) && (s_player_suicide < 0)) then {
    		name_on_menu = "<t color=""#303030"">Retire from Life</t>";
    		s_player_suicide = player addaction[(name_on_menu),"custom\suicide.sqf",_handGun,0,false,true,"", ""];
    	};
    	if ((is_confirmation == 1) && (s_player_suicide_confirm < 0)) then {
    		name_on_menu = "<t color=""#d00020"">Confirm Retire from Life!</t>";
    		s_player_suicide_confirm = player addaction[(name_on_menu),"custom\suicide.sqf",_handGun,0,false,true,"", ""];
    	};
    } else {
    	if (is_confirmation == 0) then {
    		player removeAction s_player_suicide;
    	};
    	if (is_confirmation == 1) then {
    		player removeAction s_player_suicide_confirm;
    	};
    	s_player_suicide = -1;
    	s_player_suicide_confirm = -1;
    	is_confirmation = 0;
    };
    
    This goes in a new file with the name suicide.sqf in the folder YourMissionFolder/custom/suicide.sqf:

    This is the file that plays the suicide animation and sounds.

    if (is_confirmation == 0) then {
    	player removeAction s_player_suicide;
    	is_confirmation = 1;
    	cutText [format["Please, confirm Retire."], "PLAIN DOWN"];
    } else {
    	is_confirmation = 0;
    	
    	_state = (getText (configFile >> "CfgMovesMaleSdr" >> "States" >> animationState player >> "actions"));
    
    	if (_state in ["RifleProneActions","PistolProneActions","CivilProneActions"]) then {
    		player playAction "PlayerStand";
    		sleep 2;
    	};
    	if (_state in ["RifleKneelActions","PistolKneelActions","CivilKneelActions"]) then {
    		player playAction "PlayerStand";
    		sleep 1;
    	};
    
    	player addEventHandler ["fired", {player SetDamage 0.9; playSound "finalShot";}];
    
    	player playmove "ActsPercMstpSnonWpstDnon_suicide1B";
    
    	_sfx="madIncoming";
    	_nul = [objNull, player, rSAY, _sfx] call RE;
    
    	sleep 6.8;
    
    	_dis=35;
    	_sfx="dieScream";
    	_nul = [objNull, player, rSAY, _sfx] call RE;
    	[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
    
    	sleep 1.6;
    	player fire currentWeapon player;
    	sleep 0.5;
    	player SetDamage 1.0;
    };
    
    This goes in the file description.ext in the folder YourMissionFolder/description.ext:

    Those are the 3 sounds declaration, and if you already have declared sounds in description.ext, you need to add those 3 sound along with the ones you already have there.

    class CfgSounds
    {
        sounds[] = {dieScream, finalShot, madIncoming};
    
        class dieScream {
    		name="dieScream";
    		sound[]={diescream.ogg,0.8,1};
    		titles[] = {};
        };
        class madIncoming {
    		name="madIncoming";
    		sound[]={madincoming.ogg,0.8,1};
    		titles[] = {};
        };
        class finalShot {
    		name="finalShot";
    		sound[]={finalshot.ogg,0.8,1};
    		titles[] = {};
        };
    };
    
    
    The 3 ogg sounds files in the link bellow must be put in the folder YourMissionFolder:

     

    Get the 3 sounds here: Sounds on Tinyupload.com

     

    They are diescream.ogg, madincoming.ogg and finalshot.ogg.

  8. Delete cursorTarget is bad method anyway. Even if you check if the target is what it needs to be. Best way is to set variable to that vehicle when it's build and use it later to delete the object.

     

    I see, Sukkaed,

     

    But with "delete it later" you mean a clean it in the MySql database? This is ok, but you will need to kill the re-pack-bike option, since it can't be done without removing the bike.

     

    By the way, i loved the idea to add the bike to the MySql  database and don't let it disapear after server restart. You know how we can do that? Thankyou in advance.

×
×
  • Create New...