Whitey

Sitz Script

3 posts in this topic

Hallo Freunde.

Ich wollte heute das "Sitz Script" auf den Server bringen.

Leider funktioniert es nicht so wie es soll.

Ich habe den Schriftzug "Hinsetzen" und es zieht mich auf den Stuhl.

Aber leider setzt sich der Charakter nicht hin sondert es steht darauf.

20190415003848_1.thumb.jpg.a1585af3f57119ffdbfffc8e450b1dca.jpg

Kann mir da bitte jemand helfen?

Sitz Script sitdown.sqf

Spoiler

//////////////////////////////////////////////////////////////////////////
//                            Script Made By                                //
//                                MacRae                                    //
//                                                                      //
//                                                                      //
//1.Place a Camping Chair on the map.                                   //
//                                                                      //
//2.Add this to the Camping chair Init:                                 //
//this addAction ["<t color='#0099FF'>Sit Down</t>","Custom\Chair\sitdown.sqf"]//
//                              4D6163526165                            //
//////////////////////////////////////////////////////////////////////////


_chair = _this select 0; 
_unit = _this select 1; 

[[_unit, "Crew"], "MAC_fnc_switchMove"] spawn BIS_fnc_MP; 
//_unit setPos (getPos _chair);
_unit setPos (_chair modelToWorld [ 0, 0.1, 0.2]);  
_unit setDir ((getDir _chair) - 180); 
standup = _unit addaction ["<t color='#0099FF'>Aufstehen</t>","Custom\Chair\standup.sqf"];
_unit setpos [getpos _unit select 0, getpos _unit select 1,((getpos _unit select 2) +1)];

standup.sqf:

Spoiler

player switchMove "";  
player removeaction standup

//4D6163526165

In die init.sqf:

Spoiler

MAC_fnc_switchMove = {
    private["_object","_anim"];
    _object = _this select 0;
    _anim = _this select 1;

    _object switchMove _anim;
    
};

Das Script selbst ist von hier:

http://www.armaholic.com/page.php?id=22145

 

Edited by Whitey

Share this post


Link to post
Share on other sites

Ich habe noch ein zweites Sitz Script gefunden.

Aber leider funktioniert auch dieses nicht wie es soll. :(

sitdown.sqf

Spoiler

// Sit in chair for Players and AI by RickOShay
// Works with most chairs
// Requires Standup.sqf;
// For Players place following addaction in chair's init:
// this addAction ["<t color='#0099FF'>Sit Down</t>","scripts\sitdown.sqf"];
// For AI place the following in AI init - you need to name the chair
// null = [chair4, this] execvm "scripts\sitdown.sqf";

_chair = _this select 0;
_unit = _this select 1;

private ["_cdir","_cpos"];
_cdir = (getDir _chair) + 180;
_cpos = getPosATL _chair;

if (typeof _chair == "Land_ChairWood_F") then {
    _unit setPosATL [_cpos select 0, (_cpos select 1)-0.1, (_cpos select 2)-0.5];
    } else {
    _unit setPosATL [_cpos select 0, (_cpos select 1)-0.1, _cpos select 2];
};

if (typeof _chair == "Land_ChairPlastic_F") then {
    _unit setdir _cdir -90;} else {
    _unit setdir _cdir;
};

[_unit, "HubSittingChairUA_move1"] remoteExec ["switchMove", 0,false];
removeallActions _chair;
sleep 0.5;

_unit addAction ["<t color='#0099FF'>Stand up</t>","Custom\Chair\standup.sqf", _chair];

standup.sqf

Spoiler

// Standup for players by RickOShay
// Requires sitdown.sqf;

_unit = _this select 0;
_actionID = _this select 2;
_chair = _this select 3;

_unit removeAction _actionID;

sleep 0.5;

[_unit, ""] remoteExec ["switchMove", 0,false];
_unit setPosATL [(getPosATL _chair select 0) -0.7, (getPosATL _chair select 1), getPosATL _chair select 2];
_chair addAction ["<t color='#0099FF'>Sit Down</t>","Custom\Chair\sitdown.sqf"];
 

 

Share this post


Link to post
Share on other sites

Hat echt niemand eine Ahnung wie ich eines der beiden Scripte anpassen kann?

Ich meine funktionieren muss es ja irgendwie.

Man kann sich beim Russian Roulette ja auch hinsetzen.

Ich habe mir schon die diesbezüglichen Dateien angesehen und vermute das die Lösung in der ExileClient_system_russianRoulette_network_joinRussianRouletteResponse zu finden ist.

Spoiler

["switchMoveRequest", [netId player, "Exile_RouletteSitting01"]] call ExileClient_system_network_send;
player addWeapon "hgun_Pistol_heavy_02_F"; 
player selectWeapon (handGunWeapon player); 
player switchMove "Exile_RouletteSitting01";  

Ich weis aber nicht wie ich die Info verarbeiten muss bzw was davon für mich interessant ist.

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.