Jump to content
Sign in to follow this  
_qor

Hint only for specific units

Recommended Posts

Is there a possibility to show hints only to specific units?

Perhaps there is another way to show a text-message which makes this feasible?!

I couldnt find any

Share this post


Link to post
Share on other sites

Something like this maybe....using a PVEH and titletext.

In your init.sqf:-

//Network titletext system
if (isNil "PVEH_netText") then {
PVEH_netText = [];
};

"PVEH_netText" addPublicVariableEventHandler {
  	private ["_text","_uidarray"];
  	_text = (_this select 1) select 0;
   	_uidarray = if (count (_this select 1) >1) then {(_this select 1) select 1};

if (isNil "_uidarray") then {
	titletext [_text,"PLAIN DOWN"];
} else {
	if ((getplayerUID player) in _uidarray) then {
		titletext [_text,"PLAIN DOWN"];
	};
};
};

Execute it like this for specific clients based on an array of UID's.... can be just one UID in the array.

PVEH_netText = ["Show this text",["123456","498765","645372"]];
publicvariable "PVEH_netText";

To run on all clients leave out the UID array:-

PVEH_netText = ["Show this text"];
publicvariable "PVEH_netText";

The Publicvariable can be updated from any machine.... but if you want the text to show up on the machine doing the updating you will have to add this line.... as PVEH's don't fire on the machine that broadcasts the variable.

titletext ["Show this text","PLAIN DOWN"];

It's a bit complicated... but if you wrap your head around this you can make all sorts of stuff happen across the network.

Must be MP to test!

Share this post


Link to post
Share on other sites

we do it the hard way lol

in the init - a set of arrays of types of player unit

//officer classes
EGG_EVO_playerOff = ["rhs_msv_officer_armored","bink_omon_teamleader","CZ_Soldier_Office_DES_EP1","CZ_Soldier_SL_DES_EP1","CZ_Soldier_Officer_Wdl_ACR","CZ_Soldier_Leader_Wdl_ACR","CZ_Special_Forces_TL_DES_EP1","CZ_Soldier_Spec1_Wdl_ACR","GUE_Soldier_CO","GUE_Commander","LIN_Officer","LIN_ElPresidente","ibr_venator_leader","ibr_arl_officer","ibr_drg_lord","ibr_drg_officer","PRACS_Regular_O","PRACS_MRegular_O","PRACS_Fusilier_O","PRACS_QAB_O","PRACS_SNG_O","PRACS_Marine_O","PRACS_Paratrooper_O","PRACS_Recon2","PRACS_RedBrigade_O","PRACS_RedBrigade_O_D","US_Soldier_Officer_EP1","Soldier_TL_PMC","GER_Soldier_TL_EP1","CDF_Commander","CDF_Soldier_TL","USMC_Soldier_Officer","FR_Commander","FR_TL","USMC_Soldier_TL","USMC_Soldier_SL","RU_Soldier_Officer","RU_Commander","RUS_Commander","RUS_Soldier_TL","Ins_Commander","Ins_Soldier_CO","Ins_Bardak","Ins_Lopotev","MVD_Soldier_TL","mas_gru_spet_tl_gd","mas_gru_spet_tl_ge","mas_gru_spet_tl_kb","mas_gru_spet_tl_iz","UK_SFMSKD1","AFR_Officer","AFR_Soldier_Officer","MOL_officer","MOL_Soldier_Officer","BAF_Soldier_Officer_MTP","TK_Soldier_Officer_EP1","TK_Aziz_EP1","TK_Commander_EP1","TK_INS_Warlord_EP1","TK_Special_Forces_TL_EP1","TK_INS_Soldier_TL_EP1","uns_nva1","uns_nva1a","uns_nva1b","uns_nva1c","uns_nva9b","uns_nva9c","uns_rf_vc1","uns_rf_vc9a","uns_mf_vc1a","uns_mf_vc1b","uns_mf_vc2a","uns_mf_vc9a","uns_guerrilla1","uns_usmc_1a","uns_usmc_1b","uns_usmc_1c","uns_usmc_1d","uns_usmc_1e","uns_usmc_1f","uns_army_1a","uns_army_1aa","uns_army_2a","uns_army_2aa","uns_army_3a","uns_army_3aa","uns_lrrp_1a","uns_lrrp_1aa","uns_lrrp_2a","uns_lrrp_2aa","uns_sf_1a","uns_sf_1aa","uns_sf_2a","uns_sf_2aa","s_tigerian1","s_tigerian2"]; 

//engineer classes
EGG_EVO_playerEng = ["rhs_msv_engineer","mas_gru_spet_dem_kb","vdvRFs10","CZ_Soldier_Engineer_Dst_ACR","CZ_Soldier_Engineer_Wdl_ACR","CZ_Soldier_Spec_Demo_Dst_ACR","CZ_Soldier_Spec_Demo_Wdl_ACR","GUE_Soldier_Sab","LIN_Soldier_Engineer","ibr_venator_shotgun","ibr_arl_sab","PRACS_Regular_ENG","PRACS_MRegular_ENG","PRACS_Fusilier_ENG","PRACS_QAB_ENG","PRACS_SNG_ENG","PRACS_Marine_ENG","PRACS_Paratrooper_ENG","PRACS_Recon5","PRACS_RedBrigade_ENG_D","PRACS_RedBrigade_ENG","US_Soldier_Engineer_EP1","Soldier_Engineer_PMC","USMC_SoldierS_Engineer","FR_Sapper","Ins_Soldier_Sapper","Ins_Soldier_Sab","RUS_Soldier_Sab","mas_gru_spet_min_gd","mas_gru_spet_dem_iz","mas_gru_spet_min_ge","mas_gru_spet_dem_ge","UK_SFMSKD6","UK_SFT6","AFR_Guard_M1014","AFR_Soldier_Engineer","MOL_Soldier_Engineer","BAF_Soldier_EN_MTP","uns_nva6sap","uns_nva6asap","uns_nva6bsap","uns_nva12a","uns_nva12b","uns_nva12c","uns_nva12d","uns_rf_vc6asap","uns_rf_vc6bsap","uns_mf_vc6asap","uns_mf_vc6bsap","uns_usmc_8ac","uns_usmc_8bc","uns_army_7arto","uns_army_7brto","uns_sf_11a","uns_sf_11b","uns_sf_11c","uns_cidg_9a","uns_cidg_10a","fsp_tigerian3","s_tigerian8"];

//medic classes
EGG_EVO_playerMedic = ["vdvRFs6","rhs_msv_medic","US_Delta_Force_Medic_EP1","CZ_Soldier_medik_DES_EP1","CZ_Soldier_Medic_Wdl_ACR","GUE_Soldier_Medic","US_Soldier_Medic_EP1","LIN_Soldier_Medic","LIN_Medic","ibr_venator_medic","ibr_arl_medic","ibr_paramedic","PRACS_Regular_MED","PRACS_MRegular_MED","PRACS_Fusilier_MED","PRACS_QAB_MED","PRACS_SNG_MED","PRACS_Marine_MED","PRACS_Paratrooper_MED","PRACS_RedBrigade_MED_D","PRACS_RedBrigade_MED","US_Soldier_Medic_EP1","Soldier_Medic_PMC","GER_Soldier_Medic_EP1","CDF_Soldier_Medic","USMC_Soldier_Medic","FR_Corpsman","FR_Sykes","RU_Soldier_Medic","Ins_Soldier_Medic","mas_gru_spet_med2_ge","mas_gru_spet_med_iz","mas_gru_spet_med2_gd","UK_SFMSKD4","UK_SFT4","AFR_Medic","AFR_Soldier_Medic","MOL_Medic","MOL_Soldier_Medic","BAF_Soldier_Medic_MTP","TK_Soldier_Medic_EP1","uns_nva2med","uns_nva11a","uns_nva11b","uns_rf_vc2a","uns_rf_vc11a","uns_mf_vc11a","uns_usmc_2amed","uns_usmc_2bmed","uns_usmc_2cmed","uns_usmc_2dmed","uns_army_2amed","uns_army_2bmed","uns_lrrp_2amed","uns_lrrp_2aamed","uns_lrrp_2abmed","uns_lrrp_2acmed","uns_lrrp_2admed","uns_lrrp_2aemed","uns_sf_2amed","fsp_tigerian4","s_tigerian9"];

//sniper classes
EGG_EVO_playerSniper = ["speznaz_06","CZ_Sharpshooter_DES_ACR","CZ_Soldier_Sniper_EP1","CZ_Sharpshooter_Wdl_ACR","CZ_Soldier_Sniper_ACR","CZ_Special_Forces_Scout_DES_EP1","CZ_Soldier_Spec2_Wdl_ACR","GUE_Soldier_Sniper","LIN_Soldier_Sniper","LIN_Soldier_Spotter","ibr_venator_marksman","ibr_arl_sniper","PRACS_Regular_NVS","PRACS_Regular_DMS","PRACS_Regular_SPR","PRACS_MRegular_NVS","PRACS_MRegular_DMS","PRACS_MRegular_SPR","PRACS_Fusilier_NVS","PRACS_Fusilier_DMS","PRACS_Fusilier_SPR","PRACS_Fusilier_HSPR","PRACS_QAB_DMS","PRACS_QAB_SPR","PRACS_QAB_HSPR","PRACS_QAB_NVS","PRACS_SNG_DMS","PRACS_SNG_SPR","PRACS_Marine_DMS","PRACS_Marine_SPR","PRACS_Marine_NVS","PRACS_Marine_RMR","PRACS_Marine_RMR2","PRACS_Marine_RMR3","PRACS_Paratrooper_DMS","PRACS_Paratrooper_SPR","PRACS_Paratrooper_NVS","PRACS_Recon6","PRACS_Recon3","PRACS_Sniper","PRACS_Sniper_TWS","PRACS_Sniper_SPO","PRACS_Sniper_SD","PRACS_Sniper_SD_NVS","PRACS_RoyalCommando_DMS","PRACS_RSAF_CSAR_DMS","PRACS_RSAF_G_NVS","PRACS_RedBrigade_DMS","PRACS_RedBrigade_SPR","PRACS_RedBrigade_DMS_D","PRACS_RedBrigade_SPR_D","US_Soldier_SniperH_EP1","Soldier_Sniper_KSVK_PMC","Soldier_Sniper_PMC","GER_Soldier_Scout_EP1","CDF_Soldier_Marksman","USMC_SoldierS_SniperH","USMC_SoldierS_Sniper","USMC_SoldierM_Marksman","FR_Marksman","RU_Soldier_Sniper","RU_Soldier_SniperH","RU_Soldier_Marksman","Ins_Soldier_Sniper","MVD_Soldier_Sniper","MVD_Soldier_Marksman","RUS_Soldier_Marksman","mas_gru_spet_snp_ghil_kb","mas_gru_spet_snp_ghil_gd","mas_gru_spet_snp_iz","UK_SFMSKD5","UK_SFMSKT5","AFR_Guard_M16","AFR_Soldier_Sniper","AFR_Guard_Marksman","MOL_Guard_Marksman","MOL_Soldier_Sniper","BAF_Soldier_scout_MTP","BAF_Soldier_Marksman_MTP","BAF_Soldier_SniperN_MTP","BAF_Soldier_SniperH_MTP","BAF_Soldier_Sniper_MTP","TK_Soldier_Sniper_EP1","TK_INS_Soldier_Sniper_EP1","uns_nva5sni","uns_local_vc1e","uns_local_vc2c","uns_rf_vc5asni","uns_rf_vc5bsni","uns_mf_vc5asni","uns_usmc_7arto","uns_usmc_7brto","uns_sf_7arto","uns_sf_7aarto","uns_cidg_11a","fsp_tigerian5","s_tigerian7"];

//spotter classes
EGG_EVO_playerSpot = ["CZ_Soldier_DES_EP1","CZ_Soldier_B_DES_EP1","CZ_Soldier805_DES_ACR","CZ_Soldier_Wdl_ACR","CZ_Soldier_805_Wdl_ACR","CZ_Special_Forces_DES_EP1","GUE_Soldier_Scout","USMC_SoldierS_Spotter","mas_gru_spet_spt_ghil_iz","AFR_Guard_M9","AFR_Soldier_Spotter","MOL_Soldier_Spotter","BAF_Soldier_spotter_MTP","BAF_Soldier_spotterN_MTP"];

//grenadier classes
EGG_EVO_playerGL = ["speznaz_03","bink_omon_operator_gl","CZ_Soldier_805g_Dst_ACR","CZ_Soldier_805g_Wdl_ACR","CZ_Special_Forces_GL_DES_EP1","GUE_Soldier_GL","LIN_Soldier_GL","ibr_venator_m79","PRACS_Regular_GRE","PRACS_MRegular_GRE","PRACS_Fusilier_GRE","PRACS_QAB_GRE","PRACS_Paratrooper_GRE","PRACS_RedBrigade_GRE_D","PRACS_RedBrigade_GRE","US_Soldier_GL_EP1","Soldier_GL_M16A2_PMC","Soldier_GL_PMC","GER_Soldier_EP1","CDF_Soldier_GL","USMC_Soldier_GL","FR_Assault_GL","FR_GL","FR_AC","FR_Cooper","RU_Soldier_GL","Ins_Soldier_GL","RUS_Soldier_GL","MVD_Soldier_GL","mas_gru_spet_op1_gd","mas_gru_spet_op1_kb","UK_SFD1","AFR_Guard_M16","AFR_Soldier_GL","MOL_Soldier_GL","BAF_Soldier_GL_MTP","TK_Soldier_GL_EP1","uns_usmc_6agren","uns_army_6agren","uns_lrrp_6agren","uns_cidg_8d","uns_cidg_10d","uns_cidg_11c","fsp_tigerian2","s_tigerian4"];

//Anti air classes
EGG_EVO_playerAA = ["rhs_msv_aa","vdvRFs9","CZ_Soldier_Spotter_ACR","CZ_Soldier_Recon_Wdl_ACR","GUE_Soldier_AA","LIN_Soldier_AA","ibr_arl_aa","PRACS_Regular_AA","PRACS_MRegular_AA","PRACS_Fusilier_AA","PRACS_QAB_AA","PRACS_SNG_AA","PRACS_Marine_AA","PRACS_Paratrooper_AA","PRACS_RSAF_G_AA","PRACS_RedBrigade_AA","PRACS_RedBrigade_AA_D","US_Soldier_AA_EP1","Soldier_AA_PMC","USMC_Soldier_AA","RU_Soldier_AA","Ins_Soldier_AA","UK_SFD3","UK_SFT5","AFR_Soldier_Stinger","AFR_Soldier_Igla","AFR_Guard_AA","MOL_Soldeir_AA","BAF_Soldier_AA_MTP","BAF_Soldier_AAA_MTP","TK_Soldier_AA_EP1","s_tigerian11"];

//machinegunner classes
EGG_EVO_playerMG = ["mas_gru_spet_mg_ge","speznaz_04","CZ_Soldier_AMG_DES_EP1","CZ_Soldier_MG2_Dst_ACR","CZ_Soldier_MG_DES_EP1","CZ_Soldier_MG2_Wdl_ACR","CZ_Soldier_MG_Wdl_ACR","CZ_Special_Forces_MG_DES_EP1","CZ_Soldier_Spec3_Wdl_ACR","GUE_Soldier_AR","LIN_Soldier_MG","LIN_Soldier_AR","ibr_venator_mg","ibr_arl_mg","ibr_arl_ar","PRACS_Regular_GNR","PRACS_Regular_ARM","PRACS_Regular_MG","PRACS_MRegular_GNR","PRACS_MRegular_ARM","PRACS_MRegular_MG","PRACS_Fusilier_GNR","PRACS_Fusilier_ARM","PRACS_Fusilier_MG","PRACS_QAB_ARM","PRACS_QAB_MG","PRACS_QAB_GNR","PRACS_SNG_GNR","PRACS_SNG_ARM","PRACS_SNG_MG","PRACS_Marine_GNR","PRACS_Marine_MG","PRACS_Paratrooper_GNR","PRACS_Paratrooper_ARM","PRACS_Paratrooper_MG","PRACS_Paratrooper_PFAR","PRACS_Paratrooper_PFMG","PRACS_RSAF_CSAR_MG","PRACS_RSAF_G_MG","PRACS_Recon4","PRACS_RoyalCommando_MG","PRACS_RedBrigade_ARM","PRACS_RedBrigade_MG","PRACS_RedBrigade_ARM_D","PRACS_RedBrigade_MG_D","PRACS_RedBrigade_GNR_D","PRACS_RedBrigade_GNR","US_Soldier_MG_EP1","Soldier_MG_PKM_PMC","Soldier_MG_PMC","GER_Soldier_MG_EP1","CDF_Soldier_AR","CDF_Soldier_MG","USMC_Soldier_MG","USMC_Soldier_AR","FR_AR","FR_Rodriguez","RU_Soldier_MG","RU_Soldier_AR","Ins_Soldier_AR","Ins_Soldier_MG","MVD_Soldier_MG","mas_gru_spet_mg_kb","mas_gru_spet_rpk_gd","UK_SFMSKD2","UK_SFT2","AFR_Soldier_MG","AFR_Guard_AR","MOL_Soldier_MG","MOL_Guard_AR","BAF_Soldier_AAR_MTP","BAF_Soldier_AMG_MTP","BAF_Soldier_AR_MTP","BAF_Soldier_MG_MTP","TK_Soldier_MG_EP1","TK_Soldier_AMG_EP1","TK_INS_Soldier_MG_EP1","TK_Special_Forces_MG_EP1","uns_nva3mg","uns_nva3amg","uns_nva10a","uns_nva10b","uns_rf_vc3a","uns_rf_vc3b","uns_rf_vc10a","uns_mf_vc3a","uns_mf_vc3b","uns_mf_vc10a","uns_mf_vc10b","uns_usmc_3amg","uns_usmc_3bmg","uns_army_3amg","uns_army_3bmg","uns_army_3cmg","uns_lrrp_3amg","uns_sf_3amg","uns_sf_3bmg","uns_sf_3cmg","s_tigerian5","s_tigerian6"];

//anti tank classes
EGG_EVO_playerAT = ["vdvRFs1","bink_omon_operator_at","CZ_Soldier_RPG_Ass_Dst_ACR","CZ_Soldier_AT_DES_EP1","CZ_Soldier_RPG_Dst_ACR","CZ_Soldier_RPG_Ass_Wdl_ACR","CZ_Soldier_AT_Wdl_ACR","CZ_Soldier_RPG_Wdl_ACR","GUE_Soldier_AT","LIN_Soldier_AT","LIN_Soldier_LAT","LIN_Soldier_HAT","ibr_arl_at","ibr_drg_at","PRACS_Regular_AT","PRACS_Regular_HAT","PRACS_Regular_MAT","PRACS_MRegular_AT","PRACS_MRegular_HAT","PRACS_MRegular_MAT","PRACS_Fusilier_AT","PRACS_Fusilier_MAT","PRACS_Fusilier_HAT","PRACS_QAB_AT","PRACS_QAB_MAT","PRACS_QAB_HAT","PRACS_SNG_AT","PRACS_SNG_HAT","PRACS_SNG_MAT","PRACS_Marine_AT","PRACS_Marine_HAT","PRACS_Paratrooper_AT","PRACS_Paratrooper_HAT","PRACS_RoyalCommando_3","PRACS_Paratrooper_MAT","PRACS_RedBrigade_HAT_D","PRACS_RedBrigade_AT_D","PRACS_RedBrigade_MAT_D","PRACS_RedBrigade_HAT","PRACS_RedBrigade_AT","PRACS_RedBrigade_MAT","US_Soldier_AT_EP1","US_Soldier_HAT_EP1","Soldier_AT_PMC","CDF_Soldier_RPG","USMC_Soldier_AT","USMC_Soldier_LAT","USMC_Soldier_HAT","RU_Soldier_HAT","RU_Soldier_AT","RU_Soldier_LAT","Ins_Soldier_AT","MVD_Soldier_AT","mas_gru_spet_op2_ge","mas_gru_spet_op2_iz","UK_SFMSKD3","UK_SFT3","AFR_Soldier_AT","AFR_Soldier_LAT","AFR_Soldier_HAT","MOL_Soldier_AT","MOL_Soldier_LAT","MOL_Soldier_HAT","BAF_Soldier_AAT_MTP","BAF_Soldier_AHAT_MTP","BAF_Soldier_AT_MTP","BAF_Soldier_HAT_MTP","TK_Soldier_HAT_EP1","TK_Soldier_AT_EP1","TK_INS_Soldier_AT_EP1","uns_nva4rpg","uns_nva4arpg","uns_rf_vc4a","uns_rf_vc4b","uns_mf_vc4a","uns_mf_vc4b","uns_usmc_8b","uns_usmc_8bb","uns_usmc_8f","uns_usmc_8fb","uns_usmc_8g","uns_usmc_8gb","uns_army_8a","uns_army_8ba","uns_army_8bb","uns_army_8bd","uns_army_8c","uns_army_8cc","uns_army_8da","uns_army_8db","uns_army_8dd","uns_lrrp_8a","uns_lrrp_8b","uns_lrrp_8c","uns_lrrp_8d","uns_lrrp_8e","uns_lrrp_8f","uns_lrrp_8g","uns_lrrp_8h","uns_lrrp_8i","uns_lrrp_8j","uns_lrrp_9a","uns_lrrp_9b","uns_lrrp_9c","uns_lrrp_9d","uns_lrrp_9e","uns_lrrp_9f","uns_lrrp_9g","uns_lrrp_9h","uns_lrrp_9i","uns_lrrp_9j","uns_sf_8a","uns_sf_8b","uns_sf_8c","uns_sf_9a","uns_sf_9b","uns_sf_9c","uns_sf_10a","uns_sf_10b","uns_sf_10c","s_tigerian10"];

//pilot classes
EGG_EVO_playerPilot = ["CZ_Soldier_Pilot_EP1","CZ_Soldier_Pilot_Wdl_ACR","GUE_Soldier_Pilot","PRACS_Attack_Heli_pilot","LIN_Soldier_Pilot","ibr_arl_pilot","ibr_drg_pilot","PRACS_C130pilot","PRACS_A4M_Pilot","PRACS_F16_Pilot","PRACS_F15_Pilot","PRACS_Mirage3_Pilot","PRACS_F18_Pilot","PRACS_Helipilot","PRACS_Helipilot_SAR","US_Soldier_Pilot_EP1","US_Pilot_Light_EP1","Soldier_Pilot_PMC","USMC_Soldier_Pilot","RU_Soldier_Pilot","Ins_Soldier_Pilot","AFR_Soldier_Pilot","MOL_Soldier_Pilot","BAF_Pilot_MTP","TK_Soldier_Pilot_EP1","uns_pilot1","uns_pilot2","s_tigerian13"];

//crew classes
EGG_EVO_playerCrew = ["CZ_Soldier_Crew_Dst_ACR","CZ_Soldier_Crew_Wdl_ACR","GUE_Soldier_Crew","LIN_Soldier_Crew","ibr_arl_crew","Soldier_Crew_PMC","USMC_Soldier_Crew","CDF_Soldier_Crew","USMC_LHD_Crew_White","USMC_LHD_Crew_Blue","USMC_LHD_Crew_Brown","USMC_LHD_Crew_Green","USMC_LHD_Crew_Red","USMC_LHD_Crew_Purple","USMC_LHD_Crew_Yellow","RU_Soldier_Crew","GUE_Soldier_Crew","Ins_Soldier_Crew","MOL_Soldier_Crew","AFR_Soldier_Crew","TK_Soldier_Crew_EP1","s_tigerian12"];

//spies
EGG_EVO_spytype = ["US_Delta_Force_Undercover_Takistani06_EP1","ValentinaFit","Rocker1","TK_CIV_Takistani04_EP1","CIV_EuroMan01_EP1","CIV_EuroMan02_EP1","Dr_Hladik_EP1","Dr_Annie_Baker_EP1","TK_INS_Bonesetter_EP1","TK_CIV_Woman02_EP1","TK_CIV_Woman01_EP1","TK_GUE_Soldier_5_EP1","TK_INS_Soldier_AT_EP1","TK_Special_Forces_MG_EP1","ibr_cop1","ibr_arl_eric","ibr_gangman_red","Ins_Woodlander2","Ins_Worker2"];

these match to the playable units in any mission we create (or we add new ones)

then in our spawn script we have for example a range of actions added to the player

_playertype = typeOf (vehicle player);
Sleep 0.2;
if (_playertype in EGG_EVO_PlayerMedic) then {_actionId8 = player addAction [localize "STR_M04t52", "data\scripts\mtent.sqf",0,1, false, true,"test2"]};
if (_playertype in EGG_EVO_PlayerEng) then {_actionId8 = player addAction [localize "STR_M04t53", "data\scripts\etent.sqf",0,1, false, true,"test2"]};
if (_playertype in EGG_EVO_PlayerOff) then {_actionId8 = player addAction ["Deploy Recon HQ", "actions\ambtent.sqf",0,1, false, true,"test2"]};
if ((_playertype in EGG_EVO_PlayerSniper) and (perkparam == 1)) then {_actionId8 = player addAction ["Short Ladder", "actions\static\makestatic.sqf",[_this,0],1, false, true,"test2"]};
if ((_playertype in EGG_EVO_PlayerSniper) and (perkparam == 1)) then {_actionId8 = player addAction ["Long Ladder", "actions\static\makestatic.sqf",[_this,1],1,false, true,"test2"]};
if ((_playertype in EGG_EVO_PlayerGL) and (perkparam == 1)) then {_actionId8 = player addAction ["Build MK19 Nest", "actions\static\makestatic.sqf",[_this,2],1, false, true,"test2"]};
if ((_playertype in EGG_EVO_PlayerAA) and (perkparam == 1)) then {_actionId8 = player addAction ["Build AntiAir Nest", "actions\static\makestatic.sqf",[_this,3],1, false, true,"test2"]};
if ((_playertype in EGG_EVO_PlayerAT) and (perkparam == 1)) then {_actionId8 = player addAction ["Build Antitank Nest", "actions\static\makestatic.sqf",[_this,4],1, false, true,"test2"]};
if ((_playertype in EGG_EVO_PlayerMG) and (perkparam == 1)) then {_actionId8 = player addAction ["Build MG Nest", "actions\static\makestatic.sqf",[_this,5],1, false, true,"test2"]};
if ((_playertype in EGG_EVO_PlayerSniper) and (perkparam == 1)) then {_actionId8 = player addAction ["Build Camo Net", "actions\static\makestatic.sqf",[_this,6],1, false, true,"test2"]};

//test

if ((_playertype in EGG_EVO_PlayerSniper) and (perkparam == 1) and (gitsnades == 1)) then {_actionId8 = player addAction ["GPS/INS Menu", "actions\GPSINS.sqf",[],1, false, true,"test2"]};
if ((_playertype in EGG_EVO_PlayerPilot) and (perkparam == 1) and (gitsnades == 1)) then {_actionId8 = player addAction ["GPS/INS Menu", "actions\GPSINS.sqf",[],1, false, true,"test2"]};
//_gpsd = createDialog 'glt_airgpsmfd';
//
if ((_playertype in EGG_EVO_PlayerPilot) and (perkparam == 1)) then {_actionId8 = player addAction ["Build Refuel Depot", "actions\static\makestatic.sqf",[_this,7],1, false, true,"test2"]};
if ((_playertype in EGG_EVO_PlayerOff) and (perkparam == 1)) then {_actionId8 = player addAction ["Build Mortar", "actions\static\makestatic.sqf",[_this,8],1, false, true,"test2"]};
if (perkparam == 1) then {_actionId8 = player addAction ["Build Foxhole", "actions\static\makestatic.sqf",[_this,9],1, false, true,"test2"]};

same for hinting

if (_playertype in EGG_EVO_PlayerEng) then {hint format["Your player type is a : %1 and you can disable mines",_playertype]};

works for us!

Share this post


Link to post
Share on other sites

@ eggBeast - LOL, I'm the same way. I'll write a whole wall of text to do a simple function.

Share this post


Link to post
Share on other sites

You don't need PVEHs or anything like that. BIS is nice enough to add in a Remote Execution function ya'll, learn to use it :)

private["_units","_iUnit"];
_units = ["USMC_Soldier_Officer","USMC_Soldier_TL","USMC_Soldier_SL"];

for "_i" from 0 to (count playableUnits) do
{
_iUnit = playabeUnits select _i;
if (typeOf _iUnit in _units) then
{
	[nil,_iUnit,rHINT,"Message to officers and NCOs"] call RE;
};
};

Share this post


Link to post
Share on other sites

But remote execution is using the PV/PVEH system :)?

From the RE page:

using publicVariable + addPublicVariableEventHandler (EH that fires for each publicVariabled variable on all clients - excluding calling client) + direct call on calling client

And with that you would be doing several publicVariable in a row instead of just doing it once

Share this post


Link to post
Share on other sites

My point cuel, was that there is already a system in place that BIS developed and there is no sense in making your own, if you want to do things easily. Adding in suggestions, ya know.

Share this post


Link to post
Share on other sites

Of course, but I think it's wise to bring up the downsides aswell :)

Writing your own PV/PVEH's is a great learning experience

Share this post


Link to post
Share on other sites

My 2 cents...

There's a lot of sense in making your own. Because you can tailor it to your specific needs it will be way more efficient than using a generic built in routine!

Share this post


Link to post
Share on other sites

Very true, I personally just go for a quick way to do things. PVEHs are nice for a lot of things, I just think for small amounts of code such as hints it's easier to use what's already there :)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×