Acheter les maisons Tanoa


#1

Bonjour,

Après plusieurs demandes, je tiens à faire un tutoriel pour savoir comment acheter les maisons Tanoa sous Altis Life 4.4.

Pour ce faire, direction core\config\fn_houseConfig.sqf

Vous devriez trouver ceci :

/*  
    File: fn_houseConfig.sqf  
    Author: Bryan "Tonic" Boardwine  

    Description:  
    Master config file for buyable houses?  
*/  
private["_house"];  
_house = [_this,0,"",[""]] call BIS_fnc_param;  
if (_house isEqualTo "") exitWith {[]};  

/*  
    Return Format:  
    [price,# of containers allowed]  
*/  
switch (true) do {  
    case (_house in ["Land_i_House_Big_02_V1_F","Land_i_House_Big_02_V2_F","Land_i_House_Big_02_V3_F"]): {[1550000,3]};  
    case (_house in ["Land_i_House_Big_01_V1_F","Land_i_House_Big_01_V2_F","Land_i_House_Big_01_V3_F"]): {[2200000,4]};  
    case (_house in ["Land_i_Garage_V1_F","Land_i_Garage_V2_F"]): {[500000,0]};  
    case (_house in ["Land_i_House_Small_01_V1_F","Land_i_House_Small_01_V2_F","Land_i_House_Small_01_V3_F"]): {[1050000,2]};  
    case (_house in ["Land_i_House_Small_02_V1_F","Land_i_House_Small_02_V2_F","Land_i_House_Small_02_V3_F"]): {[1000500,2]};  
    case (_house in ["Land_i_House_Small_03_V1_F"]): {[1250000,3]};  
    case (_house in ["Land_i_Stone_HouseSmall_V2_F","Land_i_Stone_HouseSmall_V1_F","Land_i_Stone_HouseSmall_V3_F"]): {[750000,1]};  
    default {[]};  
};  

Le système est simple, on check si la maison que le joueur souhaite acheter est dans le tableau défini. Chaque tableau défini son propre prix et son nombre de container max.

Et avec les classnames Tanoa (Mercé Shadooowws :))

/*  
    File: fn_houseConfig.sqf  
    Author: Bryan "Tonic" Boardwine  

    Description:  
    Master config file for buyable houses?  
*/  
private["_house"];  
_house = [_this,0,"",[""]] call BIS_fnc_param;  
if (_house isEqualTo "") exitWith {[]};  

/*  
    Return Format:  
    [price,# of containers allowed]  
*/  
switch (true) do {  
    case (_house in ["Land_House_Big_01","Land_House_Big_02","Land_House_Big_03","Land_House_Big_04","Land_House_Big_05"): {[600000,5]};  
  //case (_house in ["Land_House_Native_01","Land_House_Native_02"]): {[5000,1]}; /// Maisons en paille sans portes  
​    case (_house in ["Land_House_Small_01","Land_House_Small_02","Land_House_Small_03","Land_House_Small_04","Land_House_Small_05","Land_House_Small_06"]): {[50000,2]};  
​    default {[]};  
};  

Et voilà, aussi simple que ça !


#2

Merci mec, d’avoir fait le tutoriel :slight_smile:


#3

Tutoriel mis à jour avec les classnames Tanoa !

Mercé Shadooowws !


#4

Impossible de poser un coffre perso, sa me dit que je suis pas le proprio


#5

Flarz

ça, ça vient de ta mission, fonctionne très bien pour ma part


#6

J’ai tester quelques maisons sont à zéro au niveau du prix avec any qui suit x)


#7

A revoir alors :wink:


#8

Je suis en train de travailler les achats et les lumières des maisons.

Voilà mon fn_houseConfig.sqf:

/*  
	Author: Bryan "Tonic" Boardwine  

	Description:  
	Master config file for buyable houses?  
*/  
private["_house"];  
_house = [_this,0,"",[""]] call BIS_fnc_param;  
if(_house == "") exitWith {[]};  

/*  
	Return Format:  
	[price,# of containers allowed]  
*/  
switch (true) do {  
	// Commercial  
	case (_house == "Land_Shop_Town_03_F"): {[2600000,3]};  
	case (_house == "Land_Shop_Town_01_F"): {[2600000,3]};  
	case (_house == "Land_SM_01_shed_F"): {[2600000,3]};  
	case (_house == "Land_Supermarket_01_F"): {[2600000,3]};  
	case (_house == "Land_School_01_F"): {[2600000,3]};  
	case (_house == "Land_FuelStation_01_shop_F"): {[2600000,3]};  
	case (_house == "Land_FuelStation_02_workshop_F"): {[2600000,3]};  

	// Civil  
	case (_house == "Land_GarageShelter_01_F"): {[600000,2]};	  
	case (_house == "Land_House_Big_01_F"): {[900000,2]};  
	case (_house == "Land_House_Big_02_F"): {[3500000,4]};  
	case (_house == "Land_House_Big_03_F"): {[4000000,4]};	  
	case (_house == "Land_House_Small_02_F"): {[700000,2]};	  
	case (_house == "Land_House_Small_03_F"): {[1000000,2]};	  
	case (_house == "Land_House_Small_04_F"): {[1200000,2]};	  
	case (_house == "Land_House_Small_05_F"): {[800000,2]};  
	case (_house == "Land_House_Small_06_F"): {[1100000,2]};	  
	case (_house == "Land_Shed_02_F"): {[250000,1]};	  
	case (_house == "Land_Shed_05_F"): {[500000,2]};  
	case (_house == "Land_Slum_03_F"): {[2500000,3]};	  
	default {[]};  
};  

Je vous conseille de faire comme moi personnaliser le prix et la capacité des maisons individuellement.

Au lieu d’utiliser le:

in  

Utiliser plutôt le:

==  

Voici le lightHouse que je modifie en ce moment.

#include "..\..\script_macros.hpp"  
/*  
	Author: Bryan "Tonic" Boardwine  

	Description:  
	Tells clients to either turn the lights on for that house  
	or off.  
*/  

private["_lightInt1","_lightInt2","_lightInt3","_lightInt4","_lightInt5","_lightExt1","_lightExt2","_lightExt3","_lightExt4","_lightExt5","_exit"];  
params [  
	["_house",objNull,[objNull]],  
	["_mode",false,[false]]  
];  

if(isNull _house) exitWith {};  
if(!(_house isKindOf "House_F")) exitWith {};  

_exit = false;  
if(_mode) then {  
	_lightInt1 = "#lightpoint" createVehicleLocal [0,0,0];  
	_lightInt2 = "#lightpoint" createVehicleLocal [0,0,0];  
	_lightInt3 = "#lightpoint" createVehicleLocal [0,0,0];  
	_lightInt4 = "#lightpoint" createVehicleLocal [0,0,0];  
	_lightInt5 = "#lightpoint" createVehicleLocal [0,0,0];  

	_lightExt1 = "#lightpoint" createVehicleLocal [0,0,0];  
	_lightExt2 = "#lightpoint" createVehicleLocal [0,0,0];  
	_lightExt3 = "#lightpoint" createVehicleLocal [0,0,0];  
	_lightExt4 = "#lightpoint" createVehicleLocal [0,0,0];  
	_lightExt5 = "#lightpoint" createVehicleLocal [0,0,0];  

	switch(true) do {  

		case ((typeOf _house) == "Land_School_01_F"): {  
			_lightInt1 lightAttachObject [_house,[-9.75,0.8,2.35]];  
			_lightInt2 lightAttachObject [_house,[-0.1,0.8,2.35]];  
			_lightInt3 lightAttachObject [_house,[9.63,0.8,2.35]];  
			_lightExt1 lightAttachObject [_house,[-9.75,-5.65,1.4]];  
			_lightExt2 lightAttachObject [_house,[-0.06,-5.65,1.4]];  
			_lightExt3 lightAttachObject [_house,[9.63,-5.65,1.4]];  
		};  

		case ((typeOf _house) == "Land_Shop_Town_01_F"): {  
			_lightInt1 lightAttachObject [_house,[0,-5.6,5.05]];  
			_lightExt1 lightAttachObject [_house,[-3.15,-6,-0.65]];  
			_lightExt2 lightAttachObject [_house,[0,-1,-0.08]];  
			_lightExt3 lightAttachObject [_house,[3.15,-6,-0.65]];  
		};  

		case ((typeOf _house) == "Land_Shop_Town_03_F"): {  
			_lightInt1 lightAttachObject [_house,[-4.2,-2.5,-0.17]];  
			_lightInt2 lightAttachObject [_house,[2.6,-2.5,-0.17]];  
			_lightExt1 lightAttachObject [_house,[-4.2,-8.34,-0.17]];  
			_lightExt2 lightAttachObject [_house,[4.2,-8.34,-0.17]];  
		};  

		case ((typeOf _house) == "Land_SM_01_shed_F"): {  
			_lightInt1 lightAttachObject [_house,[-1.65,3.5,4]];  
			_lightInt2 lightAttachObject [_house,[3.45,3.5,4]];  
			_lightInt3 lightAttachObject [_house,[8.55,3.5,4]];  
			_lightInt4 lightAttachObject [_house,[13.55,3.5,4]];  
			_lightInt5 lightAttachObject [_house,[-7,0.25,1.3]];  
		};  

		case ((typeOf _house) == "Land_Supermarket_01_F"): {  
			_lightInt1 lightAttachObject [_house,[-1.9,-2.9,1.4]];  
			_lightInt2 lightAttachObject [_house,[4.1,-2.9,1.4]];  
			_lightExt1 lightAttachObject [_house,[-2.9,-10.845,1.72]];  
			_lightExt2 lightAttachObject [_house,[1.15,-10.845,1.72]];  
			_lightExt3 lightAttachObject [_house,[5.1,-10.845,1.72]];  
			_lightExt4 lightAttachObject [_house,[-1.95,-13.9,2.18]];  
			_lightExt5 lightAttachObject [_house,[5.78,-13.9,2.35]];  
		};  

		case ((typeOf _house) == "Land_FuelStation_01_shop_F"): {  
			_lightInt1 lightAttachObject [_house,[-3.5,-2.5,1.1]];  
			_lightInt2 lightAttachObject [_house,[-1.8,2.97,1.1]];  
			_lightInt3 lightAttachObject [_house,[0.14,-2.5,1.1]];  
			_lightExt1 lightAttachObject [_house,[1.2,5.8,0.92]];  
		};  

		case ((typeOf _house) == "Land_FuelStation_02_workshop_F"): {  
			_lightInt1 lightAttachObject [_house,[-2.7,4,2.1]];  
			_lightInt2 lightAttachObject [_house,[2.5,4,2.1]];  
			_lightExt1 lightAttachObject [_house,[-2.6,-2.4,2]];  
		};		  
		_exit = true;  
	};  

	if(_exit) exitWith {  
		deleteVehicle _lightInt1;   
		deleteVehicle _lightInt2;  
		deleteVehicle _lightInt3;  
		deleteVehicle _lightInt4;  
		deleteVehicle _lightInt5;  

		deleteVehicle _lightExt1;   
		deleteVehicle _lightExt2;  
		deleteVehicle _lightExt3;  
		deleteVehicle _lightExt4;  
		deleteVehicle _lightExt5;		  
	};  

	_lightInt1 setLightColor [255,255,255];  
	_lightInt1 setLightAmbient [1,1,0.2];  
	_lightInt1 setLightAttenuation [1,0,0,0];  
	_lightInt1 setLightIntensity 1;  
	_lightInt1 setLightUseFlare true;  
	_lightInt1 setLightFlareSize 0.1;  
	_lightInt1 setLightFlareMaxDistance 50;  
	_house setVariable["lightInt1",_lightInt1];  

	_lightInt2 setLightColor [255,255,255];  
	_lightInt2 setLightAmbient [1,1,0.2];  
	_lightInt2 setLightAttenuation [1,0,0,0];  
	_lightInt2 setLightIntensity 1;  
	_lightInt2 setLightUseFlare true;  
	_lightInt2 setLightFlareSize 0.1;  
	_lightInt2 setLightFlareMaxDistance 50;  
	_house setVariable["lightInt2",_lightInt2];  

	_lightInt3 setLightColor [255,255,255];  
	_lightInt3 setLightAmbient [1,1,0.2];  
	_lightInt3 setLightAttenuation [1,0,0,0];  
	_lightInt3 setLightIntensity 1;  
	_lightInt3 setLightUseFlare true;  
	_lightInt3 setLightFlareSize 0.1;  
	_lightInt3 setLightFlareMaxDistance 50;  
	_house setVariable["lightInt3",_lightInt3];  

	_lightInt4 setLightColor [255,255,255];  
	_lightInt4 setLightAmbient [1,1,0.2];  
	_lightInt4 setLightAttenuation [1,0,0,0];  
	_lightInt4 setLightIntensity 1;  
	_lightInt4 setLightUseFlare true;  
	_lightInt4 setLightFlareSize 0.1;  
	_lightInt4 setLightFlareMaxDistance 50;  
	_house setVariable["lightInt4",_lightInt4];	  

	_lightInt5 setLightColor [255,255,255];  
	_lightInt5 setLightAmbient [1,1,0.2];  
	_lightInt5 setLightAttenuation [1,0,0,0];  
	_lightInt5 setLightIntensity 1;  
	_lightInt5 setLightUseFlare true;  
	_lightInt5 setLightFlareSize 0.1;  
	_lightInt5 setLightFlareMaxDistance 50;  
	_house setVariable["lightInt5",_lightInt5];	  

	_lightExt1 setLightColor [255,255,255];  
	_lightExt1 setLightAmbient [1,1,0.2];  
	_lightExt1 setLightAttenuation [1,0,0,0];  
	_lightExt1 setLightIntensity 0.5;  
	_lightExt1 setLightUseFlare false;  
	_lightExt1 setLightFlareSize 0.1;  
	_lightExt1 setLightFlareMaxDistance 50;  
	_house setVariable["lightExt1",_lightExt1];  

	_lightExt2 setLightColor [255,255,255];  
	_lightExt2 setLightAmbient [1,1,0.2];  
	_lightExt2 setLightAttenuation [1,0,0,0];  
	_lightExt2 setLightIntensity 0.5;  
	_lightExt2 setLightUseFlare false;  
	_lightExt2 setLightFlareSize 0.1;  
	_lightExt2 setLightFlareMaxDistance 50;  
	_house setVariable["lightExt2",_lightExt2];  

	_lightExt3 setLightColor [255,255,255];  
	_lightExt3 setLightAmbient [1,1,0.2];  
	_lightExt3 setLightAttenuation [1,0,0,0];  
	_lightExt3 setLightIntensity 0.5;  
	_lightExt3 setLightUseFlare false;  
	_lightExt3 setLightFlareSize 0.1;  
	_lightExt3 setLightFlareMaxDistance 50;  
	_house setVariable["lightExt3",_lightExt3];  

	_lightExt4 setLightColor [255,255,255];  
	_lightExt4 setLightAmbient [1,1,0.2];  
	_lightExt4 setLightAttenuation [1,0,0,0];  
	_lightExt4 setLightIntensity 0.5;  
	_lightExt4 setLightUseFlare false;  
	_lightExt4 setLightFlareSize 0.1;  
	_lightExt4 setLightFlareMaxDistance 50;  
	_house setVariable["lightExt4",_lightExt4];  

	_lightExt5 setLightColor [255,255,255];  
	_lightExt5 setLightAmbient [1,1,0.2];  
	_lightExt5 setLightAttenuation [1,0,0,0];  
	_lightExt5 setLightIntensity 0.5;  
	_lightExt5 setLightUseFlare false;  
	_lightExt5 setLightFlareSize 0.1;  
	_lightExt5 setLightFlareMaxDistance 50;  
	_house setVariable["lightExt5",_lightExt5];	  
} else {  
	if(isNull (_house getVariable["lightInt1",ObjNull])) exitWith {};  
	if(isNull (_house getVariable["lightInt2",ObjNull])) exitWith {};  
	if(isNull (_house getVariable["lightInt3",ObjNull])) exitWith {};  
	if(isNull (_house getVariable["lightInt4",ObjNull])) exitWith {};  
	if(isNull (_house getVariable["lightInt5",ObjNull])) exitWith {};  

	if(isNull (_house getVariable["lightExt1",ObjNull])) exitWith {};  
	if(isNull (_house getVariable["lightExt2",ObjNull])) exitWith {};  
	if(isNull (_house getVariable["lightExt3",ObjNull])) exitWith {};  
	if(isNull (_house getVariable["lightExt4",ObjNull])) exitWith {};  
	if(isNull (_house getVariable["lightExt5",ObjNull])) exitWith {};	  

	deleteVehicle (_house getVariable["lightInt1",ObjNull]);  
	deleteVehicle (_house getVariable["lightInt2",ObjNull]);  
	deleteVehicle (_house getVariable["lightInt3",ObjNull]);  
	deleteVehicle (_house getVariable["lightInt4",ObjNull]);  
	deleteVehicle (_house getVariable["lightInt5",ObjNull]);  

	deleteVehicle (_house getVariable["lightExt1",ObjNull]);  
	deleteVehicle (_house getVariable["lightExt2",ObjNull]);  
	deleteVehicle (_house getVariable["lightExt3",ObjNull]);  
	deleteVehicle (_house getVariable["lightExt4",ObjNull]);  
	deleteVehicle (_house getVariable["lightExt5",ObjNull]);	  
};  

Faut pas oublier de modifier le fn_houseMenu & fn_lightHouseAction pour les éclairages supplémentaire sinon elles seront pas reconnues et sera pas exécuté.

Au lieu d’avoir un vieille lumière pour chaque maison l’éclairage est celle d’un néon peut comporter jusqu’à 7 lumières pour une maison (5 Extérieur + 2 intérieur) exemple.

Je publierais mon travaille quand j’aurais terminé, il y aura près de 20 maison/batiments achetable …

= Cordialement =


#9

Che Guevara

Un truc qui marche pour une fois ?


#10

Che Guevara

Un truc qui marche pour une fois ?

https://www.youtube.com/watch?v=rAUE0-n1Qys

harmdhast

Édité, je me lancerais pas dans des gamineries.


#11

Che Guevara

Noooooo.

Seriously ?


#12

Che Guevara

Noooooo.

Seriously ?

inb4ban forum …


#13

24 maisons/bâtiments achetable avec light personnalisé, script quasiment terminé.

Il me reste qu’à réglé la restriction de position des conteneurs dans chaque maison.

Je poste ça dans quelques heures.


#14

Beau boulot :slight_smile:


#15

Boulot juste magnifique, manque plus que tu fasses le tuto :slight_smile:


#16

Salut l’ami, le tutoriel complet serra disponible vers quand ? :slight_smile:


#17

Le tuto était supposé d’être prêt voilà quelques heures.

Problème avec ma version RC … des $any partout avec des erreurs de life_atmbank après un update bizarre.

J’attends que la version officiel d’Apex soit dispo en update pour tout vérifier ça.

Ensuite je ferais le tuto.

EDIT: C’est mes fichiers qui étaient corrompus car quand je code j’écris plein de commentaires. :smiley:

Je revise tout ça et je poste.


#18

Bon boulot mec!


#20

3 ANNÉES PLUS TARD …

Merci de recrée un post…


#21

SI tu est le @Rosil au quel je pense, rien d etonnant que tu nous face de multiple deterrage … 3 ans de tentative d ouverture de server et tu ne sais toujours rien faire.