Jump to content

Casperento

Members
  • Content Count

    18
  • Joined

  • Last visited

  • Days Won

    1

Casperento last won the day on October 24 2018

Casperento had the most liked content!

Community Reputation

8 Neutral

About Casperento

  • Rank
    Member

Personal Information

  • Country

Recent Profile Visitors

202 profile views
  1. Casperento

    Leave/Kick Gang Fix

    Yes. I was trying to clean this code. Sometimes i fix bugs just cleaning/optimising it. By the way, i need to get more information and @imthatguyhere gave us a great idea! Thx!
  2. Casperento

    Leave/Kick Gang Fix

    Try this small commit and give me your feedback https://github.com/Casperento/Framework/commit/8cd80622cb0e163ab78f291923fd45f17be311b2 If don't make any difference, let me know and then restore your backup of fn_updateGang.sqf
  3. Casperento

    Custom Texutures on infostands

    Just put this into your infostand's init field and change the path to insert your image on it: You also may like to use 512x512 to build your jpg! this setObjectTexture [0,"textures\myserver_logo.jpg"];
  4. Casperento

    Garage vehicle not spawn

    The code is broken, look at fn_insureCar.sqf (line 12) : _query = format["UPDATE vehicles SET insure=‘1' WHERE pid='%1' AND id='%2'",_pid,_vid]; Change to this: _query = format["UPDATE vehicles SET insure='1' WHERE pid='%1' AND id='%2'",_pid,_vid]; And the last line too, change the HC function to DB: _thread = [_query,1] call DB_fnc_asyncCall;
  5. Casperento

    Knock out function in Safezone

    What's your safezone code ?
  6. Casperento

    [RELEASE] Remote Warning System

    Segue o exemplo >>> https://pastebin.com/VgH5S2v7
  7. Casperento

    [RELEASE] Remote Warning System

    Sorry for my bad, the code was breaking Tonic's keyhandler..But now i fixed all the issues and the code is ready to be used! Thx for @m7hanzo reporting!
  8. Casperento

    [RELEASE] Remote Warning System

    Sim, e muito bem!
  9. Casperento

    [Release] Robbery Annoucement

    Ya, he learned with my old code. Now you can install the official version of it by seen my release:
  10. Casperento

    [RELEASE] Remote Warning System

    Hey guys, this time i'm gonna teach you how to install my Remote Warning System on your framework's copy. This system is used by all of the brazilian servers and it's useful for those who want to send warnings without speak with the target. Difficulty: Easy Features: - Fully configurable - Play a sound when the msg get arrived into the target - All teams have access to it (COP/CIV/MED) - Official script RELEASE 1. Open your Config_Master.hpp and paste the followed code into your Life_Settings class: /* CXP REMOTE WARNING SYSTEM */ // Change the menu's strings on the stringtable package /* Syntax: cxp_rewa_cfg[] = { { "civ", // Side { "Btn1Title", // If you don't wanna enable this button, just let this string empty "Description", // Tooltip of the button "FinalMsg", // Final message that will be shown on the target screen "FinalSound" // If you don't wanna send an audio, just let this string empty }, { "Btn2Title", "Description", "FinalMsg", "FinalSound" }, { "Btn3Title", "Description", "FinalMsg", "FinalSound" } } }; */ cxp_rewa_dist = 500; // Max distance that a player can send a warning to the target cxp_rewa_cfg[] = { // CIVILIAN { "civ", // Don't change this string { // Button 1 "STOP", "Stop or i kill you!", "Stop or i kill you!", "" }, { // Button 2 "STOP", "Stop or i kill you!", "Stop or i kill you!", "" }, { // Button 3 "STOP", "Stop or i kill you!", "Stop or i kill you!", "" } }, // COPS { "cop", // Don't change this string { // Button 1 "STOP", "Stop or i kill you!", "Stop or i kill you!", "" }, { // Button 2 "STOP", "Stop or i kill you!", "Stop or i kill you!", "" }, { // Button 3 "STOP", "Stop or i kill you!", "Stop or i kill you!", "" } }, // MEDICS { "med", // Don't change this string { // Button 1 "STOP", "Stop or i kill you!", "Stop or i kill you!", "" }, { // Button 2 "STOP", "Stop or i kill you!", "Stop or i kill you!", "" }, { // Button 3 "STOP", "Stop or i kill you!", "Stop or i kill you!", "" } } }; 2. Open your core\functions\fn_keyHandler.sqf file and paste the followed code just like the example: // CXP Remote Warning - TAB key case 15 : { if (!_alt && !_ctrlKey && isPlayer cursorTarget && !dialog && !(player getVariable ["restrained",false]) && {!life_action_inUse} && !(isNull cursorTarget) && (currentWeapon player isEqualTo primaryWeapon player || currentWeapon player isEqualTo handgunWeapon player) && currentWeapon player != "") then { if (player distance cursorTarget < LIFE_SETTINGS(getNumber,"cxp_rewa_dist")) then { [cursorTarget] call life_fnc_cxpReWaOpenMenu; } else { hint format["You need to be under %1 meters of the target to send him a remote warning!",LIFE_SETTINGS(getNumber,"cxp_rewa_dist")]; }; } else { hint "Invalid target or you're disarmed!"; }; }; 3. Open your dialog\Master_Handler.hpp file and paste the followed line into it: /* Master UI Resource File */ #include "common.hpp" #include "shop_items.hpp" #include "player_inv.hpp" #include "gang.hpp" #include "key_chain.hpp" #include "impound.hpp" #include "bank.hpp" #include "veh_shop.hpp" #include "shops.hpp" #include "hud_stats.hpp" #include "admin_menu.hpp" #include "cell_phone.hpp" #include "wanted_list.hpp" #include "ticket.hpp" #include "clothing.hpp" #include "trunk.hpp" #include "spawnSelection.hpp" #include "chop_shop.hpp" #include "pInteraction.hpp" #include "deathScreen.hpp" #include "vehicleShop.hpp" #include "vehicleShop3D.hpp" #include "settings.hpp" #include "federalReserve.hpp" #include "compensate.hpp" #include "FuelStat.hpp" #include "newsStation.hpp" #include "cxp_remWarn_menu.hpp" // Add this include HERE!! 4. Open your Functions.hpp file and follow the example: class Dialog_Controls { file = "dialog\function"; class bankDeposit {}; class bankTransfer {}; class bankWithdraw {}; class displayHandler {}; class gangDeposit {}; class gangWithdraw {}; class garageLBChange {}; class impoundMenu {}; class progressBar {}; class safeFix {}; class safeInventory {}; class safeOpen {}; class safeTake {}; class sellGarage {}; class setMapPosition {}; class spawnConfirm {}; class spawnMenu {}; class spawnPointCfg {}; class spawnPointSelected {}; class unimpound {}; class vehicleGarage {}; class wireTransfer {}; class cxpReWaSend {}; // First line to add class cxpReWaOpenMenu {}; // Second line to add }; class Functions { file = "core\functions"; class AAN {}; class accType {}; class actionKeyHandler {}; class animSync {}; class calWeightDiff {}; class checkMap {}; class clearVehicleAmmo {}; class dropItems {}; class escInterupt {}; class fetchCfgDetails {}; class fetchDeadGear {}; class fetchVehInfo {}; class isDamaged {}; class giveDiff {}; class handleDamage {}; class handleInv {}; class handleItem {}; class hideObj {}; class hudSetup {}; class hudUpdate {}; class inventoryClosed {}; class inventoryOpened {}; class isUIDActive {}; class keyHandler {}; class loadDeadGear {}; class loadGear {}; class nearATM {}; class nearestDoor {}; class nearUnits {}; class numberText {}; class onFired {}; class onTakeItem {}; class playerSkins {}; class playerTags {}; class postNewsBroadcast {}; class pullOutVeh {}; class pushObject {}; class receiveItem {}; class receiveMoney {}; class revealObjects {}; class saveGear {}; class simDisable {}; class stripDownPlayer {}; class teleport {}; class whereAmI {}; class custPlaySound {}; // Add this line here too }; 5. Open your CfgRemoteExec.hpp file and follow the example: #define F(NAME,TARGET) class NAME { \ allowedTargets = TARGET; \ }; #define JIP(NAME,TARGET) class NAME { \ allowedTargets = TARGET; \ jip = 1; \ }; #define ANYONE 0 #define CLIENT 1 #define SERVER 2 #define HC HC_Life class CfgRemoteExec { class Functions { mode = 1; jip = 0; /* Client only functions */ F(life_fnc_custPlaySound,CLIENT) // HERE!!!!!!!!!!!! 6. Open your stringtable.xml file and follow the example: <?xml version="1.0" encoding="utf-8"?> <Project name="Altis Life RPG"> <!-- YES, BEFORE YOUR 'Init' PACKAGE I REALLY DON'T CARE ABOUT THE POSITION OF THIS ONE --> <Package name="STR_CXP_REMWARN"> <Key ID="STR_CXP_REMWARN_String1"> <Original>Click on a button to send</Original> </Key> <Key ID="STR_CXP_REMWARN_String2"> <Original>a msg to your target:</Original> </Key> </Package> 7. Download the attached files and paste it into the dialog\ and dialog\functions\ folders. Now you're done! *dialog\cxp_remWarn_menu.hpp *dialog\function\fn_cxpReWaOpenMenu.sqf *dialog\function\fn_cxpReWaSend.sqf *core\functions\fn_custPlaySound.sqf Last post edit: 'fixed the broadcast function parameter' RESULT: https://imgur.com/16HjmUP DOWNLOADS: cxp_remWarn_menu.hpp fn_custPlaySound.sqf fn_cxpReWaOpenMenu.sqf fn_cxpReWaSend.sqf
  11. Casperento

    [RELEASE] Terms And Conditions Menu System

    Hey guys, today i'm gonna teach you how to install my Terms And Conditions Menu System. It's made for those who want to make player agree with your server's basic rules/conditions. Difficulty: Medium Features: - Fully configurable - Disconnects player when he don't agree with the terms -TUTORIAL- 1. Open your Config_Master and add this code inside the Life_settings class: cxp_termsAndCond_menuArr[] = { // Messages to be shown on the menu "Don't cheat", "Join our TS3 if you're a cop/med", "Don't spam the game chat", "Whatever you WANT HERE" }; cxp_termsAndCond_menuCopMed = false; // Show this menu to the west/independent team ? 2. Open your Functions.hpp file and add these lines as the example: class Dialog_Controls { file = "dialog\function"; class bankDeposit {}; class bankTransfer {}; class bankWithdraw {}; class displayHandler {}; class gangDeposit {}; class gangWithdraw {}; class garageLBChange {}; class impoundMenu {}; class progressBar {}; class safeFix {}; class safeInventory {}; class safeOpen {}; class safeTake {}; class sellGarage {}; class setMapPosition {}; class spawnConfirm {}; class spawnMenu {}; class spawnPointCfg {}; class spawnPointSelected {}; class unimpound {}; class vehicleGarage {}; class wireTransfer {}; class openCxpMenTerms {}; // First line to add class agreeCxpMenTerms {}; // Second line to add class dAgreeCxpMenTerms {}; // Third line to add }; 3. Open your description.ext file and add the followed lines into your CfgDebriefing class: class CfgDebriefing { class NotWhitelisted { title = "$STR_NotWhitelisted_Title"; subtitle = "$STR_NotWhitelisted_SubTitle"; description = "$STR_NotWhitelisted_Descript"; pictureBackground = ""; picture = ""; pictureColor[] = {0,0.3,0.6,1}; }; class Blacklisted { title = "$STR_Blacklisted_Title"; subtitle = "$STR_Blacklisted_SubTitle"; description = "$STR_Blacklisted_Descript"; pictureBackground = ""; picture = ""; pictureColor[] = {0,0.3,0.6,1}; }; class SpyGlass { title = "$STR_SpyDetect_Title"; subTitle = "$STR_SpyDetect_SubTitle"; description = "$STR_SpyDetect_Descript"; pictureBackground = ""; picture = ""; pictureColor[] = {0,0.3,0.6,1}; }; // !!! THIS ONE !!!! class dAgreeCxp { title = "SERVER'S NAME"; subtitle = "If you don't agree, just go away.."; description = "If this is a mistake, just login to the server again and click the button 'Agree'!"; pictureBackground = ""; picture = ""; pictureColor[] = {0,0.3,0.6,1}; }; }; 4. Open your stringtable.xml file and add the package as the example: <?xml version="1.0" encoding="utf-8"?> <Project name="Altis Life RPG"> <!-- YES, BEFORE YOUR 'Init' PACKAGE I REALLY DON'T CARE ABOUT THE POSITION OF THIS ONE --> <Package name="Cxp_MenuTerms"> <Key ID="STR_Men_Ent_Titulo"> <Original>SERVER'S NAME</Original> </Key> <Key ID="STR_Men_Ent_SubTitulo"> <Original>By playing on our server you agree with the following terms and conditions:</Original> </Key> <Key ID="STR_Men_Ent_BtnConcord"> <Original>Agree</Original> </Key> <Key ID="STR_Men_Ent_BtnDiscord"> <Original>Disagree</Original> </Key> </Package> <Package name="Init"> <Key ID="STR_Init_ClientSetup"> 5. Open your core\fn_initCiv.sqf, fn_initCop.sqf and fn_initMedic.sqf files and add the followed lines as the example: // INIT MEDIC #include "..\script_macros.hpp" /* File: fn_initMedic.sqf Author: Bryan "Tonic" Boardwine Description: Initializes the medic.. */ waitUntil {!(isNull (findDisplay 46))}; if ((FETCH_CONST(life_medicLevel)) < 1 && (FETCH_CONST(life_adminlevel) isEqualTo 0)) exitWith { ["Notwhitelisted",false,true] call BIS_fnc_endMission; sleep 35; }; // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Add this verification here if (LIFE_SETTINGS(getNumber,"cxp_termsAndCond_menuCopMed") isEqualTo 1) then {[] spawn life_fnc_openCxpMenTerms;}else{life_concordDiscord=true;}; waitUntil {life_concordDiscord && isNull (findDisplay 66669)}; [] call life_fnc_spawnMenu; waitUntil{!isNull (findDisplay 38500)}; //Wait for the spawn selection to be open. waitUntil{isNull (findDisplay 38500)}; //Wait for the spawn selection to be done. // INIT COP #include "..\script_macros.hpp" /* File: fn_initCop.sqf Author: Bryan "Tonic" Boardwine Description: Cop Initialization file. */ waitUntil {!(isNull (findDisplay 46))}; if (life_blacklisted) exitWith { ["Blacklisted",false,true] call BIS_fnc_endMission; sleep 30; }; if (!(str(player) in ["cop_1","cop_2","cop_3","cop_4"])) then { if ((FETCH_CONST(life_coplevel) isEqualTo 0) && (FETCH_CONST(life_adminlevel) isEqualTo 0)) then { ["NotWhitelisted",false,true] call BIS_fnc_endMission; sleep 35; }; }; // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Add this verification here if (LIFE_SETTINGS(getNumber,"cxp_termsAndCond_menuCopMed") isEqualTo 1) then {[] spawn life_fnc_openCxpMenTerms;}else{life_concordDiscord=true;}; waitUntil {life_concordDiscord && isNull (findDisplay 66669)}; player setVariable ["rank",(FETCH_CONST(life_coplevel)),true]; [] call life_fnc_spawnMenu; waitUntil{!isNull (findDisplay 38500)}; //Wait for the spawn selection to be open. waitUntil{isNull (findDisplay 38500)}; //Wait for the spawn selection to be done. // INIT CIV #include "..\script_macros.hpp" /* File: fn_initCiv.sqf Author: Bryan "Tonic" Boardwine Description: Initializes the civilian. */ private _altisArray = ["Land_i_Shop_01_V1_F","Land_i_Shop_01_V2_F","Land_i_Shop_01_V3_F","Land_i_Shop_02_V1_F","Land_i_Shop_02_V2_F","Land_i_Shop_02_V3_F"]; private _tanoaArray = ["Land_House_Small_01_F"]; private _spawnBuildings = [[["Altis", _altisArray], ["Tanoa", _tanoaArray]]] call TON_fnc_terrainSort; civ_spawn_1 = nearestObjects[getMarkerPos "civ_spawn_1", _spawnBuildings,350]; civ_spawn_2 = nearestObjects[getMarkerPos "civ_spawn_2", _spawnBuildings,350]; civ_spawn_3 = nearestObjects[getMarkerPos "civ_spawn_3", _spawnBuildings,350]; civ_spawn_4 = nearestObjects[getMarkerPos "civ_spawn_4", _spawnBuildings,350]; // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Add this 2 lines here [] spawn life_fnc_openCxpMenTerms; waitUntil {life_concordDiscord && isNull (findDisplay 66669)}; waitUntil {!(isNull (findDisplay 46))}; if (life_is_alive && !life_is_arrested) then { /* Spawn at our last position */ player setVehiclePosition [life_civ_position, [], 0, "CAN_COLLIDE"]; } else { if (!life_is_alive && !life_is_arrested) then { if (LIFE_SETTINGS(getNumber,"save_civilian_positionStrict") isEqualTo 1) then { _handle = [] spawn life_fnc_civLoadout; waitUntil {scriptDone _handle}; CASH = 0; [0] call SOCK_fnc_updatePartial; }; [] call life_fnc_spawnMenu; waitUntil{!isNull (findDisplay 38500)}; //Wait for the spawn selection to be open. waitUntil{isNull (findDisplay 38500)}; //Wait for the spawn selection to be done. } else { if (life_is_arrested) then { life_is_arrested = false; [player,true] spawn life_fnc_jail; }; }; }; life_is_alive = true; 6. Open your core\configuration.sqf file and add the followed line as the example: #include "..\script_macros.hpp" /* File: configuration.sqf Author: Description: Master Life Configuration File This file is to setup variables for the client, there are still other configuration files in the system ***************************** ****** Backend Variables ***** ***************************** */ life_query_time = time; life_action_delay = time; life_trunk_vehicle = objNull; life_session_completed = false; life_garage_store = false; life_session_tries = 0; life_net_dropped = false; life_siren_active = false; life_clothing_filter = 0; life_clothing_uniform = -1; life_redgull_effect = time; life_is_processing = false; life_bail_paid = false; life_impound_inuse = false; life_action_inUse = false; life_spikestrip = objNull; life_knockout = false; life_interrupted = false; life_respawned = false; life_removeWanted = false; life_action_gathering = false; tawvd_addon_disable = true; life_god = false; life_frozen = false; life_save_gear = []; life_container_activeObj = objNull; life_disable_getIn = false; life_disable_getOut = false; life_admin_debug = false; life_civ_position = []; life_markers = false; life_markers_active = false; life_canpay_bail = true; life_storagePlacing = scriptNull; life_concordDiscord = false; // Add this line here 7. Open your dialog\MasterHandler.hpp file and add the followed line as the example: /* Master UI Resource File */ #include "common.hpp" #include "shop_items.hpp" #include "player_inv.hpp" #include "gang.hpp" #include "key_chain.hpp" #include "impound.hpp" #include "bank.hpp" #include "veh_shop.hpp" #include "shops.hpp" #include "hud_stats.hpp" #include "admin_menu.hpp" #include "cell_phone.hpp" #include "wanted_list.hpp" #include "ticket.hpp" #include "clothing.hpp" #include "trunk.hpp" #include "spawnSelection.hpp" #include "chop_shop.hpp" #include "pInteraction.hpp" #include "deathScreen.hpp" #include "vehicleShop.hpp" #include "vehicleShop3D.hpp" #include "settings.hpp" #include "federalReserve.hpp" #include "compensate.hpp" #include "FuelStat.hpp" #include "newsStation.hpp" #include "cxp_terms_menu.hpp" // Add this include HERE!! 8. Copy and paste the attached files into your dialog\ and dialog\functions folders and you're ready!! *dialog\cxp_terms_menu.hpp *dialog\function\fn_openCxpMenTerms.sqf *dialog\function\fn_agreeCxpMenTerms.sqf *dialog\function\fn_dAgreeCxpMenTerms.sqf RESULT: https://imgur.com/Zvavji5 !-DOWNLOAD-! cxp_terms_menu.hpp fn_agreeCxpMenTerms.sqf fn_dAgreeCxpMenTerms.sqf fn_openCxpMenTerms.sqf
  12. Casperento

    [RELEASE] Improved automatic messages

    Here is my autoMessages script version. I made some improvements, so now you can add innumerous messages to be shown on the player's screen! Features: - Fully Configurable - Clean and optimised code - Random selection of messages without repeat them Difficulty: Copy 'n' Paste 1. Open your Config_Master.hpp and add these lines inside the Life_settings class: /* CXP Automatic Messages */ cxp_autoMessages[] = { // Messages (here you can set innumerous strings to be shown on the player's screen) "<br/><br/><img shadown='false' size='6' image='textures\armalife.jpg'/><br/><br/>Hey dude, join our TS:<br/> <t color='#54ff1f' size='1.5'>yourts3.com</t>", "<br/><br/><img shadown='false' size='6' image='textures\armalife.jpg'/><br/><br/>Hey dude let's talk about boobs, join our TS:<br/> <t color='#54ff1f' size='1.5'>yourts3.com</t>", "<br/><br/><img shadown='false' size='6' image='textures\armalife.jpg'/><br/><br/>Hey dude CHANGE THESE DEFAULT MESSAGES, join our TS:<br/> <t color='#54ff1f' size='1.5'>yourts3.com</t>" }; cxp_autoMessages_delay = 600; // Delay between each message (Default: 600secs) 2. Open your Functions.hpp and add the last line as the example: class Functions { file = "core\functions"; class AAN {}; class accType {}; class actionKeyHandler {}; class animSync {}; class calWeightDiff {}; class checkMap {}; class clearVehicleAmmo {}; class dropItems {}; class escInterupt {}; class fetchCfgDetails {}; class fetchDeadGear {}; class fetchVehInfo {}; class isDamaged {}; class giveDiff {}; class handleDamage {}; class handleInv {}; class handleItem {}; class hideObj {}; class hudSetup {}; class hudUpdate {}; class inventoryClosed {}; class inventoryOpened {}; class isUIDActive {}; class keyHandler {}; class loadDeadGear {}; class loadGear {}; class nearATM {}; class nearestDoor {}; class nearUnits {}; class numberText {}; class onFired {}; class onTakeItem {}; class playerSkins {}; class playerTags {}; class postNewsBroadcast {}; class pullOutVeh {}; class pushObject {}; class receiveItem {}; class receiveMoney {}; class revealObjects {}; class saveGear {}; class simDisable {}; class stripDownPlayer {}; class teleport {}; class whereAmI {}; class cxpAutoMessages {}; // HEY DUDE, I'M HERE }; 3. Add this line on your Altis_Life.Altis\init.sqf file, just like the example: /* File: init.sqf Author: Description: */ StartProgress = false; if (hasInterface) then { [] execVM "briefing.sqf"; //Load Briefing }; [] execVM "KRON_Strings.sqf"; [] spawn life_fnc_cxpAutoMessages; // Add me here dude! StartProgress = true; 4. Copy and paste fn_cxpAutoMessages.sqf into your core\functions and you're done!! *I recommend you to use color-hex.com to change hex colors of your future structured texts on arma 3! fn_cxpAutoMessages.sqf
×