Skip to content

Commit

Permalink
Update HnsMatchSystem.sma
Browse files Browse the repository at this point in the history
  • Loading branch information
WessTorn authored Feb 2, 2021
1 parent ee3fea7 commit 89d8b8d
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions scripting/HnsMatchSystem.sma
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public plugin_precache() {
}

public plugin_init() {
register_plugin("Hide'n'Seek Match System", "1.0.7r", "??"); // Спасибо: Cultura, Garey, Medusa, Ruffman, Conor
register_plugin("Hide'n'Seek Match System", "1.0.8", "??"); // Спасибо: Cultura, Garey, Medusa, Ruffman, Conor

get_mapname(g_eMatchInfo[e_mMapName], charsmax(g_eMatchInfo[e_mMapName]));

Expand Down Expand Up @@ -933,6 +933,9 @@ public taskSetPlayerTeam(id) {
}

public taskPlay(id) {
if (!is_user_connected(id))
return;

new iMenu = menu_create("\rYou play?", "handlePlayMenu");

menu_additem(iMenu, "Yes");
Expand All @@ -943,12 +946,13 @@ public taskPlay(id) {
}

public handlePlayMenu(id, iMenu, item) {
menu_destroy(iMenu);
if (!is_user_connected(id))
return;

if (item == MENU_EXIT)
return;

menu_destroy(iMenu);

switch (item) {
case 0: cmdPlay(id);
Expand Down Expand Up @@ -1546,19 +1550,17 @@ public mainMatchMenu(id) {
menu_additem(iMenu, "Swap teams^n", "5");
menu_additem(iMenu, "Team Transfer Player", "6");
menu_additem(iMenu, "Change map", "7");
menu_display(id, iMenu, 0);

menu_display(id, iMenu);
}

public mainMatchMenuHandler(id, iMenu, item) {
if (item == MENU_EXIT) {
menu_destroy(iMenu);
return PLUGIN_HANDLED;
}

new szData[6], szName[64], iAccess, iCallback;
menu_item_getinfo(iMenu, item, iAccess, szData, charsmax(szData), szName, charsmax(szName), iCallback);
menu_destroy(iMenu);
new iKey = str_to_num(szData);

switch (iKey) {
Expand Down

0 comments on commit 89d8b8d

Please sign in to comment.