Problème avec le Téléphone Physique en 3.1.3


#1

Bonjour, j’ai installer le Téléphone Physique disponible sur AltisDev.

Je ne peut pas acceder au lobby

Mes fichiers:

Functions.h

Citation

class Player_Menu

{
file = “core\pmenu”;
class wantedList {};
class wantedInfo {};
class wantedMenu {};
class pardon {};
class giveItem {};
class giveMoney {};
class p_openMenu {};
class p_updateMenu {};
class removeItem {};
class useItem {};
class cellphone {};
class keyMenu {};
class keyGive {};
class keyDrop {};
class s_onSliderChange {};
class updateViewDistance {};
class settingsMenu {};
class settingsInit {};
class cellphone2 {};
};

Player.inv

Citation

class ButtonCell : Life_RscButtonMenu {

       idc = 2014;  
       text = "$STR_PM_CellPhone";  
       onButtonClick = "[] call life_fnc_cellphone2;"; //CHANGE the old line by this  
       x = 0.42 + (6.25 / 19.8) + (1 / 250 / (safezoneW / safezoneH));  
       y = 0.8 - (1 / 25);  
       w = (6.25 / 40);  
       h = (1 / 25);  
    };  

};
};

KeyHandler

Citation

//Knock out, this is experimental and yeah…

case 34:  
{  
    if(_shift) then {_handled = true;};  
    if(_shift && playerSide == civilian && !isNull cursorTarget && cursorTarget isKindOf "Man" && isPlayer cursorTarget && alive cursorTarget && cursorTarget distance player < 4 && speed cursorTarget < 1) then  
    {  
    if((animationState cursorTarget) != "Incapacitated" && (currentWeapon player == primaryWeapon player OR currentWeapon player == handgunWeapon player) && currentWeapon player != "" && !life_knockout && !(player getVariable["restrained",false]) && !life_istazed) then  
    {  
    [cursorTarget] spawn life_fnc_knockoutAction;  
    if("ItemRadio" in assignedItems cursorTarget) then {  
    cursorTarget removeweapon "ItemRadio";  
    hint "The cellphone of the person was placed on the ground.";  
    _defenceplace1 = "Item_ItemRadio" createVehicle (player modelToWorld[0,0,0]);}  
    else { hint "The person that you knock out have no cellphone!"};  
    };  
};  

};

weaponshop

Citation

case (GETC(life_donator) >= 3):

{
[“STS Donator Shop Tier 3”,
[
[“hgun_Rook40_F”,nil,500],
[“hgun_PDW2000_F”,nil,6500],
[“hgun_pistol_heavy_01_F”,nil,5850],
[“arifle_Mk20C_plain_F”,nil,25000],
[“optic_ACO_grn_smg”,nil,750],
[“optic_MRCO”,nil,10000],
[“NVGoggles”,nil,350],
[“ToolKit”,nil,50],
[“itemgps”,nil,50],
[“FirstAidKit”,nil,25],
[“16Rnd_9x21_Mag”,nil,25],
[“30Rnd_9x21_Mag”,nil,75],
[“11Rnd_45ACP_Mag”,nil,85],
[“30Rnd_556x45_Stanag”,nil,125]
]
];
};
};
};

case “genstore”:
{
[“Altis General Store”,
[
[“Binocular”,nil,150],
[“ItemGPS”,nil,100],
[“ToolKit”,nil,250],
[“FirstAidKit”,nil,150],
[“NVGoggles”,nil,2000],
[“Chemlight_red”,nil,300],
[“Chemlight_yellow”,nil,300],
[“Chemlight_green”,nil,300],
[“Chemlight_blue”,nil,300],
[“ItemRadio”,“Telephone”,500]
]
];
};
};

CopDefault

Citation

//Load player with default cop gear.

player addUniform “U_Rangemaster”;
player addVest “V_Rangemaster_belt”;
player addMagazine “DDOPP_1Rnd_X26”;
player addMagazine “DDOPP_1Rnd_X26”;
player addMagazine “DDOPP_1Rnd_X26”;
player addMagazine “DDOPP_1Rnd_X26”;
player addWeapon “DDOPP_X26”;
player addItem “ItemMap”;
player assignItem “ItemMap”;
player addItem “ItemCompass”;
player assignItem “ItemCompass”;
player addItem “ItemRadio”;
player assignItem “ItemRadio”;

MedicLaoudat

Citation

*/

removeAllContainers player;
removeAllWeapons player;
player addUniform “U_Rangemaster”;
player addItem “FirstAidKit”;
player addItem “FirstAidKit”;
player addItem “FirstAidKit”;
player addItem “FirstAidKit”;
player addItem “FirstAidKit”;
player addItem “ItemRadio”;
player assignItem “ItemRadio”;
removeGoggles player;
removeHeadGear player;
if(hmd player != “”) then {
player unlinkItem (hmd player);
};

player setObjectTextureGlobal [0,“textures\medic_uniform.jpg”];


#2

Up


#3

Dans players_inv.hpp

class ButtonCell : Life_RscButtonMenu {  
           idc = 2014;  
           text = "$STR_PM_CellPhone";  
           onButtonClick = "[] call life_fnc_cellphone2;"; //CHANGE the old line by this  
           x = 0.42 + (6.25 / 19.8) + (1 / 250 / (safezoneW / safezoneH));  
           y = 0.8 - (1 / 25);  
           w = (6.25 / 40);  
           h = (1 / 25);  
        };  
};```

#4

Merci, je vais essayer ça! N1colas