0verHeaT
-
Posts
101 -
Joined
-
Last visited
Content Type
Profiles
Forums
Articles
Posts posted by 0verHeaT
-
-
Any eta waiting on on the edge of my seat here ? ;)
Has been updated.
-
You have to execute the BIS dynamic text client side via a publicVariable in order that every player is able to see the notification.
-
ive noticed you need the key to your vehicle in your toolbelt to bring up the menu, Maybe this is your problem?
Loving the script Nice job OverHeaT, but still buggy for most of the vehicles. how wouldd i go about fixing these vehicles to retexture? i see some of the colouring when you are so far from the vehicle but part painted as you get closer the original skin pops back. coulkd this be to the vehicle being skinned in parts and will not show untill fully complete
Instead of irstrobe, increase the coin price? you will only end up buying it from trader anyways
Many Thanks
It's like Zupa and I said, not every vehicle can be retextured. For others the textures are buggy. Unfortunately, you can't change this.
You can change the coin price in your player_paint.sqf by setting the value of ColourPrice to anything you want.
-
ok i noticed that this did not work. I just did not have the time to test this yesterday.
Im gonna rewrite the script to fix these issues.
-
To fix the nil errors add this (instead of the old part)
if ((_killername == "STRING") and ((currentWeapon _killer) == "STRING")) then { _pic = gettext(configFile >> 'cfgWeapons' >> (currentWeapon _killer) >> 'picture'); _kill_txt = format ["<t align='left' size='0.9'>%1 </t>",_killerName,_pic,_victimName,(ceil _distance)]; _kill_txt = _kill_txt + format ["<img size='1.0' align='left' image='%2'/>",_killerName,_pic,_victimName,(ceil _distance)]; _kill_txt = _kill_txt + format ["<t align='left' size='0.9'> %3 </t>",_killerName,_pic,_victimName,(ceil _distance)]; _kill_txt = _kill_txt + format ["<t align='left' size='0.9'>[%4m]</t>",_killerName,_pic,_victimName,(ceil _distance)]; customkillMessage = [_kill_txt]; publicVariable "customkillMessage"; };
below
_loc_message = format["PKILL: %1 was killed by %2 with weapon %3 from %4m", _victimName, _killerName, _weapon, _distance];
-
Yer most the time someone gets shot says nil / run someone over says nil when that happens people think im killing them will "admin hacks" when im not even on line ....
This could be avoided by checking if the killername, distance...etc. nil is and only execute this if it is not nil.
Give me a moment...
-
I just put this on my server and tested it out.. Man it's awesome!!! Great script
Just one thing, I am also getting the BLUFOR messages to pop in sidechat as well . Would you know how to disable this ?
Thank you in advance
DZE_DeathMsgGlobal = false;
Set this to false in your init.sqf
-
can you send me your plyrHit, server player died and server player death sqfs?
Cause nothing happen after installing your script
I posted it
-
not working for me, I do not have the menu
Did you inlcude the Dialog in your description.ext ?
-
-
Hey 0verHeaT,
You need to do a little fix.
Change this
if (((typeName(_worldspace select 2)) == "STRING") and ((typeName(_worldspace select 3)) == "STRING")) then { _colour = _worldspace select 2; _colour2 = _worldspace select 3; if (_colour != "0") then { _object setVariable ["Colour",_colour,true]; _clrinit = format ["#(argb,8,8,3)color(%1)",_colour]; _object setVehicleInit "this setObjectTexture [0,"+str _clrinit+"];"; }; if (_colour2 != "0") then { _object setVariable ["Colour2",_colour2,true]; _clrinit2 = format ["#(argb,8,8,3)color(%1)",_colour2]; _object setVehicleInit "this setObjectTexture [1,"+str _clrinit2+"];"; }; };
To
if(count _worldspace >= 4) then{ if (((typeName(_worldspace select 2)) == "STRING") and ((typeName(_worldspace select 3)) == "STRING")) then { _colour = _worldspace select 2; _colour2 = _worldspace select 3; if (_colour != "0") then { _object setVariable ["Colour",_colour,true]; _clrinit = format ["#(argb,8,8,3)color(%1)",_colour]; _object setVehicleInit "this setObjectTexture [0,"+str _clrinit+"];"; }; if (_colour2 != "0") then { _object setVariable ["Colour2",_colour2,true]; _clrinit2 = format ["#(argb,8,8,3)color(%1)",_colour2]; _object setVehicleInit "this setObjectTexture [1,"+str _clrinit2+"];"; }; }; };
This prevents the Error Zero divisor from being spammed into the RPT. The worldspace array is a default two elements. Without this check, you are checking out of bounds of the array causing the error.
Anyway, LOVE THE SCRIPT :)
striker
P.S. If you add a third color, change >= 4 to >= 5
Yes you're right. Forgot to add this to prevent the zero divisor error.
Anyway, thanks for the hint striker :)
Install instruction has been updated.
-
Description
This script is a public version of the notorious Vehicle Paint script which idea and code are originally 'invented' by maca134.
This mod allows you to retexture any vehicle on your server with any colour you choose.
Features
- Vehicles can be painted in two different colours
- Only vehicles with a CharacterID can be painted (Vehicles with key)
- Colours will be bound to to the Object(Vehicle) and will be persistent
- Colours codes are saved in the Worldspace field in the database
- Vehicles can be manually added or removed from an Array in your variables.sqf
Screenshots
FAQ
Q: Will this script be compatible with Plot4Life because it uses the same gap in the database ?
A: Yes. The colour will only be safed in this gap if the object is a vehicle.
Q: I am not using Zupa's Singley Curreny System. Am I able to use this script as well ?
A: Yes. The download includes files which are usable with the traditional curreny system.
USEFUL: by raymix
Installation
Download the required files here
1. Server Files:1.1 In your server_function.sqf search for:server_updateNearbyObjects = {
above add
"PVDZE_veh_Colour" addPublicVariableEventHandler { private["_position","_worldspace","_fuel","_key","_colour","_colour2","_object","_objectID","_PUID","_clrinit","_clrinit2","_pname","_name"]; _object = ((_this select 1) select 0); _colour = ((_this select 1) select 1); _colour2 = ((_this select 1) select 2); _clrinit = format ["#(argb,8,8,3)color(%1)",_colour]; _clrinit2 = format ["#(argb,8,8,3)color(%1)",_colour2]; _object setVehicleInit "this setObjectTexture [0,"+str _clrinit+"];"; _object setVehicleInit "this setObjectTexture [1,"+str _clrinit2+"];"; processInitCommands; _object setVariable["Colour",_colour,true]; _object setVariable["Colour2",_colour2,true]; _name = getText(configFile >> "cfgVehicles" >> (typeOf _object) >> "displayName"); _PUID = ((_this select 1) select 3); _pname = ((_this select 1) select 4); diag_log format ["VEHICLE PAINT: Player %1 (%2) has painted a %3!",_pname,_PUID,_name]; _position = getPosATL _object; _worldspace = [ round(direction _object), _position, _colour, _colour2 ]; _fuel = 0; _fuel = fuel _object; _objectID = _object getVariable ["ObjectID","0"]; _key = format["CHILD:305:%1:%2:%3:",_objectID,_worldspace,_fuel]; _key call server_hiveWrite; };
1.2 In 'compile/server_updateObject.sqf' change the following
_object_position = { private["_position","_worldspace","_fuel","_key"]; _position = getPosATL _object; _worldspace = [ round(direction _object), _position ]; _fuel = 0; if (_object isKindOf "AllVehicles") then { _fuel = fuel _object; }; _key = format["CHILD:305:%1:%2:%3:",_objectID,_worldspace,_fuel]; //diag_log ("HIVE: WRITE: "+ str(_key)); _key call server_hiveWrite; };
to
_object_position = { private["_position","_worldspace","_fuel","_key","_colour","_colour2"]; _position = getPosATL _object; if (_object isKindOf "AllVehicles") then { _colour = _object getVariable ["Colour","0"]; _colour2 = _object getVariable ["Colour2","0"]; _worldspace = [ round(direction _object), _position, _colour, _colour2 ]; _fuel = fuel _object; } else { _worldspace = [ round(direction _object), _position ]; _fuel = 0; }; _key = format["CHILD:305:%1:%2:%3:",_objectID,_worldspace,_fuel]; //diag_log ("HIVE: WRITE: "+ str(_key)); _key call server_hiveWrite; };
1.3 In your server_monitor.sqf search for:
if (_object isKindOf "AllVehicles") then {
below paste
private ["_colour","_colour2","_clrinit","_clrinit2"];
again in your server_monitor.sqf look for
} forEach _hitpoints;
(if you can't find this look for)
} count _hitpoints;
below add
if(count _worldspace >= 4) then{ if (((typeName(_worldspace select 2)) == "STRING") and ((typeName(_worldspace select 3)) == "STRING")) then { _colour = _worldspace select 2; _colour2 = _worldspace select 3; if (_colour != "0") then { _object setVariable ["Colour",_colour,true]; _clrinit = format ["#(argb,8,8,3)color(%1)",_colour]; _object setVehicleInit "this setObjectTexture [0,"+str _clrinit+"];"; }; if (_colour2 != "0") then { _object setVariable ["Colour2",_colour2,true]; _clrinit2 = format ["#(argb,8,8,3)color(%1)",_colour2]; _object setVehicleInit "this setObjectTexture [1,"+str _clrinit2+"];"; }; }; };
Done.
2. Mission Files
2.1 Paste the folder 'Paint' which you have downloaded in your mission.pbo.2.2 Go to your custom compile.sqf. Afterif (!isDedicated) then {
add
VehicleColourPaint = compile preprocessFileLineNumbers "Paint\vehicleColourPaint.sqf"; VehicleColourUpdate = compile preprocessFileLineNumbers "Paint\VehicleColourUpdate.sqf"; VehicleColourUpdate2 = compile preprocessFileLineNumbers "Paint\VehicleColourUpdate2.sqf"; player_paint = compile preprocessFileLineNumbers "Paint\player_paint.sqf";
2.3 In your fn_selfActions.sqf find
s_player_lockunlock set [count s_player_lockunlock,_lock];
below add
if (_typeOfCursorTarget in ColourVehicles) then { private ["_paint"]; _paint = player addAction ["Paint", "Paint\player_paint_init.sqf",_cursorTarget, 2, true, true, "", ""]; s_player_lockunlock set [count s_player_lockunlock,_paint]; };
2.4 Go to your variables.sqf and at the very bottom add
ColourVehicles = [ "ATV_CZ_EP1", "ATV_US_EP1", "SUV_TK_CIV_EP1", "Mi17_Civilian_DZ", "UH60M_EP1_DZE", "Ka52", "Ka52Black", "UH1H_TK_EP1", "UH60M_MEV_EP1", "HMMWV_M998A2_SOV_DES_EP1_DZE", "HMMWV_M1151_M2_CZ_DES_EP1_DZE", "UAZ_MG_TK_EP1_DZE", "Ural_CDF", "Ural_TK_CIV_EP1", "Ural_UN_EP1", "V3S_Open_TK_CIV_EP1", "Kamaz", "MTVR_DES_EP1", "MH6J_DZ", "AH6X_DZ", "HMMWV_M1035_DES_EP1", "HMMWV_Ambulance", "HMMWV_Ambulance_CZ_DES_EP1", "HMMWV_DES_EP1", "HMMWV_DZ", "hilux1_civil_3_open_EP1", "hilux1_civil_1_open", "datsun1_civil_1_open", "Pickup_PK_GUE_DZE", "Pickup_PK_INS_DZE", "Pickup_PK_TK_GUE_EP1_DZE", "Offroad_DSHKM_Gue_DZE", "LAV25_HQ", "BTR90_HQ_DZE", "M1133_MEV_EP1", "pook_H13_amphib", "pook_H13_civ", "pook_H13_medevac_CIV", "pook_H13_transport", "pook_H13_gunship_PMC", "pook_H13_transport_INS", "VWGolf" ];
Here you can add any vehicle you want to paint.NOTE: Some vehicles can not be painted.2.5 In your description.ext add the following at the bottom:#include "Paint\defines.hpp" #include "Paint\vehiclecolour.hpp"
Done.
3. Infistar
Add the number to allowed dialogs
571113
4. Battleye
Put this in your publicvariable.txt
!="PVDZE_veh_Colour"
Credits
- Maca134: Made the orginal colour vehicle script. Without his idea of painting vehicles in any colour as well as the style of his dialogs this script would not exist.
- Zupa: The idea of painting vehicles in two different colours.
- 31_D!4b10, freakystyle, Rotzloch and 5 others
- 8
-
It works, but your players WILL die and spawn right in front of the dead corpse.. WITH all gear. Trust.. Its not everyone or all the time.. but it will happen. I like the script. Hope there's a fix.
This issue occurs due to a syntax error in the fnc_plyrHit.sqf.
19:33:24 "PHIT: B 1-1-C:1 (XXX) REMOTE was hit by B 1-1-D:1 (XXX) REMOTE with DMR from 0m with 0.1625 dmg" 19:33:24 Error in expression <; _weapon = weaponState _attacker; if (_weapon select 0 == "Throw") then { _we> 19:33:24 Error position: <_weapon select 0 == "Throw") then { _we> 19:33:24 Error Nicht definierte Variable in Ausdruck: _weapon 19:33:24 File z\addons\dayz_server\compile\fnc_plyrHit.sqf, line 12
As you can see the distance is here defined as a string due to this bug.
This will lead to the ceil error.
In my case i could fix this by replacing the current fnc_plyrHit.sqf with this:
private ["_victim", "_attacker","_weapon","_distance","_damage"]; _victim = _this select 0; _attacker = _this select 1; _damage = _this select 2; if (!isPlayer _victim || !isPlayer _attacker) exitWith {}; if ((owner _victim) == (owner _attacker)) exitWith { _victim setVariable["AttackedBy", _victim, true]; }; _weapon = gettext (configFile >> 'cfgWeapons' >> (currentWeapon _attacker) >> 'displayName'); _vehicle = typeOf (vehicle _attacker); if ((getText (configFile >> "CfgVehicles" >> _vehicle >> "vehicleClass")) in ["CarW","Car","CarD","Armored","Ship","Support","Air","ArmouredW","ArmouredD","SupportWoodland_ACR"]) then { _weapon = getText (configFile >> "CfgVehicles" >> _vehicle >> "displayName"); }; _distance = _victim distance _attacker; diag_log format["PLAYERHIT: %1 was hit by %2 with %3 from %4m with %5 dmg", _victim, _attacker, _weapon, _distance, _damage]; _victim setVariable["AttackedBy", _attacker, true]; _victim setVariable["AttackedByName", (name _attacker), true]; //_victim setVariable["AttackedByWeapon", (currentWeapon _attacker), true]; _victim setVariable["AttackedByWeapon", _weapon, true]; _victim setVariable["AttackedFromDistance", _distance, true];
Now you won't get any errors on the fnc_plyrHit.sqf and the ceil command works correctly now.
-
17:07:39 Error in expression <>%1 </t>",_killerName,_pic,_victimName,(ceil _distance)];_kill_txt = _kill_txt >17:07:39 Error position: <ceil _distance)];_kill_txt = _kill_txt >17:07:39 Error ceil: Type String, expected Number17:07:39 File z\addons\dayz_server\compile\server_playerDied.sqf, line 40
Looks like your '_distance' is not correctly defined.
It has to be defined like that in order to work:
_distance = _victim getVariable["AttackedFromDistance", "nil"];
-
Works it all the Time? Mine doesnt work all the time only ~50% the time
EDIT: May take this note Kill Messages doesnt work all the Time, due to the Server sometimes doesnt get the PKILL
Thats right. Any kill message will only be displayed when the server gets the PKILL.
(e.g. the DZE_DeathMsgGlobal does also not work all the time..)
-
Copy and replace the server_playerDied.sqf in 'day_server/compile'.
But if i have allready this 2 custom files, if i replase it some another mod stop work
I will make a step by step guide where you just have to add the necessary lines.
-
Description
Get all kill notification nicely displayed in the left upper corner. This will include the picture of the gun and the shot distance.
The format will look like that:
[killer] ['image'] [victim] ['distance in meters']
To see how it will look like in game:
UPDATE
- fixed bug where dead players spawn near their bodies with their old gear
- message will only appear when a player is shot by someone else
- if an attacker killed another player with a vehicle the message will show the picture of the vehicle instead of the gun
Download and installation
http://github.com/0verHeaT/kill_msg
Step by Step Guide (if you have already other mods)
(Has been removed! Please use my Github!)
Done.
- Mates31cz, freakystyle, Spodermayt and 6 others
- 9
-
With this code you won't get far..
In order to show the text with the picture of the gun correctly you have to call it with the 'BIS_fnc_dynamicText' function.
This function has to be executed client sided so that every player can can see the kill message at the same time.
-
You just have to replace the 'rTitleText' command with this:
_hint = parseText format["<t align='center' color='#088A85' shadow='2' size='1.75'>CHANGE HEAD HERE</t><br/><t align='center' color='#ffffff'>CHANGE TEXT HERE</t>"]; customRemoteMessage = ['hint', _hint]; publicVariable "customRemoteMessage";
This will make your text shown as a hint.
Make sure you have installed the custom remote message script by maca134 otherwise the code above will not work.
-
Increasing Plotpole Distance
in Scripting
Posted
Forget that part.
Set this variable in your init.sqf
Your can change the plot pole radius here.