Jump to content
  • 0

Help please!


MultiGamer

Question

Hi all!
I'm have a problem...

I make the menu for the server , but do not know how to remove it after the death of the player.

 

doing so: waitUntil { not alive player };

However , it removes the once ..

Help please.

 

_Rus_

Всем привет!
У меня есть проблема...

Я делаю меню для сервера, но не знаю как его удалить после смерти игрока.

Делаю так: waitUntil { not alive player };

Но эта функция удаляет всего один раз...

Помогите пожалуйста.
 

This is menu | Это меню.

    waituntil {!alive player ; !isnull (finddisplay 46)};
    _na = player addaction [("<t color=""#0074E8"">" + ("Menu") +"</t>"),"[] call LoadMenu","",5,false,true,"",""];
    titleText ["One load menu!", "PLAIN DOWN", 3];

    LoadMenu = {
        _new = player addaction [("<t color=""#ff0000"">" + ("Suicide") +"</t>"),"[] call KillPlayer","",5,false,true,"",""];
        _new = player addaction [("<t color=""#0074E8"">" + ("Exit") +"</t>"),"[] call RemoveAllA","",5,false,true,"",""];
    };

    RemoveAllA = {
        removeAllActions player;
        _na = player addaction [("<t color=""#0074E8"">" + ("Menu") +"</t>"),"[] call LoadMenu","",5,false,true,"",""];
        titleText ["Menu loaded!", "PLAIN DOWN", 3];
    };

    KillPlayer = {
        player setDamage 1;
    };
    
    if (!isServer) then {    
        player addEventHandler ["Respawn",    {    _na = player addaction [("<t color=""#0074E8"">" + ("Menu") +"</t>"),"[] call LoadMenu","",5,false,true,"",""];    titleText ["Respawned!", "PLAIN DOWN", 3];    }];    
    };

    waitUntil { not alive player };
    removeAllActions player;
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

so decided:

Added:

    if (!isServer) then {    
        player addEventHandler ["Respawn",    {    [] spawn MenuKilled;   _na = player addaction [("<t color=""#0074E8"">" + ("Menu") +"</t>"),"[] call LoadMenu","",5,false,true,"",""];    titleText ["Respawned!", "PLAIN DOWN", 3];    }];    
    };

    waitUntil { not alive player };
    removeAllActions player;
    MenuKilled = {    waitUntil { not alive player };    removeAllActions player;    };
This - [] spawn MenuKilled;
adn This:
MenuKilled = {    waitUntil { not alive player };    removeAllActions player;    };
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Discord

×
×
  • Create New...