EventScripts Forums
Mattie's EventScripts and Source Forums
Mattie recommends...
Premier Sponsor:Platinum Sponsor:
 
Script Categories
16000 (15) abilities (15) addon (71) addons (17) admin (348) admins (23) advert (27) adverts (26) afk (17) alerts (12) ammo (25) anti (20) armor (11) auth (16) automatic (15) awp (29) ban (24) ba_jail (34) bhop (45) block (27) bomb (47) bonus (25) boost (21) bot (35) bot-management (20) bots (24) bullet (13) bunnyhop (18) Buy (27) buymenu (13) c4 (12) cash (76) Change (14) chat (75) cheat (15) clan (17) classes (24) color (30) colors (20) command (23) commands (20) config (28) configurable (11) connect (54) counter (11) Counter-Strike-Source (18) CS:S (20) css (3313) custom (13) Damage (48) database (14) dead (19) Deagle (11) death (19) deathmatch (79) deathrun (17) deutsch (13) dice (11) disconnect (24) Dissolve (12) dm (24) dod:s (11) dods (494) download (12) easy (26) effect (14) effects (125) English (16) entity (24) est (12) es_tools (14) Eventscript (12) exploit (11) flashbang (27) français (104) french (36) fun (312) funny (18) Gabeee (11) game (12) gamemode (11) gameplay (175) German (11) give (20) gravity (15) grenade (28) grenades (32) gun (15) GunGame (31) GunGame5 (11) guns (20) Hack (16) headshot (37) health (70) hegrenade (15) help (11) hit (13) hl2dm (432) HP (25) hudhint (11) hungarian (22) info (52) information (17) invisible (11) IP (13) jail (79) jailbreak (14) join (44) jump (19) kick (25) kill (50) kills (23) knife (65) leveling (38) LnD (14) lol (11) magyar (32) management (14) manager (11) mani (16) map (31) map-management (26) maps (17) match (21) Memphis-84 (13) menu (139) message (30) messaging (52) minecraft (12) mod (121) model (18) models (32) modye (16) money (50) motd (13) music (32) mute (20) nades (20) name (15) new (13) noblock (53) orangebox (23) player (46) player-management (31) player-tracking (28) popup (70) prop (13) propmenu (14) props (34) protect (11) protection (31) punish (11) punishment (51) python (79) quake (32) QuakeSounds (12) race (13) races (20) radio (29) random (47) rank (41) rates (15) rcon (12) realism (22) Regeln (22) respawn (67) restrict (40) round (26) rpg (32) rules (60) say (16) score (15) scout (29) Script (25) script-helper (25) scriptpack (33) sdk (171) server (60) server-tools (42) shop (12) showdamage (19) silly (31) simple (31) skin (17) skins (34) slay (13) soccer (14) sound (63) sounds (106) source (13) spanish (18) spawn (81) speed (25) statistics (13) stats (55) status (15) Steam (11) STEAMID (29) Superhero (15) surf (41) Team (29) team-balance (14) teleport (16) text (17) TF2 (142) time (22) timer (15) tools (15) tracers (19) triggers (11) uedi (17) uses_auth (18) vip (23) vote (39) voting (22) war (25) Warcraft (12) warcraft-source (20) wc3 (14) wcs (47) wcs:Python (32) weapon (87) weapons (116) web (16) welcome (12) wuerfeln (11) zm (26) zombie (99) zombiemod (55) zombies (12)
Script Authors
*XYZ*SaYnt (12) .:MiB:. (20) .:modye:. (14) .eMko* (6) 101satoon101 (12) 3R10N (24) 4u571n91 (5) 7355608 (9) Absolute (9) Ace Rimmer (40) adminc (5) Adz (8) AgathaKnuppelkuh (8) aidden (8) ajax (5) ak_47 (6) Al3c Tr3v3lyan (6) allstareng (5) ashbash1987 (9) ATAMAH (7) Ayuto (5) aznone (5) B00M (5) BackRaw (41) BFH_RedBull (8) bigfabi (8) Bioko (10) blackshoxx (9) Blade (10) bladesback (13) bobdole (11) bodzsar1 (8) bonbon (36) Brainsucker (32) cagemonkey (8) capo azzlack (7) captain master (6) carbon-14 (10) CaskioUTF (5) cbirou (15) CbRRR (16) ChaCaLz2psy4 (5) CharlesT (5) Chrisber (5) chrismrulz (10) Chun (6) cladiron (10) clipz934 (8) Colster (21) Cookieman8 (7) CrAzD (6) craziest (11) dani12356 (12) DanielB (19) Darkness123 (8) Dave (9) dbozan99 (7) deathx9 (5) Deathyy (16) dhack (17) Di[M]aN (12) DJ Fire-Black prod (8) DoCky (31) Don (15) dordtcore (9) DragonFreddo (8) Drassil (5) dretax14 (11) Einlanzers (47) EmbouT (10) emilplov (7) Errant (10) Eun (6) Fantole (10) FMIS (5) Franc1sco (17) freddukes (18) Frequency (6) Fugi91 (6) Fulmine (5) G4ME (5) GAMEREN2 (8) german9114 (13) GODJonez (40) GoodfellaDeal (5) Hansi (6) Hisoka (6) HitThePipe (7) HOLLDIDAY (24) Icetouch (6) ichthys (25) Im the new guy (14) iNexus (13) infamous1 (9) isivisi (13) ispaine (7) Jackmaster (9) Jeff91 (45) JoeyT2006 (30) Juba_PornBorn (12) jxl180 (11) KDBFame (6) L'In20Cible (11) L.P.H (8) Largo Usagi (10) LnD (14) Lobe (11) loKkdoKk (8) lolo-le-haricot (7) LosNir (5) Lumpi@Work (9) M4rc3L-XCN (7) macshot (7) magyar-oneill (9) Matth (7) Mattie (21) mave1993 (5) MBchrono (15) McFly (20) Medda (5) Memphis-84 (15) Messiah93 (19) Mickyy (5) micmacx (6) Mitchell (5) Mixer57 (5) modye (6) Monster_Bitch1 (9) Mordavolt (7) motomoto (10) MrScriptaz (6) mryoung (6) MyTechZone.de (8) Nicolous (23) ojii (31) oliVier (10) Omega68 (6) Omega_K2 (11) Owned|Myself (8) P3N (7) pand3mic (6) parsimba (5) Pascal257 (9) PatPeter (7) PDrop (10) Phaedrus (18) PhantOm Fury (7) phoenix131 (9) pinkyyy -.- (5) pitbull0993 (7) PixelGamer (7) randomknifer (9) Raptor150 (31) Ratzee (6) ReaCtioN2oo9 (6) RedCliff (5) Rennnyyy (17) revolutionfighters (8) RideGuy (12) Rio (9) Roeliekt (6) roof (16) runamagic (13) Ryezin (5) sandking220 (6) Sarcasm_Poisoning (10) saRs| Johnny-5 (13) Schubaal (10) sea212 (5) sega74rus (15) sgt.angel (6) Shad0w (11) ShoTaXx# (7) sicilia (7) sicman_adrian (22) skillz92 (7) sn4k3 (18) Snake12 (7) snake38 (10) sonicsight (7) SpeedFreak (9) spoonman184 (10) stabby (22) stas (27) Stirni (6) stonedegg (7) Strontium Dog (30) SumGuy14 (25) SuperDave (49) surfteam (5) TaCo (5) TanaToS (17) Tealk (6) teowow (16) TheCheeTaH (27) TheDonFather (5) theresthatguy (6) Tiny Tod (7) tooshkan4uk (8) Totyahun (9) uedi (38) ultimatebuster (6) Undead (25) usernamesaretaken (15) wanted241 (9) Warren (13) westham (6) WhiteAvenger (7) Wonder (14) Wundermaxe (5) X-Mania (5) XE_ManUp (14) xfalcon61 (5) zSweetXz (5) ZZMatty (6) [Cs]Lord_Inferno2 (11) [DAP]Kickbutt (5) [NATO]Hunter (28) ||Wolf|| (10)
Search

Post new topic Reply to topic
Go to page 1, 2, 3  Next
Author Message
User avatar
Reader
Profile

Posts: 79
 
New postPosted: 2006-05-23, 5:53 am 
   Post subject: Player Menu for an voting and partial admin when alone...

I Originally released this as an "Alone Menu" but I have found that I have wanted more out of it. lol

Now let me try and define the options this script offers.

1. "Bot Menu" offers the players an option to play with 1 bot, 3 bots, or to kick bots. Now if the server has no players in it, it should remove the bots from the server until they are wanted again. Before I was trying to remove the bots as soon as the server got 2 human players. As I see from the response to the original post thats not really desirable. Now if the server count is more than 1 human player any menu selection from the "Bot Menu" will require a vote.

2. "Map Menu" offers 17 Steam maps preconfigured with 4 empty slots. Now this menu is rather self explanatory and is adjustable from the "//Map Menu" Just replace the "Empty" with the name of the map and slot you want it in. Now if the server count is more than 1 human player any menu selection from the "Map Menu" will require a vote.

3. "Settings Menu" just redirects the player to Mani's settings menu.

4. "Vote Menu" 6 preconfigured voting options please refer to the photo for reference on what they are.

5. "Reset Rank" this is what it says it allows the player to reset his/her rank. I added that because I have been asked on many occasions to do it for the player.


Image

Requirements:
Mattie's v1.0.0.016
Mani Admin Plugin (latest is desired)

Usage: es_load menu
Directory: cstrike\addons\eventscripts\menu
Filenames: es_menu.txt

Code:
block config
{
es_setinfo advert "1" //Set Adverts On/Off here. If 1 player will get a message when they join.
es_setinfo cycle "5"  //Set Adverts time cycle in minutes.
}

///////////////////////////////////////////////////////////////////////////////////
// If you want to use the admin option please copy the Lan example and
// repeat it for each admin.  This will turn off all voting when admin is present.
///////////////////////////////////////////////////////////////////////////////////

block admin_add
{
if (event_var(es_steamid) = "STEAM_ID_LAN") then es_math admin + 1
}

block admin_subtract
{
if (event_var(es_steamid) = "STEAM_ID_LAN") then es_math admin + 1
}

////////////////////////////////////////
//***** No need to edit below this *****
////////////////////////////////////////

event es_client_command
{
if (event_var(command) = "!menu") then es_doblock menu/menu
if (server_var(event_var(userid)) = "1") then es_xif (event_var(command) = "menuselect") then es_doblock menu/handlemenu
if (event_var(command) = "!botmenu") then es_doblock menu/botmenu
if (server_var(event_var(userid)) = "2") then es_xif (event_var(command) = "menuselect") then es_doblock menu/botmenu_handlemenu
if (event_var(command) = "!votemenu") then es_doblock menu/votemenu
if (server_var(event_var(userid)) = "3") then es_xif (event_var(command) = "menuselect") then es_doblock menu/votemenu_handlemenu
if (event_var(command) = "!mapmenu1") then es_doblock menu/mapmenu1
if (server_var(event_var(userid)) = "4") then es_xif (event_var(command) = "menuselect") then es_doblock menu/mapmenu1_handlemenu
if (event_var(command) = "!mapmenu2") then es_doblock menu/mapmenu2
if (server_var(event_var(userid)) = "5") then es_xif (event_var(command) = "menuselect") then es_doblock menu/mapmenu2_handlemenu
if (event_var(command) = "!mapmenu3") then es_doblock menu/mapmenu3
if (server_var(event_var(userid)) = "6") then es_xif (event_var(command) = "menuselect") then es_doblock menu/mapmenu3_handlemenu
}

event load
{
es_xsetinfo "Player Menu" v1.1
es_xmakepublic "Player Menu"
es_doblock menu/config
es_math cycle * 60
es_setinfo admin 0
}

event server
{
es_doblock menu/adverts
es_doblock menu/menuload
es_delayed 4 bot_quota 0
es_delayed 5 es_doblock menu/count
}

event player_activate
{
es_doblock menu/join
}

event player_disconnect
{
es_doblock menu/part
}

event player_say
{
if (event_var(text) = "menu") then es_doblock menu/permit
}     
 
event unload
{
es_log Player Menu was unloaded...
}

block adverts
{
if (server_var(advert) = 1) do
{
  es_tell event_var(userid) #multi #lightgreen We are running a #green Player Menu #lightgreen type #green menu #lightgreen to use this menu...
  es_delayed server_var(cycle) es_doblock menu/adverts
}
}

block count
{
es_setinfo ct_count 0
es_setinfo t_count 0
es_setinfo s_count 0
es_setinfo count 0
es_getplayercount ct_count 3
es_getplayercount t_count 2
es_getplayercount s_count 1
es_math count + server_var(ct_count)
es_math count + server_var(t_count)
es_math count + server_var(s_count)
}

block join
{
es_math count + 1
es_doblock menu/admin_add
es_setinfo event_var(userid) 0
es_isbot botcheck event_var(userid)
if (server_var(botcheck) = "1") then es_math count - 1
es_setinfo botcheck 0
if (server_var(advert) = "1") do
  {
   es_delayed 7 es_tell event_var(userid) #multi #lightgreen We are running a #green Player Menu #lightgreen type #green menu #lightgreen to use this menu...
  }
}

block part
{
es_setinfo event_var(userid) 0
es_doblock menu/admin_minus
if (server_var(count) greaterthan "0") then es_math count - 1
es_isbot botcheck event_var(userid)
if (server_var(botcheck) = "1") then es_math count + 1
es_setinfo botcheck 0
if (server_var(count) = "0") do
  {
   es_setinfo bot_quota 0
   es_doblock menu/count
  }
}

block permit
{
es_cexec event_var(userid) !menu
}

block menuload
{
es_setinfo botcheck 0
alias choose "es_cexec event_var(userid) play buttons\button14.wav"
alias nochoice "es_cexec event_var(userid) play buttons\combine_button7.wav"
alias menuexit "es_setinfo event_var(userid) 0"
}

block menu
{
es_setinfo event_var(userid) 1
es ma_msay 0 event_var(userid) Player Menu\n->1 Settings Menu\n->2 Vote Menu\n->3 Reset Rank\n0 Exit
}

block handlemenu
{
if (event_var(commandstring) = 1) then es_doblock menu/menu_1
if (event_var(commandstring) = 2) then es_doblock menu/menu_2
if (event_var(commandstring) = 3) then es_doblock menu/menu_3
if (event_var(commandstring) = 4) then es_doblock menu/menu_4
if (event_var(commandstring) = 5) then es_doblock menu/menu_5
if (event_var(commandstring) = 6) then es_doblock menu/menu_6
if (event_var(commandstring) = 7) then es_doblock menu/menu_7
if (event_var(commandstring) = 8) then es_doblock menu/menu_8
if (event_var(commandstring) = 9) then es_doblock menu/menu_9
if (event_var(commandstring) = 10) then es_doblock menu/menu_0
}

block botmenu
{
es_setinfo event_var(userid) 2
es ma_msay 0 event_var(userid) Bot Menu\n->1 Add a Bot\n->2 Add 3 Bots\n->3 Kick Bots\n->4 Back\n0 Exit
}

block botmenu_handlemenu
{
if (event_var(commandstring) = 1) then es_doblock menu/botmenu_1
if (event_var(commandstring) = 2) then es_doblock menu/botmenu_2
if (event_var(commandstring) = 3) then es_doblock menu/botmenu_3
if (event_var(commandstring) = 4) then es_doblock menu/botmenu_4
if (event_var(commandstring) = 5) then es_doblock menu/botmenu_5
if (event_var(commandstring) = 6) then es_doblock menu/botmenu_6
if (event_var(commandstring) = 7) then es_doblock menu/botmenu_7
if (event_var(commandstring) = 8) then es_doblock menu/botmenu_8
if (event_var(commandstring) = 9) then es_doblock menu/botmenu_9
if (event_var(commandstring) = 10) then es_doblock menu/botmenu_0
}

block votemenu
{
es_setinfo event_var(userid) 3
es ma_msay 0 event_var(userid) Vote Menu\n->1 Map Menu\n->2 Bot Menu \n->3 Low Gravity\n->4 Normal Gravity\n->5 Friendly Fire On\n->6 Friendly Fire Off\n->7 All Talk On\n->8 All Talk Off\n->9 Back\n0 Exit
}

block votemenu_handlemenu
{
if (event_var(commandstring) = 1) then es_doblock menu/votemenu_1
if (event_var(commandstring) = 2) then es_doblock menu/votemenu_2
if (event_var(commandstring) = 3) then es_doblock menu/votemenu_3
if (event_var(commandstring) = 4) then es_doblock menu/votemenu_4
if (event_var(commandstring) = 5) then es_doblock menu/votemenu_5
if (event_var(commandstring) = 6) then es_doblock menu/votemenu_6
if (event_var(commandstring) = 7) then es_doblock menu/votemenu_7
if (event_var(commandstring) = 8) then es_doblock menu/votemenu_8
if (event_var(commandstring) = 9) then es_doblock menu/votemenu_9
if (event_var(commandstring) = 10) then es_doblock menu/votemenu_0
}

block mapmenu1
{
es_setinfo event_var(userid) 4
es ma_msay 0 event_var(userid) Maps Menu\n->1 cs_assault \n->2 cs_compound\n->3 cs_havana\n->4 cs_italy\n->5 cs_militia\n->6 cs_office\n->7 de_aztec\n->8 Back\n->9 More\n0 Exit
}

block mapmenu1_handlemenu
{
if (event_var(commandstring) = 1) then es_doblock menu/mapmenu_1_1
if (event_var(commandstring) = 2) then es_doblock menu/mapmenu_1_2
if (event_var(commandstring) = 3) then es_doblock menu/mapmenu_1_3
if (event_var(commandstring) = 4) then es_doblock menu/mapmenu_1_4
if (event_var(commandstring) = 5) then es_doblock menu/mapmenu_1_5
if (event_var(commandstring) = 6) then es_doblock menu/mapmenu_1_6
if (event_var(commandstring) = 7) then es_doblock menu/mapmenu_1_7
if (event_var(commandstring) = 8) then es_doblock menu/mapmenu_1_8
if (event_var(commandstring) = 9) then es_doblock menu/mapmenu_1_9
if (event_var(commandstring) = 10) then es_doblock menu/mapmenu_1_0
}

block mapmenu2
{
es_setinfo event_var(userid) 5
es ma_msay 0 event_var(userid) Maps Menu\n->1 de_cbble \n->2 de_chateau\n->3 de_dust\n->4 de_dust2\n->5 de_inferno\n->6 de_nuke\n->7 de_piranesi\n->8 Back \n->9 More\n0 Exit
}

block mapmenu2_handlemenu
{
if (event_var(commandstring) = 1) then es_doblock menu/mapmenu_2_1
if (event_var(commandstring) = 2) then es_doblock menu/mapmenu_2_2
if (event_var(commandstring) = 3) then es_doblock menu/mapmenu_2_3
if (event_var(commandstring) = 4) then es_doblock menu/mapmenu_2_4
if (event_var(commandstring) = 5) then es_doblock menu/mapmenu_2_5
if (event_var(commandstring) = 6) then es_doblock menu/mapmenu_2_6
if (event_var(commandstring) = 7) then es_doblock menu/mapmenu_2_7
if (event_var(commandstring) = 8) then es_doblock menu/mapmenu_2_8
if (event_var(commandstring) = 9) then es_doblock menu/mapmenu_2_9
if (event_var(commandstring) = 10) then es_doblock menu/mapmenu_2_0
}

block mapmenu3
{
es_setinfo event_var(userid) 6
es ma_msay 0 event_var(userid) Maps Menu\n->1 de_port\n->2 de_prodigy\n->3 de_tides\n->4 de_train\n->5 Back\n0 Exit
}

block mapmenu3_handlemenu
{
if (event_var(commandstring) = 1) then es_doblock menu/mapmenu_3_1
if (event_var(commandstring) = 2) then es_doblock menu/mapmenu_3_2
if (event_var(commandstring) = 3) then es_doblock menu/mapmenu_3_3
if (event_var(commandstring) = 4) then es_doblock menu/mapmenu_3_4
if (event_var(commandstring) = 5) then es_doblock menu/mapmenu_3_5
if (event_var(commandstring) = 6) then es_doblock menu/mapmenu_3_6
if (event_var(commandstring) = 7) then es_doblock menu/mapmenu_3_7
if (event_var(commandstring) = 8) then es_doblock menu/mapmenu_3_8
if (event_var(commandstring) = 9) then es_doblock menu/mapmenu_3_9
if (event_var(commandstring) = 10) then es_doblock menu/mapmenu_3_0
}

//Player Menu

block menu_1
{
es_cexec event_var(userid) settings
menuexit
choose
}

block menu_2
{
es_cexec event_var(userid) !votemenu
choose
}

block menu_3
{
es ma_resetrank event_var(es_steamid)
menuexit
choose
}

block menu_4
{
menuexit
nochoice
}

block menu_5
{
menuexit
nochoice
}

block menu_6
{
menuexit
nochoice
}

block menu_7
{
menuexit
nochoice
}

block menu_8
{
menuexit
nochoice
}

block menu_9
{
menuexit
nochoice
}

block menu_0
{
menuexit
nochoice
}

//Bot Menu

block botmenu_1
{
if (server_var(count) = "1") do
  {
   es_setinfo bot_quota 1
   menuexit
   choose
  }
else do
  {
   es ma_votercon "Should We Add 1 Bot?" bot_quota 1
   menuexit
   choose
  } 
}

block botmenu_2
{
if (server_var(count) = "1") do
  {
   es_setinfo bot_quota 3
   menuexit
   choose
  }
else do
  {
   es ma_votercon "Should We Add 3 Bots?" bot_quota 3
   menuexit
   choose
  } 
}

block botmenu_3
{
if (server_var(count) = "1") do
  {
   es_setinfo bot_quota 0
   menuexit
   choose
  }
else do
  {
   es ma_votercon "Should We Bot Kick?" bot_quota 0
   menuexit
   choose
  } 
}

block botmenu_4
{
es_cexec event_var(userid) !menu
menuexit
choose
}

block botmenu_5
{
menuexit
nochoice
}

block botmenu_6
{
menuexit
nochoice
}

block botmenu_7
{
menuexit
nochoice
}

block botmenu_8
{
menuexit
nochoice
}

block botmenu_9
{
menuexit
nochoice
}

block botmenu_0
{
menuexit
nochoice
}

//Vote Menu

block votemenu_1
{
if (server_var(admin) = "0") do
  {
   es_cexec event_var(userid) !mapmenu1
   choose
  }
else do
  {
   es_tell event_var(userid) #green Please ask admin to start a vote to change the Map... 
   menuexit
   choose
  }
}

block votemenu_2
{
if (server_var(admin) = "0") do
  {
   es_cexec event_var(userid) !botmenu
   choose
  }
else do
  {
   es_tell event_var(userid) #green Please ask admin to start a vote to change the bots... 
   menuexit
   choose
  }
}

block votemenu_3
{
if (server_var(admin) = "0") do
  {
   es_setinfo sv_gravity 150
   es_msg #green Low Gravity is now enabled...
   menuexit
   choose
  }
else do
  {
   es_tell event_var(userid) #green Please ask admin to start a vote to set Low Gravity...
   menuexit
   choose
  }
}

block votemenu_4
{
if (server_var(admin) = "0") do
  {
   es_setinfo sv_gravity 800
   es_msg #green Normal Gravity is now enabled...
   menuexit
   choose
  }
else do
  {
   es_tell event_var(userid) #green Please ask admin to start a vote to set Normal Gravity...
   menuexit
   choose
  }
}

block votemenu_5
{
if (server_var(admin) = "0") do
  {
   es_setinfo mp_friendlyfire 1
   es_msg #green Friendly Fire is now enabled...
   menuexit
   choose
  }
else do
  {
   es_tell event_var(userid) #green Please ask admin to start a vote to turn on Friendly Fire...
   menuexit
   choose
  }
}

block votemenu_6
{
if (server_var(admin) = "0") do
  {
   es_setinfo mp_friendlyfire 0
   es_msg #green Friendly Fire is now disabled...
   menuexit
   choose
  }
else do
  {
   es_tell event_var(userid) #green Please ask admin to start a vote to turn off Friendly Fire...
   menuexit
   choose
  }
}

block votemenu_7
{
if (server_var(admin) = "0") do
  {
   es_setinfo sv_alltalk 1
   es_msg #green All Talk is now enabled...
   menuexit
   choose
  }
else do
  {
   es_tell event_var(userid) #green Please ask admin to start a vote to turn on All Talk...
   menuexit
   choose
  }
}

block votemenu_8
{
if (server_var(admin) = "0") do
  {
   es_setinfo sv_alltalk 0
   es_msg #green All Talk is now disabled...
   menuexit
   choose
  }
else do
  {
   es_tell event_var(userid) #green Please ask admin to start a vote to turn off All Talk...
   menuexit
   choose
  }
}

block votemenu_9
{
es_cexec event_var(userid) !menu
menuexit
choose
}

block votemenu_0
{
menuexit
nochoice
}

//Map Menu

block mapmenu_1_1
{
if (server_var(count) = "1") do
  {
   changelevel cs_assault
   menuexit
   choose
  }
else do
  {
   ma_votercon "Change Map To cs_assault" nextlevel cs_assault
   menuexit
   choose
  }
}

block mapmenu_1_2
{
if (server_var(count) = "1") do
  {
   changelevel cs_compound
   menuexit
   choose
  }
else do
  {
   ma_votercon "Change Map To cs_compound" nextlevel cs_compound
   menuexit
   choose
  }
}

block mapmenu_1_3
{
if (server_var(count) = "1") do
  {
   changelevel cs_havana
   menuexit
   choose
  }
else do
  {
   ma_votercon "Change Map To cs_havana" nextlevel cs_havana
   menuexit
   choose
  }
}

block mapmenu_1_4
{
if (server_var(count) = "1") do
  {
   changelevel cs_italy
   menuexit
   choose
  }
else do
  {
   ma_votercon "Change Map To cs_italy" nextlevel cs_italy
   menuexit
   choose
  }
}

block mapmenu_1_5
{
if (server_var(count) = "1") do
  {
   changelevel cs_militia
   menuexit
   choose
  }
else do
  {
   ma_votercon "Change Map To cs_militia" nextlevel cs_militia
   menuexit
   choose
  }
}

block mapmenu_1_6
{
if (server_var(count) = "1") do
  {
   changelevel cs_office
   menuexit
   choose
  }
else do
  {
   ma_votercon "Change Map To cs_office" nextlevel cs_office
   menuexit
   choose
  }
}

block mapmenu_1_7
{
if (server_var(count) = "1") do
  {
   changelevel de_aztec
   menuexit
   choose
  }
else do
  {
   ma_votercon "Change Map To de_aztec" nextlevel de_aztec
   menuexit
   choose
  }
}

block mapmenu_1_8
{
es es_cexec event_var(userid) !votemenu
choose
}

block mapmenu_1_9
{
es es_cexec event_var(userid) !mapmenu2
choose
}

block mapmenu_1_0
{
menuexit
nochoice
}

block mapmenu_2_1
{
if (server_var(count) = "1") do
  {
   changelevel de_cbble
   menuexit
   choose
  }
else do
  {
   ma_votercon "Change Map To de_cbble" nextlevel de_cbble
   menuexit
   choose
  }
}

block mapmenu_2_2
{
if (server_var(count) = "1") do
  {
   changelevel de_chateau
   menuexit
   choose
  }
else do
  {
   ma_votercon "Change Map To de_chateau" nextlevel de_chateau
   menuexit
   choose
  }
}

block mapmenu_2_3
{
if (server_var(count) = "1") do
  {
   changelevel de_dust
   menuexit
   choose
  }
else do
  {
   ma_votercon "Change Map To de_dust" nextlevel de_dust
   menuexit
   choose
  }
}

block mapmenu_2_4
{
if (server_var(count) = "1") do
  {
   changelevel de_dust2
   menuexit
   choose
  }
else do
  {
   ma_votercon "Change Map To de_dust2" nextlevel de_dust2
   menuexit
   choose
  }
}

block mapmenu_2_5
{
if (server_var(count) = "1") do
  {
   changelevel de_inferno
   menuexit
   choose
  }
else do
  {
   ma_votercon "Change Map To de_inferno" nextlevel de_inferno
   menuexit
   choose
  }
}

block mapmenu_2_6
{
if (server_var(count) = "1") do
  {
   changelevel de_nuke
   menuexit
   choose
  }
else do
  {
   ma_votercon "Change Map To de_nuke" nextlevel de_nuke
   menuexit
   choose
  }
}

block mapmenu_2_7
{
if (server_var(count) = "1") do
  {
   changelevel de_piranesi
   menuexit
   choose
  }
else do
  {
   ma_votercon "Change Map To de_piranesi" nextlevel de_piranesi
   menuexit
   choose
  }
}

block mapmenu_2_8
{
es es_cexec event_var(userid) !mapmenu1
choose
}

block mapmenu_2_9
{
es es_cexec event_var(userid) !mapmenu3
choose
}

block mapmenu_2_0
{
menuexit
nochoice
}

block mapmenu_3_1
{
if (server_var(count) = "1") do
  {
   changelevel de_port
   menuexit
   choose
  }
else do
  {
   ma_votercon "Change Map To de_port" nextlevel de_port
   menuexit
   choose
  }
}

block mapmenu_3_2
{
if (server_var(count) = "1") do
  {
   changelevel de_prodigy
   menuexit
   choose
  }
else do
  {
   ma_votercon "Change Map To de_prodigy" nextlevel de_prodigy
   menuexit
   choose
  }
}

block mapmenu_3_3
{
if (server_var(count) = "1") do
  {
   changelevel de_tides
   menuexit
   choose
  }
else do
  {
   ma_votercon "Change Map To de_tides" nextlevel de_tides
   menuexit
   choose
  }
}

block mapmenu_3_4
{
if (server_var(count) = "1") do
  {
   changelevel de_train
   menuexit
   choose
  }
else do
  {
   ma_votercon "Change Map To de_train" nextlevel de_train
   menuexit
   choose
  }
}
block mapmenu_3_5
{
es es_cexec event_var(userid) !mapmenu2
choose
}

block mapmenu_3_6
{
menuexit
nochoice
}

block mapmenu_3_7
{
menuexit
nochoice
}

block mapmenu_3_8
{
menuexit
nochoice
}

block mapmenu_3_9
{
menuexit
nochoice
}

block mapmenu_3_0
{
menuexit
nochoice
}


Any suggestions or improvements are welcome. Please let me know if it has any issues. Thanks

1st version released May 30, 2006 v1.0
2nd version released June 02, 2006 v1.1
changelog:
1. Reordered the menu's
2. Hopefully fixed the issue with menu's being cancelled by someone else typing "menu".
3. Added admin lock out's
4. Hopefully got the player count working properly
Can't think of all the things I did truth be told but the script is alot more stable. Please I need feedback on bugs and undesired affects.

June 8, 2006 I have discontinued working on this script the count situation has not been stable enough for the needs of this script. I'm not blaming ES I'm blaming myself. I just can't get it organized enough to consider this stable enough for people to use on thier servers with confidence. Sorry hope someone will continue it and refine it as intended.


Last edited by neiltoe on 2006-06-08, 2:30 pm, edited 25 times in total.




User avatar
New User
Profile

Posts: 16
Location:
NYC
 
New postPosted: 2006-05-23, 6:46 am 

Just wanted to know is it just one bot? Or can the person add more than one bot? If you can have more than one bot is there a way you can make it where there can only be one bot added for the whole server? Thanks


User avatar
Reader
Profile

Posts: 78
 
New postPosted: 2006-05-23, 6:47 am 

very cool idea.

One question though:
If you are alone and keep adding bots, are all the bots kicked when some1 joins, or just one? Unless you are only able to add one bot ;)

_________________
89.144.15.36:27215 [de_dust2] - your fav d2 server, clearly


User avatar
Reader
Profile

Posts: 79
 
New postPosted: 2006-05-23, 4:38 pm 

It is for 1 bot only. It's to just keep that single person busy while they wait. If you are admin you can add as many bots as you please using bot_add. Also if your admin there is no reason to use the alone menu it was intended for non admin.

edit: I actually see the code error I'll revise it so it keeps it to 1 bot only. Thanks for bringing this up.


User avatar
New User
Profile

Posts: 7
 
New postPosted: 2006-05-23, 9:28 pm 

Very nice idea. :)


User avatar
Reader
Profile

Posts: 79
 
New postPosted: 2006-05-23, 10:08 pm 

Notice: Revision made after this post please redownload.

I added a 30 second timer to the menu functions. If you are admin and use the alone menu please please press "0" if you decide not to use the menu or your admin menu options for "1" and "2" will be add a bot or change the map accordingly for 30 seconds. After 30 seconds has expired you it will no longer effect the Mani Admin Menu. Bot kick after a live player joins will take effect at the begining of the next round. I recommend adding an advertisement to your Mani Admin that lets people know the option exists. I did try to set some form of advertisement but I found it sloppy.

Enjoy

_________________
aim - neiltoe
xfire - neiltoe

Homepage - http://mp-css.sidcomm.co.in/


User avatar
Regular
Profile

Posts: 158
 
New postPosted: 2006-05-24, 12:50 am 

ok i changed bot_add to bot_quota 3 and bot_kick to bot_quota 0 which works fine but only for 1 round then you have to say alone agin for each round.


User avatar
Reader
Profile

Posts: 79
 
New postPosted: 2006-05-24, 3:04 am 

Well I only intended to add a single bot. The reason for the script is to attract another person to the server. Personally I have noticed that people do NOT prefer playing bots. So the intention was to simply keep a single person busy while waiting. I know I have joined servers that are empty or filled with bots and just found myself wanting. I'm sure the script could be editted to your desired 3 bots to 1 real person. But its a major turn off to most people looking for some competition.

_________________
aim - neiltoe
xfire - neiltoe

Homepage - http://mp-css.sidcomm.co.in/


User avatar
Regular
Profile

Posts: 158
 
New postPosted: 2006-05-24, 8:31 am 

i found the prob and fixed a setting so it works fine now


User avatar
Reader
Profile

Posts: 79
 
New postPosted: 2006-05-24, 9:37 am 

Good to hear that. Care to share it with everyone. I'm sure there are others that like to keep a bot_quota.

_________________
aim - neiltoe
xfire - neiltoe

Homepage - http://mp-css.sidcomm.co.in/


User avatar
Regular
Profile

Posts: 158
 
New postPosted: 2006-05-24, 12:42 pm 

Code:
    if (event_var(commandstring) equalto "1") then bot_add

    if (server_var(alone_count) greaterthan "2") then bot_kick


where it says bot_add change to bot_quota 3(how many bots to add)

where it says bot_kick change to bot_quota 0

change the "2" to how many bots + yourself(or user) you want to maintain


User avatar
New User
Profile

Posts: 6
 
New postPosted: 2006-05-27, 10:03 am 

where do i have to use this lines?


User avatar
Regular
Profile

Posts: 158
 
New postPosted: 2006-05-27, 11:24 am 

neiltoe has redone the script to add bot amount feature redownload and try it


User avatar
Expert
Profile

Posts: 1059
Location:
Belgium
 
New postPosted: 2006-05-27, 6:28 pm 

Ok someone found some bugs in this and asked me to make an addon of that kind for him. So I just decided to post it as another example.
Here's how it is:
-In the "block load" part you can change the following things:
es_xsetinfo ima_status on - use on/off whether you want it to be running on plugin load so usually server start or not
es_xsetinfo ima_plugin es_tools - use mani or es_tools depending on which of these plugins you're running on your server (for the menus)
es_xsetinfo ima_automenu yes - yes/no this determines whether to automatically show manu to player at spawn if he's completely alone (bots included in this count)
es_xsetinfo ima_autobotkick yes - if bots should be kicked when a second player joins or not
PS: autobotkick will not allow you to even manually add bots to your server when there is more then 1 player on the server. So there will never be any bot on server where at least 2 players.
The three remaining commands in the "block load" part are the menu string. For the maps you can change the string to your liking but you will have to change some "if" statements in the "es_client_command" part too.

The menus:
Main page:
You're alone. What do you want to do ?
1.Play with bots
2.Remove bots
3.Change map
4.Nothing


Bots page:
How many ?
1.Only one
2.Two please
3.Ok gimme 5 of them
4.Just fill the server


Maps page:
Which one ?
1.De_Dust
2.De_Dust2
3.Cs_Assault
4.As_Crisis
5.De_Aztec
6.Cs_Italy
7.Cs_Office


To change the maps modify the maps string as you like and have a look in the "es_client_command" part and change the following:
Code:
if(event_var(commandstring) = 1) then changelevel de_dust
if(event_var(commandstring) = 2) then changelevel de_dust2
if(event_var(commandstring) = 3) then changelevel cs_assault
if(event_var(commandstring) = 4) then changelevel as_crisis
if(event_var(commandstring) = 5) then changelevel de_aztec
if(event_var(commandstring) = 6) then changelevel cs_italy
if(event_var(commandstring) = 7) then changelevel cs_office

Change the map names there. You can copy-paste to add more lines up to 9 maps or remove some. Then if you changed the number of maps also change this a little above:
Code:
if(event_var(commandstring) > 7) do

Change the 7 to whatever the number of maps you're using.

_________________
-=McFly=-


Last edited by McFly on 2006-05-27, 6:36 pm, edited 2 times in total.

User avatar
New User
Profile

Posts: 6
 
New postPosted: 2006-05-27, 6:34 pm 
   Post subject: someone

was me...thanks to nailtoe and special thanks to mcfly who is my personal hero lol...
you can test that script on our servers if you want...www.musketier-clan.de...try it on our clan server its free the most time ^^


User avatar
Regular
Profile

Posts: 158
 
New postPosted: 2006-05-27, 9:10 pm 

looking good mcfly thanks,

Is there a way instead of hard coding your bots amount user can just in put 1- whatever(like a toggle the more you hit the the couynt for bots increase same with gravity(decrease by 50) is defined and can gravity also be added so user can do 800 - to what ever is defined?

but map part is okay

this is for whoever wants to continue or make this type of script.


User avatar
Newbie
Profile

Posts: 52
 
New postPosted: 2006-05-27, 9:22 pm 

I can't seem to get this working at all.

I join the server and type alone and nothing happens.

Uploaded to... cstrike\addons\eventscripts\timeleft\es_alone.txt

Added es_load alone to cfg\autoexec.cfg

Eventscripts 0.9.5.1 installed.
Mani Admin used on server.

Copy of es_alone.txt
Quote:
event server
{
es_setinfo bot_count 3 //Set how many bots you want here I recommend an odd number
es_setinfo alone_count 1
}

event player_disconnect
{
es_doblock alone/check
}

event player_activate
{
if (server_var(alone_count) equalto "1") then es_msg #green You seem to be alone type 'alone' to see our options...
}

event player_say
{
if (event_var(text) equalto "alone") then es_doblock alone/alone
}

event round_end
{
es_doblock alone/check
}

block check
{
es_setinfo u_count 0
es_setinfo c_count 0
es_setinfo t_count 0
es_setinfo s_count 0
es_setinfo u_count 1
es_setinfo alone_count server_var(bot_count)
es_getplayercount c_count 3
es_getplayercount t_count 2
es_getplayercount s_count 1
es_math u_count + server_var(bot_count)
es_math alone_count + server_var(c_count)
es_math alone_count + server_var(t_count)
es_math alone_count + server_var(s_count)
es_math alone_count - server_var(bot_count)
if (server_var(alone_count) greaterthan server_var(u_count)) then bot_quota 0
if (server_var(alone_count) equalto server_var(bot_count)) then bot_quota 0
}

block alone
{
es_setinfo c_count 0
es_setinfo t_count 0
es_setinfo s_count 0
es_setinfo alone_count server_var(bot_count)
es_getplayercount c_count 3
es_getplayercount t_count 2
es_getplayercount s_count 1
es_math alone_count + server_var(c_count)
es_math alone_count + server_var(t_count)
es_math alone_count + server_var(s_count)
es_math alone_count - server_var(bot_count)
if (server_var(alone_count) equalto "1") do
{
es ma_msay 15 event_var(es_username) server_var(hostname)\n \nAlone Menu\n \nUntil another player joins \nThese are your options:\n \n1. Add server_var(bot_count) Bot(s)\n2. Change map to server_var(mani_nextmap)\n0. Exit
}
}

block botadd
{
es_setinfo c_count 0
es_setinfo t_count 0
es_setinfo s_count 0
es_setinfo alone_count server_var(bot_count)
es_getplayercount c_count 3
es_getplayercount t_count 2
es_getplayercount s_count 1
es_math alone_count + server_var(c_count)
es_math alone_count + server_var(t_count)
es_math alone_count + server_var(s_count)
es_math alone_count - server_var(bot_count)
if (server_var(alone_count) equalto "1") then bot_quota server_var(bot_count)
}

block changemap
{
es_setinfo c_count 0
es_setinfo t_count 0
es_setinfo s_count 0
es_setinfo alone_count server_var(bot_count)
es_getplayercount c_count 3
es_getplayercount t_count 2
es_getplayercount s_count 1
es_math alone_count + server_var(c_count)
es_math alone_count + server_var(t_count)
es_math alone_count + server_var(s_count)
es_math alone_count - server_var(bot_count)
if (server_var(alone_count) equalto "1") then changelevel server_var(mani_nextmap)
}

block exit
{
if (server_var(alone_count) equalto "1") then es_setinfo alone_count 0
}

event es_client_command
{
if (event_var(command) equalto menuselect) do
{
if (event_var(commandstring) equalto 1) then es_doblock alone/botadd
}
if (event_var(commandstring) equalto 2) do
{
if (server_var(alone_count) equalto "1") then es_doblock alone/changemap
}
if (event_var(command) equalto menuselect) do
{
if (event_var(commandstring) equalto 3) then es_doblock exit
}
}



Anyone see the problem ?

:roll:


User avatar
Reader
Profile

Posts: 111
 
New postPosted: 2006-05-27, 10:27 pm 

problem is, if you are doing an es_load alone, then you need to load es_alone.txt from the proper folder....

You put: Uploaded to... cstrike\addons\eventscripts\timeleft\es_alone.txt

When you should have put: Uploaded to... cstrike\addons\eventscripts\alone\es_alone.txt

That should fix things for you

_________________
Image


Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 53 posts ]  Go to page 1, 2, 3  Next


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group