Post: Client menu help
07-20-2015, 01:29 PM #1
gtownsbadass
Bounty hunter
(adsbygoogle = window.adsbygoogle || []).push({}); I need help Im trying to make a client menu for the host on sharks zombieland I've already got a menu set up that works for host only I just need to add a client menu to go along with it for kicking etc. and I have no idea how to code it to where the clients will show up in the menu the closest I have gotten is the client menu but no names only numbers can someone help please.
07-21-2015, 01:15 AM #2
HiddenHour
I defeated!
Look at how Shark does it in his menu base.
EDIT: You must login or register to view this content.

The following user thanked HiddenHour for this useful post:

gtownsbadass
07-21-2015, 04:13 PM #3
gtownsbadass
Bounty hunter
thanks will check it out and see what I can get going
07-21-2015, 08:24 PM #4
gtownsbadass
Bounty hunter
Originally posted by TheHiddenHour View Post
Look at how Shark does it in his menu base.
EDIT: You must login or register to view this content.


Ok I checked it out and tried to piece something together but im stuck at ive got the client menu to show names and when you click on the name it takes you to the players mods with kick etc. but although it is showing everyone elses name they are all considered as me, the host and I did not add verification give me a sec and I will show what I have.
07-21-2015, 08:27 PM #5
gtownsbadass
Bounty hunter
self add_menu("Clients", "Mods", "Clients","human");
for (p = 0; p < level.players.size; p++)
{
player = level.players[p];
self add_option("Clients", player.name, ::submenu, "Client Functions");
}
self thread MonitorPlayers();

self add_menu("Client Functions", "Clients", "Client Functions", "human");
self add_option("Client Functions", "Kill", ::killplayer);
self add_option("Client Functions", "Kick", ::kickplayer);
self add_option("Client Functions", "Ban", ::banplayer);
self add_option("Client Functions", "Derank", :HappyerankPlayer);

then the MonitorPlayer thread
MonitorPlayers()
{
self endon("disconnect");
self endon("closedMenu");
for(;Winky Winky
{
for(p = 0; p < level.players.size; p++)
{
player = level.players[p];
self.Menu.System["MenuTexte"]["Clients"][p] = player.name;
self.Menu.System["MenuFunction"]["Clients"][p] = ::submenu;
self.Menu.System["MenuInput"]["Clients"][p] = "Client Function";
wait .01;
}
wait .5;
}
}
07-21-2015, 08:44 PM #6
Dan
I'm a god.
Originally posted by guntownsbadass View Post
I need help Im trying to make a client menu for the host on sharks zombieland I've already got a menu set up that works for host only I just need to add a client menu to go along with it for kicking etc. and I have no idea how to code it to where the clients will show up in the menu the closest I have gotten is the client menu but no names only numbers can someone help please.


This is how shark did it in his menu..

    
updatePlayersMenu()
{
self.menu.menucount["PlayersMenu"] = 0;
for (i = 0; i < 12; i++)
{
player = level.players[i];
name = player.name;

playersizefixed = level.players.size - 1;
if(self.menu.curs["PlayersMenu"] > playersizefixed)
{
self.menu.scrollerpos["PlayersMenu"] = playersizefixed;
self.menu.curs["PlayersMenu"] = playersizefixed;
}

self add_option("PlayersMenu", "[" + verificationToColor(player.status) + "^7] " + player.name, ::submenu, "pOpt " + i, "[" + verificationToColor(player.status) + "^7] " + player.name);

self add_menu_alt("pOpt " + i, "PlayersMenu");
self add_option("pOpt " + i, "Give CoHost", ::changeVerificationMenu, player, "CoHost");
self add_option("pOpt " + i, "Give Admin", ::changeVerificationMenu, player, "Admin");
self add_option("pOpt " + i, "Give VIP", ::changeVerificationMenu, player, "VIP");
self add_option("pOpt " + i, "Verify", ::changeVerificationMenu, player, "Verified");
self add_option("pOpt " + i, "Unverify", ::changeVerificationMenu, player, "Unverified");
}
}
07-21-2015, 08:48 PM #7
gtownsbadass
Bounty hunter
Originally posted by Dan View Post
This is how shark did it in his menu..

    
updatePlayersMenu()
{
self.menu.menucount["PlayersMenu"] = 0;
for (i = 0; i < 12; i++)
{
player = level.players[i];
name = player.name;

playersizefixed = level.players.size - 1;
if(self.menu.curs["PlayersMenu"] > playersizefixed)
{
self.menu.scrollerpos["PlayersMenu"] = playersizefixed;
self.menu.curs["PlayersMenu"] = playersizefixed;
}

self add_option("PlayersMenu", "[" + verificationToColor(player.status) + "^7] " + player.name, ::submenu, "pOpt " + i, "[" + verificationToColor(player.status) + "^7] " + player.name);

self add_menu_alt("pOpt " + i, "PlayersMenu");
self add_option("pOpt " + i, "Give CoHost", ::changeVerificationMenu, player, "CoHost");
self add_option("pOpt " + i, "Give Admin", ::changeVerificationMenu, player, "Admin");
self add_option("pOpt " + i, "Give VIP", ::changeVerificationMenu, player, "VIP");
self add_option("pOpt " + i, "Verify", ::changeVerificationMenu, player, "Verified");
self add_option("pOpt " + i, "Unverify", ::changeVerificationMenu, player, "Unverified");
}
}


yes but with the zombieland menu and using that wouldn't I mess up the coordinates of the zombieland menu, because everything is in the normal zombieland menu I just added an option for host only with mods and one of the options in the mods menu is client menu
07-22-2015, 02:55 AM #8
HiddenHour
I defeated!
Originally posted by guntownsbadass View Post
I need help Im trying to make a client menu for the host on sharks zombieland I've already got a menu set up that works for host only I just need to add a client menu to go along with it for kicking etc. and I have no idea how to code it to where the clients will show up in the menu the closest I have gotten is the client menu but no names only numbers can someone help please.

Add this somewhere
    verificationToColor(status)
{
if (status == "human")
return "^2";
if (status == "zombie")
return "^1";
else
return "^7";
}

Add this to your menu
    if(self isHost())
{
self add_option("Main Menu Human", "Players", ::submenu, "PlayersMenu", "Players");
}

Add this too
    self add_menu("PlayersMenu", "Main Menu Human", "human");
for (i = 0; i < 12; i++)
{ self add_menu("pOpt " + i, "PlayersMenu", "human"); }

Add this somewhere and change the options of course
    updatePlayersMenu()
{
self.menu.menucount["PlayersMenu"] = 0;
for (i = 0; i < 12; i++)
{
player = level.players[i];
name = player.name;

playersizefixed = level.players.size - 1;
if(self.menu.curs["PlayersMenu"] > playersizefixed)
{
self.menu.scrollerpos["PlayersMenu"] = playersizefixed;
self.menu.curs["PlayersMenu"] = playersizefixed;
}

self add_option("PlayersMenu", verificationToColor(player.status) + player.name, ::submenu, "pOpt " + i, verificationToColor(player.status) + player.name);

self add_menu_alt("pOpt " + i, "PlayersMenu");
self add_option("pOpt " + i, "Give Money", ::playerCashScroll, player);
self add_option("pOpt " + i, "Give Health", ::playerHealthScroll, player);
self add_option("pOpt " + i, "SWAT Select", ::swatSelect, player);
self add_option("pOpt " + i, "Kill", ::killPlayer, player);
self add_option("pOpt " + i, "Kick", ::kickPlayer, player);
}
}

The following user thanked HiddenHour for this useful post:

gtownsbadass
07-23-2015, 11:19 AM #9
gtownsbadass
Bounty hunter
thanks for your time and help this works but the menu doesn't update whoever is in the lobby when the game starts is all that it shows and if someone else joins it doesn't update and when you kick someone it doesn't show them gone although they are gone
07-23-2015, 01:32 PM #10
HiddenHour
I defeated!
Originally posted by guntownsbadass View Post
thanks for your time and help this works but the menu doesn't update whoever is in the lobby when the game starts is all that it shows and if someone else joins it doesn't update and when you kick someone it doesn't show them gone although they are gone


It works fine for me.

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo