• Pouvoir envoyer des messages aux Taxis, Dépanneurs...


    Hello !

    J’aimerais ajouté la possibilité d’envoyer des messages à mes Taxi et à mes Dépanneurs qui ont une licence…

    Mais le problème c’est que je ne sais pas comment m’y prendre… J’ai déjà fait des recherches sur Altisdev et Altisliferpg en tapant “phone ou telephone” en cherchant dans toutes les pages mais rien…

    Je me lance donc dans la création de ce sujet :P

    Quelqu’un aurait un tutoriel ou encore des explications pour ajouté la possibilité d’envoyers des messages aux personnes ayant une certaine licence?

    Merci d’avance,

    PS: Je suis en 3.1.4.8

  • Salut.

    Les licences sont des variables locales. Tu dois donc envoyer le message à tous les joueurs, et ne l’afficher que chez les personnes qui ont la licence.

  • @Joker Mais tout ce passe dans le @LifeByEpsyth_server non? Mise à part pour ajouter les bouttons dans le téléphone…

    par exemple:

    life_fnc_sidechat =

    compileFinal "

    if(life_sidechat) then {life_sidechat = false;} else {life_sidechat = true;};

    [[player,life_sidechat,playerSide],"“TON_fnc_managesc”",false,false] spawn life_fnc_MP;

    [] call life_fnc_settingsMenu;

    ";

    publicVariable “life_fnc_sidechat”;

    TON_fnc_index =

    compileFinal "

    private[""_item"",""_stack""];

    _item = _this select 0;

    _stack = _this select 1;

    _return = -1;

    {

    if(_item in _x) exitWith {

    _return = _forEachIndex;

    };

    } foreach _stack;

    _return;

    ";

    TON_fnc_player_query =

    compileFinal "

    private[""_ret""];

    _ret = _this select 0;

    if(isNull _ret) exitWith {};

    if(isNil “”_ret"") exitWith {};

    [[life_atmcash,life_cash,owner player,player],"“life_fnc_admininfo”",_ret,false] spawn life_fnc_MP;

    ";

    publicVariable “TON_fnc_player_query”;

    publicVariable “TON_fnc_index”;

    TON_fnc_clientWireTransfer =

    compileFinal "

    private[""_unit"",""_val"",""_from""];

    _val = _this select 0;

    _from = _this select 1;

    if(!([str(_val)] call TON_fnc_isnumber)) exitWith {};

    if(_from == “”"") exitWith {};

    life_atmcash = life_atmcash + _val;

    hint format[""%1 has wire transferred $%2 to you."",_from,[_val] call life_fnc_numberText];

    ";

    publicVariable “TON_fnc_clientWireTransfer”;

    TON_fnc_isnumber =

    compileFinal "

    private[""_valid"",""_value"",""_compare""];

    _value = _this select 0;

    _valid = ["“0"”,"“1"”,"“2"”,"“3"”,"“4"”,"“5"”,"“6"”,"“7"”,"“8"”,"“9"”];

    _array = [_value] call KRON_StrToArray;

    _return = true;

    {

    if(_x in _valid) then

    {}

    else

    {

    _return = false;

    };

    } foreach _array;

    _return;

    ";

    publicVariable “TON_fnc_isnumber”;

    TON_fnc_clientGangKick =

    compileFinal "

    private[""_unit"",""_group""];

    _unit = _this select 0;

    _group = _this select 1;

    if(isNil “”_unit"" OR isNil “”_group"") exitWith {};

    if(player == _unit && (group player) == _group) then

    {

    life_my_gang = ObjNull;

    [player] joinSilent (createGroup civilian);

    hint ““You have been kicked out of the gang.””;

    };

    ";

    publicVariable “TON_fnc_clientGangKick”;

    TON_fnc_clientGetKey =

    compileFinal "

    private[""_vehicle"",""_unit"",""_giver""];

    _vehicle = _this select 0;

    _unit = _this select 1;

    _giver = _this select 2;

    if(isNil “”_unit"" OR isNil “”_giver"") exitWith {};

    if(player == _unit && !(_vehicle in life_vehicles)) then

    {

    _name = getText(configFile >> ““CfgVehicles”” >> (typeOf _vehicle) >> ““displayName””);

    hint format[""%1 has gave you keys for a %2"",_giver,_name];

    life_vehicles pushBack _vehicle;

    [[getPlayerUID player,playerSide,_vehicle,1],"“TON_fnc_keyManagement”",false,false] spawn life_fnc_MP;

    };

    ";

    publicVariable “TON_fnc_clientGetKey”;

    TON_fnc_clientGangLeader =

    compileFinal "

    private[""_unit"",""_group""];

    _unit = _this select 0;

    _group = _this select 1;

    if(isNil “”_unit"" OR isNil “”_group"") exitWith {};

    if(player == _unit && (group player) == _group) then

    {

    player setRank ““COLONEL””;

    _group selectLeader _unit;

    hint ““You have been made the new leader.””;

    };

    ";

    publicVariable “TON_fnc_clientGangLeader”;

    //Cell Phone Messaging

    /*

    -fnc_cell_textmsg

    -fnc_cell_textcop

    -fnc_cell_textadmin

    -fnc_cell_adminmsg

    -fnc_cell_adminmsgall

    */

    //To EMS

    TON_fnc_cell_emsrequest =

    compileFinal "

    private[""_msg"",""_to""];

    ctrlShow[3022,false];

    _msg = ctrlText 3003;

    _to = ““Paramedic””;

    if(_msg == “”"") exitWith {hint ““You must enter a message to send!””;ctrlShow[3022,true];};

    [[_msg,name player,5],"“TON_fnc_clientMessage”",independent,false] spawn life_fnc_MP;

    [] call life_fnc_cellphone;

    hint format["“You have sent a message to all EMS Units.”",_to,_msg];

    ctrlShow[3022,true];

    ";

    //To One Person

    TON_fnc_cell_textmsg =

    compileFinal "

    private[""_msg"",""_to""];

    ctrlShow[3015,false];

    _msg = ctrlText 3003;

    if(lbCurSel 3004 == -1) exitWith {hint ““You must select a player you are sending the text to!””; ctrlShow[3015,true];};

    _to = call compile format[""%1"",(lbData[3004,(lbCurSel 3004)])];

    if(isNull _to) exitWith {ctrlShow[3015,true];};

    if(isNil “”_to"") exitWith {ctrlShow[3015,true];};

    if(_msg == “”"") exitWith {hint ““You must enter a message to send!””;ctrlShow[3015,true];};

    [[_msg,name player,0],"“TON_fnc_clientMessage”",_to,false] spawn life_fnc_MP;

    [] call life_fnc_cellphone;

    hint format["“Message Reçu: %1 vous à envoyer: %2"”,name _to,_msg];

    ctrlShow[3015,true];

    ";

    //To All Cops

    TON_fnc_cell_textcop =

    compileFinal "

    private[""_msg"",""_to""];

    ctrlShow[3016,false];

    _msg = ctrlText 3003;

    _to = ““Police””;

    if(_msg == “”"") exitWith {hint ““You must enter a message to send!””;ctrlShow[3016,true];};

    [[_msg,name player,1],"“TON_fnc_clientMessage”",true,false] spawn life_fnc_MP;

    [] call life_fnc_cellphone;

    hint format["“You sent %1 a message: %2"”,_to,_msg];

    ctrlShow[3016,true];

    ";

    //To All Admins

    TON_fnc_cell_textadmin =

    compileFinal "

    private[""_msg"",""_to"",""_from""];

    ctrlShow[3017,false];

    _msg = ctrlText 3003;

    _to = ““Admin””;

    if(_msg == “”"") exitWith {hint ““You must enter a message to send!””;ctrlShow[3017,true];};

    [[_msg,name player,2],"“TON_fnc_clientMessage”",true,false] spawn life_fnc_MP;

    [] call life_fnc_cellphone;

    hint format["“You sent %1 a message: %2"”,_to,_msg];

    ctrlShow[3017,true];

    ";

    //Admin To One Person

    TON_fnc_cell_adminmsg =

    compileFinal "

    if(isServer) exitWith {};

    if((call life_adminlevel) < 1) exitWith {hint ““You are not an admin!””;};

    private[""_msg"",""_to""];

    _msg = ctrlText 3003;

    _to = call compile format[""%1"",(lbData[3004,(lbCurSel 3004)])];

    if(isNull _to) exitWith {};

    if(_msg == “”"") exitWith {hint ““You must enter a message to send!””;};

    [[_msg,name player,3],"“TON_fnc_clientMessage”",_to,false] spawn life_fnc_MP;

    [] call life_fnc_cellphone;

    hint format["“Message d’un Modo Reçu: %1 - Message: %2"”,name _to,_msg];

    ";

    TON_fnc_cell_adminmsgall =

    compileFinal "

    if(isServer) exitWith {};

    if((call life_adminlevel) < 1) exitWith {hint ““You are not an admin!””;};

    private[""_msg"",""_from""];

    _msg = ctrlText 3003;

    if(_msg == “”"") exitWith {hint ““You must enter a message to send!””;};

    [[_msg,name player,4],"“TON_fnc_clientMessage”",true,false] spawn life_fnc_MP;

    [] call life_fnc_cellphone;

    hint format["“Message du Staff: %1"”,_msg];

    ";

    //To all for a Server Event

    TON_fnc_cell_serverMessageall =

    compileFinal "

    if(isServer) exitWith {};

    if((call life_adminlevel) < 1) exitWith {hint ““You are not an Admin!””;};

    private[""_msg"",""_from""];

    _msg = ctrlText 3003;

    if(_msg == “”"") exitWith {hint ““You must enter a message to send!””;};

    [[_msg,name player,7],"“TON_fnc_clientMessage”",true,false] spawn life_fnc_MP;

    [] call life_fnc_cellphone;

    hint format["“Message Evènement: %1"”,_msg];

    ";

    publicVariable “TON_fnc_cell_textmsg”;

    publicVariable “TON_fnc_cell_textcop”;

    publicVariable “TON_fnc_cell_textadmin”;

    publicVariable “TON_fnc_cell_adminmsg”;

    publicVariable “TON_fnc_cell_adminmsgall”;

    publicVariable “TON_fnc_cell_emsrequest”;

    publicVariable “TON_fnc_cell_serverMessageall”;

    //Client Message

    /*

    0 = private message

    1 = police message

    2 = message to admin

    3 = message from admin

    4 = admin message to all

    */

    TON_fnc_clientMessage =

    compileFinal "

    if(isServer) exitWith {};

    private[""_msg"",""_from"", “”_type""];

    _msg = _this select 0;

    _from = _this select 1;

    _type = _this select 2;

    if(_from == “”"") exitWith {};

    switch (_type) do

    {

    case 0 :

    {

    private[""_message""];

    _message = format["">>>MESSAGE DE %1: %2"",_from,_msg];

    hint parseText format [""<t color=’#FFCC00’><t size=‘2’><t align=‘center’>Nouveau Message<br/><br/><t color=’#33CC33’><t align=‘left’><t size=‘1’>A: <t color=’#ffffff’>Toi<br/><t color=’#33CC33’>De: <t color=’#ffffff’>%1<br/><br/><t color=’#33CC33’>Message:<br/><t color=’#ffffff’>%2"",_from,_msg];

    ["“TextMessage”",[format["“Vous avez reçu un SMS de %1"”,_from]]] call bis_fnc_showNotification;

    systemChat _message;

    };

    case 1 :

    {

    if(side player != west) exitWith {};

    private[""_message""];

    _message = format[""–-APPEL %1: %2"",_from,_msg];

    hint parseText format [""<t color=’#316dff’><t size=‘2’><t align=‘center’>APPEL A LA POLICE<br/><br/><t color=’#33CC33’><t align=‘left’><t size=‘1’>A: <t color=’#ffffff’>Tous les officiers<br/><t color=’#33CC33’>De: <t color=’#ffffff’>%1<br/><br/><t color=’#33CC33’>Message:<br/><t color=’#ffffff’>%2"",_from,_msg];

    ["“PoliceDispatch”",[format["“Un nouvelle appel de %1"”,_from]]] call bis_fnc_showNotification;

    systemChat _message;

    };

    case 2 :

    {

    if((call life_adminlevel) < 1) exitWith {};

    private[""_message""];

    _message = format[""???DEMANDE D’AIDE %1: %2"",_from,_msg];

    hint parseText format [""<t color=’#ffcefe’><t size=‘2’><t align=‘center’>Demande d’aide<br/><br/><t color=’#33CC33’><t align=‘left’><t size=‘1’>A: <t color=’#ffffff’>Administrateur / Modérateur<br/><t color=’#33CC33’>De: <t color=’#ffffff’>%1<br/><br/><t color=’#33CC33’>Message:<br/><t color=’#ffffff’>%2"",_from,_msg];

    ["“AdminDispatch”",[format[""%1 a envoyer une demande!"",_from]]] call bis_fnc_showNotification;

    systemChat _message;

    };

    case 3 :

    {

    private[""_message""];

    _message = format[""!!!MESSAGE MODO: %1"",_msg];

    _admin = format["“Sent by admin: %1"”, _from];

    hint parseText format [""<t color=’#FF0000’><t size=‘2’><t align=‘center’>MESSAGE MODO<br/><br/><t color=’#33CC33’><t align=‘left’><t size=‘1’>A: <t color=’#ffffff’>Toi<br/><t color=’#33CC33’>De: <t color=’#ffffff’>Administrateur / Moderateur<br/><br/><t color=’#33CC33’>Message:<br/><t color=’#ffffff’>%1"",_msg];

    ["“AdminMessage”",["“Vous avez reçu un Message des Modo”"]] call bis_fnc_showNotification;

    systemChat _message;

    if((call life_adminlevel) > 0) then {systemChat _admin;};

    };

    case 4 :

    {

    private[""_message"",""_admin""];

    _message = format[""!!!MESSAGE ADMIN: %1"",_msg];

    _admin = format["“Sent by admin: %1"”, _from];

    hint parseText format [""<t color=’#FF0000’><t size=‘2’><t align=‘center’>MESSAGE ADMIN<br/><br/><t color=’#33CC33’><t align=‘left’><t size=‘1’>A: <t color=’#ffffff’>Tous les joueurs<br/><t color=’#33CC33’>De: <t color=’#ffffff’>Administrateur<br/><br/><t color=’#33CC33’>Message:<br/><t color=’#ffffff’>%1"",_msg];

    ["“AdminMessage”",["“Vous avez reçu un Message des Admins”"]] call bis_fnc_showNotification;

    systemChat _message;

    if((call life_adminlevel) > 0) then {systemChat _admin;};

    };

    case 5: {

    private[""_message""];

    _message = format[""!!!Paramedic Appel: %1"",_msg];

    hint parseText format [""<t color=’#FFCC00’><t size=‘2’><t align=‘center’>Paramedic Appel<br/><br/><t color=’#33CC33’><t align=‘left’><t size=‘1’>De: <t color=’#ffffff’>Toi<br/><t color=’#33CC33’>De: <t color=’#ffffff’>%1<br/><br/><t color=’#33CC33’>Message:<br/><t color=’#ffffff’>%2"",_from,_msg];

    ["“TextMessage”",[format["“EMS Request from %1"”,_from]]] call bis_fnc_showNotification;

    };

    case 6 :

    {

    private[""_message"",""_admin""];

    _message = format["“EVENEMENT: %1"”,_msg];

    _admin = format["“Sent by admin: %1"”, _from];

    hint parseText format [""<t color=’#A00ED0’><t size=‘2’><t align=‘center’>EVENEMENT<br/><br/><t color=’#33CC33’><t align=‘left’><t size=‘1’>A: <t color=’#ffffff’>Tous les joueurs<br/><t color=’#33CC33’>De: <t color=’#ffffff’>Administrateur<br/><br/><t color=’#33CC33’>Message:<br/><t color=’#ffffff’>%1"",_msg];

    ["“AdminMessage”",["“Vous avez reçu un message d’un evenement”"]] call bis_fnc_showNotification;

    systemChat _message;

    if((call life_adminlevel) > 1) then {systemChat _admin;};

    };

    };

    ";

    publicVariable “TON_fnc_clientMessage”;

    si j’ajoute les messages à envoyer aux dépanneur ça donnera ça:

    case 7 :

    {

    private[""_message""];

    _message = format[""!!!MESSAGE DEPANNEUR: %1"",_msg];

    hint parseText format [""<t color=’#FF0000’><t size=‘2’><t align=‘center’>MESSAGE DEPANNEUR<br/><br/><t color=’#33CC33’><t align=‘left’><t size=‘1’>A: <t color=’#ffffff’>Toi<br/><t color=’#33CC33’>De: <t color=’#ffffff’>Civil/Policier<br/><br/><t       color=’#33CC33’>Message:<br/><t color=’#ffffff’>%1"",_msg];

    ["“DepanneurMessage”",["“Vous avez reçu un Message”"]] call bis_fnc_showNotification;

    systemChat _message;

    if((call life_depanneur) > 0) then {

    };

  • Quand j’utilisais le téléphone de base j’avais ça :

    case 7 :  
    {  
    if(!license_civ_dep) exitWith {};  
    private[""_message""];  
    _message = format[""???DEMANDE DEPANNEUSE DE %1: %2"",_from,_msg];  
    hint parseText format [""<t color='#ffcefe'><t size='2'><t align='center'>Demande Dépanneuse<br/><br/><t color='#33CC33'><t align='left'><t size='1'>A : <t color='#ffffff'>Dépanneurs<br/><t color='#33CC33'>De : <t color='#ffffff'>%1<br/><br/><t color='#33CC33'>Message:<br/><t color='#ffffff'>%2"",_from,_msg];  
    
    [""DepDispatch"",[format[""%1 Demande une dépanneuse!"",_from]]] call bis_fnc_showNotification;  
    systemChat _message;  
    };  
    
  • @Joker Ah d’accord je test ca des demain mais il n’y a rien a faire d’autre? Mise a part ajouter le boutton dans le cellphone.hpp

  • //Message aux Dépanneurs  
    TON_fnc_cell_deprequest =  
    compileFinal "  
    	private[""_msg"",""_to"",""_from""];  
    	ctrlShow[3024,false];  
    	_msg = ctrlText 3003;  
    	_to = ""Dépanneurs"";  
    	if(_msg == """") exitWith {hint ""Vous devez écrire un message!"";ctrlShow[3024,true];};  
    
    	[[_msg,name player,7],""TON_fnc_clientMessage"",true,false] spawn life_fnc_MP;  
    	[] call life_fnc_cellphone;  
    	hint format[""Envoi à %1 , Message: %2"",_to,_msg];  
    	ctrlShow[3024,true];  
    ";  
    
    publicVariable "TON_fnc_cell_deprequest";  
    
    

    bien sur tu remplaces avec tes propres id de bouton

  • @Joker Oui, oui, je remplacerais le nom de la licence aussi :P merci beaucoup, je te dirait si j’ai réussi ou non demain …

  • Sinon tu oublies le système de base et tu passes un week end à faire un truc plus badass

    !kAgBYYt.jpg>!

    ^_^

  • Omg x’) je ne sais meme pas faire un système pour que une personne est un Numéro de téléphone et quelle puisse envoyer des messages qu’a ces contactes quelle a ajouté… Et tu me montre ça :D @Joker

  • J’ai un petit problème j’ai voulu faire en sorte à ce que mes taxi recoivent les messages qu’on leurs envoie mais c’est les dépanneurs qui les recoivent…

    Voici mon functions.sqf

    life_fnc_sidechat =

    compileFinal "

    if(life_sidechat) then {life_sidechat = false;} else {life_sidechat = true;};

    [[player,life_sidechat,playerSide],"“TON_fnc_managesc”",false,false] spawn life_fnc_MP;

    [] call life_fnc_settingsMenu;

    ";

    publicVariable “life_fnc_sidechat”;

    TON_fnc_index =

    compileFinal "

    private[""_item"",""_stack""];

    _item = _this select 0;

    _stack = _this select 1;

    _return = -1;

    {

    if(_item in _x) exitWith {

    _return = _forEachIndex;

    };

    } foreach _stack;

    _return;

    ";

    TON_fnc_player_query =

    compileFinal "

    private[""_ret""];

    _ret = _this select 0;

    if(isNull _ret) exitWith {};

    if(isNil “”_ret"") exitWith {};

    [[life_atmcash,life_cash,owner player,player],"“life_fnc_admininfo”",_ret,false] spawn life_fnc_MP;

    ";

    publicVariable “TON_fnc_player_query”;

    publicVariable “TON_fnc_index”;

    TON_fnc_clientWireTransfer =

    compileFinal "

    private[""_unit"",""_val"",""_from""];

    _val = _this select 0;

    _from = _this select 1;

    if(!([str(_val)] call TON_fnc_isnumber)) exitWith {};

    if(_from == “”"") exitWith {};

    life_atmcash = life_atmcash + _val;

    hint format[""%1 has wire transferred $%2 to you."",_from,[_val] call life_fnc_numberText];

    ";

    publicVariable “TON_fnc_clientWireTransfer”;

    TON_fnc_isnumber =

    compileFinal "

    private[""_valid"",""_value"",""_compare""];

    _value = _this select 0;

    _valid = ["“0"”,"“1"”,"“2"”,"“3"”,"“4"”,"“5"”,"“6"”,"“7"”,"“8"”,"“9"”];

    _array = [_value] call KRON_StrToArray;

    _return = true;

    {

    if(_x in _valid) then

    {}

    else

    {

    _return = false;

    };

    } foreach _array;

    _return;

    ";

    publicVariable “TON_fnc_isnumber”;

    TON_fnc_clientGangKick =

    compileFinal "

    private[""_unit"",""_group""];

    _unit = _this select 0;

    _group = _this select 1;

    if(isNil “”_unit"" OR isNil “”_group"") exitWith {};

    if(player == _unit && (group player) == _group) then

    {

    life_my_gang = ObjNull;

    [player] joinSilent (createGroup civilian);

    hint ““You have been kicked out of the gang.””;

    };

    ";

    publicVariable “TON_fnc_clientGangKick”;

    TON_fnc_clientGetKey =

    compileFinal "

    private[""_vehicle"",""_unit"",""_giver""];

    _vehicle = _this select 0;

    _unit = _this select 1;

    _giver = _this select 2;

    if(isNil “”_unit"" OR isNil “”_giver"") exitWith {};

    if(player == _unit && !(_vehicle in life_vehicles)) then

    {

    _name = getText(configFile >> ““CfgVehicles”” >> (typeOf _vehicle) >> ““displayName””);

    hint format[""%1 has gave you keys for a %2"",_giver,_name];

    life_vehicles pushBack _vehicle;

    [[getPlayerUID player,playerSide,_vehicle,1],"“TON_fnc_keyManagement”",false,false] spawn life_fnc_MP;

    };

    ";

    publicVariable “TON_fnc_clientGetKey”;

    TON_fnc_clientGangLeader =

    compileFinal "

    private[""_unit"",""_group""];

    _unit = _this select 0;

    _group = _this select 1;

    if(isNil “”_unit"" OR isNil “”_group"") exitWith {};

    if(player == _unit && (group player) == _group) then

    {

    player setRank ““COLONEL””;

    _group selectLeader _unit;

    hint ““You have been made the new leader.””;

    };

    ";

    publicVariable “TON_fnc_clientGangLeader”;

    //Cell Phone Messaging

    /*

    -fnc_cell_textmsg

    -fnc_cell_textcop

    -fnc_cell_textadmin

    -fnc_cell_adminmsg

    -fnc_cell_adminmsgall

    */

    //To EMS

    TON_fnc_cell_emsrequest =

    compileFinal "

    private[""_msg"",""_to""];

    ctrlShow[3022,false];

    _msg = ctrlText 3003;

    _to = ““Paramedic””;

    if(_msg == “”"") exitWith {hint ““You must enter a message to send!””;ctrlShow[3022,true];};

    [[_msg,name player,5],"“TON_fnc_clientMessage”",independent,false] spawn life_fnc_MP;

    [] call life_fnc_cellphone;

    hint format["“You have sent a message to all EMS Units.”",_to,_msg];

    ctrlShow[3022,true];

    ";

    //To One Person

    TON_fnc_cell_textmsg =

    compileFinal "

    private[""_msg"",""_to""];

    ctrlShow[3015,false];

    _msg = ctrlText 3003;

    if(lbCurSel 3004 == -1) exitWith {hint ““You must select a player you are sending the text to!””; ctrlShow[3015,true];};

    _to = call compile format[""%1"",(lbData[3004,(lbCurSel 3004)])];

    if(isNull _to) exitWith {ctrlShow[3015,true];};

    if(isNil “”_to"") exitWith {ctrlShow[3015,true];};

    if(_msg == “”"") exitWith {hint ““You must enter a message to send!””;ctrlShow[3015,true];};

    [[_msg,name player,0],"“TON_fnc_clientMessage”",_to,false] spawn life_fnc_MP;

    [] call life_fnc_cellphone;

    hint format["“Message Reçu: %1 vous à envoyer: %2"”,name _to,_msg];

    ctrlShow[3015,true];

    ";

    //To All Cops

    TON_fnc_cell_textcop =

    compileFinal "

    private[""_msg"",""_to""];

    ctrlShow[3016,false];

    _msg = ctrlText 3003;

    _to = ““Police””;

    if(_msg == “”"") exitWith {hint ““You must enter a message to send!””;ctrlShow[3016,true];};

    [[_msg,name player,1],"“TON_fnc_clientMessage”",true,false] spawn life_fnc_MP;

    [] call life_fnc_cellphone;

    hint format["“You sent %1 a message: %2"”,_to,_msg];

    ctrlShow[3016,true];

    ";

    //To All Admins

    TON_fnc_cell_textadmin =

    compileFinal "

    private[""_msg"",""_to"",""_from""];

    ctrlShow[3017,false];

    _msg = ctrlText 3003;

    _to = ““Admin””;

    if(_msg == “”"") exitWith {hint ““You must enter a message to send!””;ctrlShow[3017,true];};

    [[_msg,name player,2],"“TON_fnc_clientMessage”",true,false] spawn life_fnc_MP;

    [] call life_fnc_cellphone;

    hint format["“You sent %1 a message: %2"”,_to,_msg];

    ctrlShow[3017,true];

    ";

    //Admin To One Person

    TON_fnc_cell_adminmsg =

    compileFinal "

    if(isServer) exitWith {};

    if((call life_adminlevel) < 1) exitWith {hint ““You are not an admin!””;};

    private[""_msg"",""_to""];

    _msg = ctrlText 3003;

    _to = call compile format[""%1"",(lbData[3004,(lbCurSel 3004)])];

    if(isNull _to) exitWith {};

    if(_msg == “”"") exitWith {hint ““You must enter a message to send!””;};

    [[_msg,name player,3],"“TON_fnc_clientMessage”",_to,false] spawn life_fnc_MP;

    [] call life_fnc_cellphone;

    hint format["“Message d’un Modo Reçu: %1 - Message: %2"”,name _to,_msg];

    ";

    TON_fnc_cell_adminmsgall =

    compileFinal "

    if(isServer) exitWith {};

    if((call life_adminlevel) < 1) exitWith {hint ““You are not an admin!””;};

    private[""_msg"",""_from""];

    _msg = ctrlText 3003;

    if(_msg == “”"") exitWith {hint ““You must enter a message to send!””;};

    [[_msg,name player,4],"“TON_fnc_clientMessage”",true,false] spawn life_fnc_MP;

    [] call life_fnc_cellphone;

    hint format["“Message du Staff: %1"”,_msg];

    ";

    //To all for a Server Event

    TON_fnc_cell_serverMessageall =

    compileFinal "

    if(isServer) exitWith {};

    if((call life_adminlevel) < 1) exitWith {hint ““You are not an Admin!””;};

    private[""_msg"",""_from""];

    _msg = ctrlText 3003;

    if(_msg == “”"") exitWith {hint ““You must enter a message to send!””;};

    [[_msg,name player,7],"“TON_fnc_clientMessage”",true,false] spawn life_fnc_MP;

    [] call life_fnc_cellphone;

    hint format["“Message Evènement: %1"”,_msg];

    ";

    //Message aux Dépanneurs

    TON_fnc_cell_deprequest =

    compileFinal "

    private[""_msg"",""_to"",""_from""];

    ctrlShow[3024,false];

    _msg = ctrlText 3003;

    _to = ““Depanneurs””;

    if(_msg == “”"") exitWith {hint ““Vous devez ecrire un message!””;ctrlShow[3024,true];};

    [[_msg,name player,7],"“TON_fnc_clientMessage”",true,false] spawn life_fnc_MP;

    [] call life_fnc_cellphone;

    hint format["“Envoi à %1 , Message: %2"”,_to,_msg];

    ctrlShow[3024,true];

    ";

    //Message aux Taxi

    TON_fnc_cell_taxirequest =

    compileFinal "

    private[""_msg"",""_to"",""_from""];

    ctrlShow[3025,false];

    _msg = ctrlText 3003;

    _to = ““Taxi””;

    if(_msg == “”"") exitWith {hint ““Vous devez ecrire un message!””;ctrlShow[3025,true];};

    [[_msg,name player,7],"“TON_fnc_clientMessage”",true,false] spawn life_fnc_MP;

    [] call life_fnc_cellphone;

    hint format["“Envoi à %1 , Message: %2"”,_to,_msg];

    ctrlShow[3025,true];

    ";

    publicVariable “TON_fnc_cell_textmsg”;

    publicVariable “TON_fnc_cell_textcop”;

    publicVariable “TON_fnc_cell_textadmin”;

    publicVariable “TON_fnc_cell_adminmsg”;

    publicVariable “TON_fnc_cell_adminmsgall”;

    publicVariable “TON_fnc_cell_emsrequest”;

    publicVariable “TON_fnc_cell_serverMessageall”;

    publicVariable “TON_fnc_cell_deprequest”;

    publicVariable “TON_fnc_cell_taxirequest”;

    //Client Message

    /*

    0 = private message

    1 = police message

    2 = message to admin

    3 = message from admin

    4 = admin message to all

    */

    TON_fnc_clientMessage =

    compileFinal "

    if(isServer) exitWith {};

    private[""_msg"",""_from"", “”_type""];

    _msg = _this select 0;

    _from = _this select 1;

    _type = _this select 2;

    if(_from == “”"") exitWith {};

    switch (_type) do

    {

    case 0 :

    {

    private[""_message""];

    _message = format["">>>MESSAGE DE %1: %2"",_from,_msg];

    hint parseText format [""<t color=’#FFCC00’><t size=‘2’><t align=‘center’>Nouveau Message<br/><br/><t color=’#33CC33’><t align=‘left’><t size=‘1’>A: <t color=’#ffffff’>Toi<br/><t color=’#33CC33’>De: <t color=’#ffffff’>%1<br/><br/><t color=’#33CC33’>Message:<br/><t color=’#ffffff’>%2"",_from,_msg];

    ["“TextMessage”",[format["“Vous avez reçu un SMS de %1"”,_from]]] call bis_fnc_showNotification;

    systemChat _message;

    };

    case 1 :

    {

    if(side player != west) exitWith {};

    private[""_message""];

    _message = format[""–-APPEL %1: %2"",_from,_msg];

    hint parseText format [""<t color=’#316dff’><t size=‘2’><t align=‘center’>APPEL A LA POLICE<br/><br/><t color=’#33CC33’><t align=‘left’><t size=‘1’>A: <t color=’#ffffff’>Tous les officiers<br/><t color=’#33CC33’>De: <t color=’#ffffff’>%1<br/><br/><t color=’#33CC33’>Message:<br/><t color=’#ffffff’>%2"",_from,_msg];

    ["“PoliceDispatch”",[format["“Un nouvelle appel de %1"”,_from]]] call bis_fnc_showNotification;

    systemChat _message;

    };

    case 2 :

    {

    if((call life_adminlevel) < 1) exitWith {};

    private[""_message""];

    _message = format[""???DEMANDE D’AIDE %1: %2"",_from,_msg];

    hint parseText format [""<t color=’#ffcefe’><t size=‘2’><t align=‘center’>Demande d’aide<br/><br/><t color=’#33CC33’><t align=‘left’><t size=‘1’>A: <t color=’#ffffff’>Administrateur / Modérateur<br/><t color=’#33CC33’>De: <t color=’#ffffff’>%1<br/><br/><t color=’#33CC33’>Message:<br/><t color=’#ffffff’>%2"",_from,_msg];

    ["“AdminDispatch”",[format[""%1 a envoyer une demande!"",_from]]] call bis_fnc_showNotification;

    systemChat _message;

    };

    case 3 :

    {

    private[""_message""];

    _message = format[""!!!MESSAGE MODO: %1"",_msg];

    _admin = format["“Sent by admin: %1"”, _from];

    hint parseText format [""<t color=’#FF0000’><t size=‘2’><t align=‘center’>MESSAGE MODO<br/><br/><t color=’#33CC33’><t align=‘left’><t size=‘1’>A: <t color=’#ffffff’>Toi<br/><t color=’#33CC33’>De: <t color=’#ffffff’>Administrateur / Moderateur<br/><br/><t color=’#33CC33’>Message:<br/><t color=’#ffffff’>%1"",_msg];

    ["“AdminMessage”",["“Vous avez reçu un Message des Modo”"]] call bis_fnc_showNotification;

    systemChat _message;

    if((call life_adminlevel) > 0) then {systemChat _admin;};

    };

    case 4 :

    {

    private[""_message"",""_admin""];

    _message = format[""!!!MESSAGE ADMIN: %1"",_msg];

    _admin = format["“Sent by admin: %1"”, _from];

    hint parseText format [""<t color=’#FF0000’><t size=‘2’><t align=‘center’>MESSAGE ADMIN<br/><br/><t color=’#33CC33’><t align=‘left’><t size=‘1’>A: <t color=’#ffffff’>Tous les joueurs<br/><t color=’#33CC33’>De: <t color=’#ffffff’>Administrateur<br/><br/><t color=’#33CC33’>Message:<br/><t color=’#ffffff’>%1"",_msg];

    ["“AdminMessage”",["“Vous avez reçu un Message des Admins”"]] call bis_fnc_showNotification;

    systemChat _message;

    if((call life_adminlevel) > 0) then {systemChat _admin;};

    };

    case 5: {

    private[""_message""];

    _message = format[""!!!Paramedic Appel: %1"",_msg];

    hint parseText format [""<t color=’#FFCC00’><t size=‘2’><t align=‘center’>Paramedic Appel<br/><br/><t color=’#33CC33’><t align=‘left’><t size=‘1’>De: <t color=’#ffffff’>Toi<br/><t color=’#33CC33’>De: <t color=’#ffffff’>%1<br/><br/><t color=’#33CC33’>Message:<br/><t color=’#ffffff’>%2"",_from,_msg];

    ["“TextMessage”",[format["“EMS Request from %1"”,_from]]] call bis_fnc_showNotification;

    };

    case 6 :

    {

    private[""_message"",""_admin""];

    _message = format["“EVENEMENT: %1"”,_msg];

    _admin = format["“Sent by admin: %1"”, _from];

    hint parseText format [""<t color=’#A00ED0’><t size=‘2’><t align=‘center’>EVENEMENT<br/><br/><t color=’#33CC33’><t align=‘left’><t size=‘1’>A: <t color=’#ffffff’>Tous les joueurs<br/><t color=’#33CC33’>De: <t color=’#ffffff’>Administrateur<br/><br/><t color=’#33CC33’>Message:<br/><t color=’#ffffff’>%1"",_msg];

    ["“AdminMessage”",["“Vous avez reçu un message d’un evenement”"]] call bis_fnc_showNotification;

    systemChat _message;

    if((call life_adminlevel) > 1) then {systemChat _admin;};

    };

    case 7 :

    {

    if(!license_civ_dep) exitWith {};

    private[""_message""];

    _message = format[""???DEMANDE DEPANNEUSE DE %1: %2"",_from,_msg];

    hint parseText format [""<t color=’#ffcefe’><t size=‘2’><t align=‘center’>Demande de Depanneuse<br/><br/><t color=’#33CC33’><t align=‘left’><t size=‘1’>A : <t color=’#ffffff’>Depanneurs<br/><t color=’#33CC33’>De : <t color=’#ffffff’>%1<br/><br/><t color=’#33CC33’>Message:<br/><t color=’#ffffff’>%2"",_from,_msg];

    ["“DepDispatch”",[format[""%1 Demande une depanneuse!"",_from]]] call bis_fnc_showNotification;

    systemChat _message;

    };

    case 8 :

    {

    if(!license_civ_taxi) exitWith {};

    private[""_message""];

    _message = format[""???DEMANDE DE TAXI DE %1: %2"",_from,_msg];

    hint parseText format [""<t color=’#ffcefe’><t size=‘2’><t align=‘center’>Demande de Taxi<br/><br/><t color=’#33CC33’><t align=‘left’><t size=‘1’>A : <t color=’#ffffff’>Taxi<br/><t color=’#33CC33’>De : <t color=’#ffffff’>%1<br/><br/><t color=’#33CC33’>Message:<br/><t color=’#ffffff’>%2"",_from,_msg];

    ["“TaxiDispatch”",[format[""%1 Demande un taxi!"",_from]]] call bis_fnc_showNotification;

    systemChat _message;

    };

    };

    ";

    publicVariable “TON_fnc_clientMessage”;

    @Joker

  • tu es sur que tes dépanneurs n’ont pas aussi la licence taxi ? Parce que tes conditions m’ont l’air correctes

     case 7 :  
            {  
                if(!license_civ_dep) exitWith {};  
    
     case 8 :  
            {  
                if(!license_civ_taxi) exitWith {};  
    
  • @Joker

    Non car avec Loki’s, on c’est donner chacun une licence différente et les dépanneurs reçoivent les messages Taxi et les taxis ne reçoivent rien… (J’avais la licence taxi et lui dépanneur) Et quand on envois le message pour les Taxi ça met la même forme que celle pour les dépanneurs (le message que l’on reçois il y a écrit “DEMANDE DE DEPANNEUR” au lieu de “DEMANDE DE TAXI” que j’ai mit dans le functions.sqf)…

    Voici le cellphone.hpp si tu veut…

    class DEPRequest : life_RscButtonMenu

    {

    idc = 3024;

    text = “Dépanneur”;

    onButtonClick = “[] call TON_fnc_cell_deprequest”;

    colorBackground[] = {1,0.7,0.1,0.75};

    x = 0.12 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH));

    y = 0.635;

    w = (6.25 / 40);

    h = (1 / 25);

    class Attributes

    {

    align = “center”;

    };

    };

    class TAXIRequest : life_RscButtonMenu

    {

    idc = 3025;

    text = “Taxi”;

    onButtonClick = “[] call TON_fnc_cell_taxirequest”;

    colorBackground[] = {1,0.7,0.1,0.75};

    x = 0.28 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH));

    y = 0.635;

    w = (6.25 / 40);

    h = (1 / 25);

    class Attributes

    {

    align = “center”;

    };

    };

    };

    };

  • Hum bizarre.

    Je pense pas que ça va résoudre ton pb mais il faut que tu rajoutes les notifications dans description.ext

    	class TaxiDispatch  
    	{  
    		title = "Appel Crazy Taxi";  
    		iconPicture = "\A3\ui_f\data\map\mapcontrol\taskIcon_ca.paa";  
    		description = "%1";  
    		duration = 10;  
    		priority = 6;  
    	};  
    
    	class DepDispatch  
    	{  
    		title = "Appel Dépanneurs";  
    		iconPicture = "\A3\ui_f\data\map\mapcontrol\taskIcon_ca.paa";  
    		description = "%1";  
    		duration = 10;  
    		priority = 6;  
    	};  
    
    

    Tu as des erreurs dans tes logs ?

  • @Joker aucune erreur… mais je vais essayer de mettre ça dans le description.ext quand même…

  • @Joker en faite le truc ses que tout a lair bien definie, quand ont envoi un message au taxi ont a le message qui nous dit message envoyer au taxi.

    mais celui qiu recoie le message recoi: Demande une depanneuse!

    Donc pour resumer, a la reception du message ses la case 7 et non la case 8 qui recoie le message

  • Ah d’accord

    Remplacez

        [[_msg,name player,7],""TON_fnc_clientMessage"",true,false] spawn life_fnc_MP;  
    

    par

        [[_msg,name player,8],""TON_fnc_clientMessage"",true,false] spawn life_fnc_MP;  
    

    Dans TON_fnc_cell_taxirequest

  • putain pas fais gaffe a sa -_-

  • Putain ça marche… fin j’espère :rolleyes:

  • confirmation ses regler  x)

Messages 19Vues 1003