Français Not solved Script de compte d'utilisateur paintball fonctionne seulement en local

  • Auteur de la discussion Auteur de la discussion cadnalex
  • Date de début Date de début
  • Bonjour Visiteur ! Les sujets de cette catégorie sont clos. Si vous souhaitez réouvrir, merci de nous contacter en précisant le lien du post à réouvrir !

    Hello Visiteur ! The topics in this category are closed. If you wish to reopen, please contact us with the link of the post you wish to reopen !

cadnalex

User
14/5/22
51
5
3
300
Didacticiel https://native-network.net/forum/thread/65-tutorial-paintball-script/

[CODE lang="csharp" title="pb_join.sqf-original"]if (joinmode==0) then {
_PUID = getPlayerUID player;
_spielerGeld = life_cash;
hint "Eine Anfrage wurde an den Server gesendet, bitte warte einen Moment";
[[_PUID,_spielerGeld],"TON_fnc_paintball",false,false] spawn life_fnc_MP;
joinmode = 1;
} else {
hint "Du bist der Lobby bereits beigetreten, versuche es später noch einmal!";
};[/CODE]
[CODE lang="csharp" title="pb_join.sqf-modifié"]if (joinmode==0) then {
_PUID = getPlayerUID player;
_spielerGeld = RJM_GRANA;
hint "Uma solicitação foi enviada ao servidor, aguarde um momento";
[_PUID,_spielerGeld], remoteExecCall ["TON_fnc_paintball",false];
joinmode = 1;
} else {
hint "Você já entrou no lobby, tente novamente mais tarde!";
};[/CODE]
[CODE lang="csharp" title="fn_pb_response.sqf-original"]private["_respondmode","_message"];




_respondmode = [_this,0,0,[0]] call BIS_fnc_param;




if (_respondmode==1) then {
_message = [_this,1,"",[""]] call BIS_fnc_param;
hint format ["%1",_message];
};
seulement ça n'a pas marché.



if (_respondmode==2) then {
player addEventHandler ["handleDamage", {false}];
playMusic "LeadTrack02_F_Bootcamp";
hint "Willkommen in der Paintballarena! Das kommende Spiel wird 5 Minuten gehen, viel Spaß!";
meinePos = getPos player;
[] call life_fnc_saveGear;
player enableFatigue false;
meingear = life_gear;
life_gear set [16,[]];
RemoveAllWeapons player;
{player removeMagazine _x;} foreach (magazines player);
removeUniform player;
removeVest player;
removeBackpack player;
removeGoggles player;
removeHeadGear player;
player forceAddUniform "U_I_Protagonist_VR";
player addWeaponGlobal "hgun_Pistol_heavy_02_Yorris_F";
player addMagazines ["6Rnd_45ACP_Cylinder" , 25];
{
player unassignItem _x;
player removeItem _x;
} foreach (assignedItems player);
player allowDamage false;
_wohin = round(random (count pb_positionen));
if (_wohin==count pb_positionen) then {_wohin=_wohin-1;};
_position = pb_positionen select _wohin;
player setPos _position;
tode = 0;
player addEventHandler ["Hit", {
_wohin = round(random (count pb_positionen));
if (_wohin==count pb_positionen) then {_wohin=_wohin-1;};
_position = pb_positionen select _wohin;
player setPos _position;
tode = tode+1;
_maxGeld = 100;
_grenzeAusz = 30;
_geldTod = _maxGeld/_grenzeAusz;
_punkte = _grenzeAusz-tode;
hintSilent parseText format ["<t align='center' color='#00E500' size='1.3'>Statistik</t><br/><br/><t align='left'>Tode</t><t align='right'>%1</t><br/><t align='left'>Punkte</t><t align='right'>%2</t>",tode,_punkte];
}];
};




if (_respondmode==3) then {
life_gear = meingear;
[] spawn life_fnc_Loadgear;
player setPos meinePos;
player allowDamage true;
player removeAllEventHandlers "Hit";
player addEventHandler["handleDamage",{_this call life_fnc_handleDamage;}];
player enableFatigue true;
_grenzeAusz = 30;
if (tode>=_grenzeAusz) then {
hint "Das Spiel wurde beendet. Leider hast du nicht genügend Punkte erspielt, um einen Geldpreis zu erhalten!";
} else {
_maxGeld = 100;
_geldTod = _maxGeld/_grenzeAusz;
_punkte = _grenzeAusz-tode;
_geldMin= _geldTod*tode;
_gesamt = _maxGeld-_geldMin;
life_cash = life_cash + _gesamt;
hint format ["Das Spiel wurde beendet. Du hast insgesamt %1 Punkte erspielt und einen Geldpreis ($%2) erhalten. Glückwunsch!",_punkte,_gesamt];
};
};




if (_respondmode==4) then {playMusic "LeadTrack06_F";};




if (_respondmode==5) then {
_message = [_this,1,"",[""]] call BIS_fnc_param;
hint format ["%1",_message];
life_cash = life_cash - 100;
};[/CODE]
[CODE lang="csharp" title="fn_pb_response.sqf-modifié"]private["_respondmode","_message"];




_respondmode = [_this,0,0,[0]] call BIS_fnc_param;




if (_respondmode==1) then {
_message = [_this,1,"",[""]] call BIS_fnc_param;
hint format ["%1",_message];
};




if (_respondmode==2) then {
player addEventHandler ["handleDamage", {false}];
playMusic "LeadTrack02_F_Bootcamp";
hint "Bem-vindo à arena de paintball! O próximo jogo durará 5 minutos, divirta-se!";
meinePos = getPos player;
[] call life_fnc_saveGear;
player enableFatigue false;
meingear = life_gear;
life_gear set [16,[]];
RemoveAllWeapons player;
{player removeMagazine _x;} foreach (magazines player);
removeUniform player;
removeVest player;
removeBackpack player;
removeGoggles player;
removeHeadGear player;
player forceAddUniform "U_I_Protagonist_VR";
player addWeaponGlobal "hgun_Pistol_heavy_02_Yorris_F";
player addMagazines ["6Rnd_45ACP_Cylinder" , 25];
{
player unassignItem _x;
player removeItem _x;
} foreach (assignedItems player);
player allowDamage false;
_wohin = round(random (count pb_positionen));
if (_wohin==count pb_positionen) then {_wohin=_wohin-1;};
_position = pb_positionen select _wohin;
player setPos _position;
tode = 0;
player addEventHandler ["Hit", {
_wohin = round(random (count pb_positionen));
if (_wohin==count pb_positionen) then {_wohin=_wohin-1;};
_position = pb_positionen select _wohin;
player setPos _position;
tode = tode+1;
_maxGeld = 100;
_grenzeAusz = 30;
_geldTod = _maxGeld/_grenzeAusz;
_punkte = _grenzeAusz-tode;
hintSilent parseText format ["<t align='center' color='#00E500' size='1.3'>Statistik</t><br/><br/><t align='left'>Mortes</t><t align='right'>%1</t><br/><t align='left'>Punkte</t><t align='right'>%2</t>",tode,_punkte];
}];
};




if (_respondmode==3) then {
life_gear = meingear;
[] spawn life_fnc_Loadgear;
player setPos meinePos;
player allowDamage true;
player removeAllEventHandlers "Hit";
player addEventHandler["handleDamage",{_this call life_fnc_handleDamage;}];
player enableFatigue true;
_grenzeAusz = 30;
if (tode>=_grenzeAusz) then {
hint "O jogo terminou. Infelizmente, você não ganhou pontos suficientes para receber um prêmio em dinheiro!";
} else {
_maxGeld = 100;
_geldTod = _maxGeld/_grenzeAusz;
_punkte = _grenzeAusz-tode;
_geldMin= _geldTod*tode;
_gesamt = _maxGeld-_geldMin;
RJM_GRANA = RJM_GRANA + _gesamt;
hint format ["O jogo terminou. você tem total %1 Ganhe pontos e um prêmio em dinheiro ($%2) receber. Parabéns!",_punkte,_gesamt];
};
};




if (_respondmode==4) then {playMusic "LeadTrack06_F";};




if (_respondmode==5) then {
_message = [_this,1,"",[""]] call BIS_fnc_param;
hint format ["%1",_message];
RJM_GRANA = RJM_GRANA - 100;
};[/CODE]
[CODE title="fn_ryn_message.sqf"]private["_titel","_message"];




_titel = [_this,0,"",[""]] call BIS_fnc_param;
_message = [_this,1,"",[""]] call BIS_fnc_param;




_hint = parseText format ["<t color='#ffff00'>%1</t><br/><br/><t color='#FFFFFF'>%2</t>", _titel,_message];




hint _hint;[/CODE]
[CODE title="fn_game.sqf-original"]pb_spielstatus=1;
[["Paintballarena","Ein Spieler hat soeben eine Lobby in der Paintballarena eröffnet! Die Lobby schließt sich in 60 Sekunden!"],"life_fnc_ryn_message",true,false] spawn life_fnc_MP;
sleep 60;




if (count pb_spieler>=2) then {




pb_spielstatus=2;
{
[[2],"life_fnc_pb_response",_x,false] spawn life_fnc_MP;
} forEach pb_spieler;
sleep 60;
_msg = "Das Spiel läuft noch 4 Minuten";
{
[[1,_msg],"life_fnc_pb_response",_x,false] spawn life_fnc_MP;
} forEach pb_spieler;
sleep 60;
_msg = "Das Spiel läuft noch 3 Minuten";
{
[[1,_msg],"life_fnc_pb_response",_x,false] spawn life_fnc_MP;
} forEach pb_spieler;
sleep 60;
_msg = "Das Spiel läuft noch 2 Minuten";
{
[[1,_msg],"life_fnc_pb_response",_x,false] spawn life_fnc_MP;
} forEach pb_spieler;
sleep 60;
_msg = "Das Spiel läuft noch eine Minute!";
{
[[1,_msg],"life_fnc_pb_response",_x,false] spawn life_fnc_MP;
[[4],"life_fnc_pb_response",_x,false] spawn life_fnc_MP;
} forEach pb_spieler;
sleep 60;
{
[[3],"life_fnc_pb_response",_x,false] spawn life_fnc_MP;
} forEach pb_spieler;
pb_spieler = [];
pb_spielstatus = 0;
joinmode = 0;
publicVariable "joinmode";




} else {




_msg = "Da zu wenig Spieler sich in der Lobby befanden wurde das Spiel abgebrochen!";
{
[[1,_msg],"life_fnc_pb_response",_x,false] spawn life_fnc_MP;
} forEach pb_spieler;
pb_spieler = [];
pb_spielstatus=0;
joinmode = 0;
publicVariable "joinmode";




};[/CODE]
[CODE lang="csharp" title="fn_game.sqf-modifié"]pb_spielstatus=1;
["Paintballarena","Um jogador acaba de abrir um lobby no Paintball Arena! O lobby fechará em 60 segundos!"] remoteExecCall ["life_fnc_ryn_message",true];
sleep 60;




if (count pb_spieler>=2) then {




pb_spielstatus=2;
{
[2] remoteExecCall ["life_fnc_pb_response",_x];
} forEach pb_spieler;
sleep 60;
_msg = "O jogo ainda tem 4 minutos";
{
[1,_msg] remoteExecCall ["life_fnc_pb_response",_x];
} forEach pb_spieler;
sleep 60;
_msg = "O jogo ainda tem 3 minutos";
{
[1,_msg] remoteExecCall ["life_fnc_pb_response",_x];
} forEach pb_spieler;
sleep 60;
_msg = "O jogo ainda tem 2 minutos";
{
[1,_msg] remoteExecCall ["life_fnc_pb_response",_x];
} forEach pb_spieler;
sleep 60;
_msg = "O jogo ainda tem 1 minuto!";
{
[1,_msg] remoteExecCall ["life_fnc_pb_response",_x];
[4] remoteExecCall ["life_fnc_pb_response",_x];
} forEach pb_spieler;
sleep 60;
{
[3] remoteExecCall ["life_fnc_pb_response",_x];
} forEach pb_spieler;
pb_spieler = [];
pb_spielstatus = 0;
joinmode = 0;
publicVariable "joinmode";




} else {




_msg = "Como não havia jogadores suficientes no lobby, o jogo foi cancelado!";
{
[1,_msg] remoteExecCall ["life_fnc_pb_response",_x];
} forEach pb_spieler;
pb_spieler = [];
pb_spielstatus=0;
joinmode = 0;
publicVariable "joinmode";




};[/CODE]
[CODE lang="csharp" title="fn_paintball.sqf-original"]private["_uid"];
_uid = [_this,0,"",[""]] call BIS_fnc_param;




if (count pb_spieler==0&&pb_spielstatus==0) then {
[[],"TON_fnc_game",false,false] spawn life_fnc_MP;
pb_spielstatus = 1;
};




if (pb_spielstatus==1) then {
_uidarr = [_uid];
_geld = [_this,1,0,[0]] call BIS_fnc_param;
if (_geld>=5000) then {
pb_spieler = pb_spieler + _uidarr;
[[5,"Du wurdest erfolgreich für das kommende Spiel angemeldet!"],"life_fnc_pb_response",_uid,false] spawn life_fnc_MP;
} else {
[[1,"Du hast keine 5000 Dollar bei dir!"],"life_fnc_pb_response",_uid,false] spawn life_fnc_MP;
};
};




if ((pb_spielstatus==2&&count pb_spieler>=2)||(count pb_spieler==pb_maxspieler)) then {
[[1,"Leider hat das Spiel bereits begonnen oder die Lobby ist bereits voll, versuche es später noch einmal!"],"life_fnc_pb_response",_uid,false] spawn life_fnc_MP;
};[/CODE]
[CODE lang="csharp" title="fn_paintball.sqf-modifié"]private["_uid"];
_uid = [_this,0,"",[""]] call BIS_fnc_param;




if (count pb_spieler==0&&pb_spielstatus==0) then {
[] remoteExecCall ["TON_fnc_game",false];
pb_spielstatus = 1;
};




if (pb_spielstatus==1) then {
_uidarr = [_uid];
_geld = [_this,1,0,[0]] call BIS_fnc_param;
if (_geld>=5000) then {
pb_spieler = pb_spieler + _uidarr;
[5,"Você foi registrado com sucesso para o próximo jogo!"] remoteExecCall ["life_fnc_pb_response",_uid];
} else {
[1,"Você não tem $ 5000 em você!"] remoteExecCall ["life_fnc_pb_response",_uid];
};
};




if ((pb_spielstatus==2&&count pb_spieler>=2)||(count pb_spieler==pb_maxspieler)) then {
[1,"Desculpe, o jogo já começou ou o lobby já está cheio, tente novamente mais tarde!"] remoteExecCall ["life_fnc_pb_response",_uid];
};[/CODE]

la seule chose que j'ai faite différente du tutoriel était
[CODE title="Config_RemoteExec.hpp"]F(TON_fnc_paintball,ANYONE)
F(TON_fnc_game,ANYONE)
F(life_fnc_ryn_message,ANYONE)
F(life_pb_response,ANYONE)[/CODE]

ça ne marche pas est-ce que quelqu'un peut m'aider?