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

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
  • Discord

×
×
  • Create New...