[Fini]Verrou par Side
[Fini]Verrou par Side
Exemple avec le sas Prison:
dans lifeserver.pbo/init.sqf
Inserer :
Ce code va de paire avec les deux garages formant le sas à la prison.
dans lifeserver.pbo/init.sqf
Inserer :
- Code:
/*SAS Prison*/
private["_sasa","_sasb"];
_sasa = nearestObject [[2319.4,13178.1,0],"Land_i_Garage_V1_F"];
_sasb = nearestObject [[2323.4,13173.3,0],"Land_i_Garage_V1_F"];
_sasa setVariable["bis_disabled_Door_1",1,true];
_sasa allowDamage false;
_sasb setVariable["bis_disabled_Door_1",1,true];
_sasb allowDamage false;
Ce code va de paire avec les deux garages formant le sas à la prison.
Dernière édition par Slift le Jeu 23 Mar - 2:42, édité 1 fois
Slift- Messages : 143
Date d'inscription : 28/01/2017
Age : 37
Localisation : Bordeaux
Fiche RP
Prénom/Nom : *****
Profession:
Grade: *****
Re: [Fini]Verrou par Side
dans mpmission/core/functions/fn_keyHandler.sqf
Revoir la touche U de cette maniere :
Revoir la touche U de cette maniere :
- Code:
///U Key
case 22:
{
if(!_alt && !_ctrlKey) then {
if(vehicle player == player) then {
_veh = cursorTarget;
if (playerSide == west)then {
if((_veh == JailSasA) || (_veh == JailSasB))then {
_verrou=_veh getVariable "bis_disabled_Door_1";
if(!isNil"_verrou")then {
if(_verrou == 1)then {
_veh setVariable["bis_disabled_Door_1",0,true];
hintSilent parseText format["SAS Prison:<t color='#ff0000'><br/>Ouvert</t>", 12];
player say3D "HintSound";
}else{
_veh setVariable["bis_disabled_Door_1",1,true];
hintSilent parseText format["SAS Prison:<t color='#00ff21'><br/>Fermé</t>", 12];
player say3D "HintSound";
};
};
};
};
} else {
_veh = vehicle player;
};
if(_veh isKindOf "House_F" && {playerSide == civilian}) then {
if(_veh in life_vehicles && player distance _veh < 17) then {
_door = [_veh] call life_fnc_nearestDoor;
if(EQUAL(_door,0)) exitWith {hint localize "STR_House_Door_NotNear"};
_locked = _veh GVAR [format["bis_disabled_Door_%1",_door],0];
if(EQUAL(_locked,0)) then {
_veh SVAR [format["bis_disabled_Door_%1",_door],1,true];
_veh animate [format["door_%1_rot",_door],0];
systemChat localize "STR_House_Door_Lock";
} else {
_veh SVAR [format["bis_disabled_Door_%1",_door],0,true];
_veh animate [format["door_%1_rot",_door],1];
systemChat localize "STR_House_Door_Unlock";
};
};
} else {
_locked = locked _veh;
if(_veh in life_vehicles && player distance _veh < 17) then {
if(EQUAL(_locked,2)) then {
if(local _veh) then {
_veh lock 0;
} else {
[_veh,0] remoteExecCall ["life_fnc_lockVehicle",_veh];
};
hintSilent parseText format["Véhicule:<t color='#ff0000'><br/>Déverrouillé</t>", 12];
player say3D "car_unlock";
} else {
if(local _veh) then {
_veh lock 2;
} else {
[_veh,2] remoteExecCall ["life_fnc_lockVehicle",_veh];
};
hintSilent parseText format["Véhicule:<t color='#00ff21'><br/>Verrouillé</t>", 12];
player say3D "car_lock";
};
};
};
};
};
Slift- Messages : 143
Date d'inscription : 28/01/2017
Age : 37
Localisation : Bordeaux
Fiche RP
Prénom/Nom : *****
Profession:
Grade: *****
Sujets similaires
» [Fini]Son Hint
» [Fini]Save Position 4.4
» [Fini]Correctif Channels
» [Fini] Modification Prison
» [Fini] Boules Quies
» [Fini]Save Position 4.4
» [Fini]Correctif Channels
» [Fini] Modification Prison
» [Fini] Boules Quies
|
|