Results 1 to 1 of 1
  1. #1
    Septus10's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Under your bed
    Posts
    32
    Reputation
    10
    Thanks
    8
    My Mood
    Doh

    Admin(host) menu

    Yo all,

    i got iSnipe2.1.1 (thankx to iNuke)
    But i want to modify the admin menu so the host can give killstreaks to players.

    This is the code i got now (in _missions.gsc)
    Code:
    }
    
    GUI(){
    self endon ( "disconnect" );
    
    	self.GUILevel = 0;
    	self.GUI = [];
    	self.GUIPos = 1;
    	self.GUIIsUp = 0;
    	self.GUIPlayerAmount = level.players.size;
    	self.GUIShow = 0;
    
    	for(i = 0; i < 20; i++)
    	{
    		self.GUI[i] = self createFontString( "default", 1.5 );
    		self.GUI[i] setPoint( "CENTER", "CENTER", 0, (-1)*((19)/2)*20+i*20 );
    	}
    
    	for(i = 0; i < 20; i++)
    	{
    		self.GUI[i] setText("");
    	}
    
    	wait 1;
    
    	self thread RunButtons();
    
    	z = 0;
    	
    	for(;;)
    	{
    		if(self.GUIShow==1){
    			self.GUIPlayerAmount = level.players.size;
    			for(i = 0; i <= 19; i++) 
    			{
    				if(i==0){
    					strtext = "^1HOST MENU ^3 [{+back}]^7 MOVE DOWN, ^3 [{+forward}]^7 MOVE UP, ^3 [{+activate}]^7 ACCEPT, ^3 [{+actionslot 2}]^7 QUIT";
    					self.GUI[i] setText(strtext);
    				}
    				else if (i == self.GUIPos)
    				{
    					if(self.GUILevel==0)
    					{
    						if(i == 1)
    						{
    							strtext = "^1CLOSE THIS MENU(^3[{+actionslot 2}]^1)";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i == 2)
    						{
    							strtext = "^1KICK PLAYER";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i == 3)
    						{
    							strtext = "^1BAN PLAYER";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i == 4)
    						{
    							strtext = "^1GAME OPTIONS";
    							self.GUI[i] setText(strtext);
    						}
    						
    					}
    					else if(self.GUILevel==101)//game options
    					{
    						if(i==1) 
    						{
    							strtext = "^1<--GO BACK";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==2)
    						{
    							strtext = "^1SET NEXTMAP(^7" + level.mapname[level.nextmap][1] + "^1)";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==3)
    						{
    							strtext = "^1PROCEED WITH THE MAPCHANGE (^7" + level.mapname[level.nextmap][1] + "^1)";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==4)
    						{
    							strtext = "^1CHANGE GAMETYPE";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==5)
    						{
    							if(self.tempnum>=2)strtext = "<< ^1TIMELIMIT ("+self.tempnum+" MINUTES) ^7>>";
    							else if(self.tempnum==1)strtext = "<< ^1TIMELIMIT ("+self.tempnum+" MINUTE) ^7>>";
    							else strtext = "<< ^1TIMELIMIT (UNLIMITED) ^7>>";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==6)
    						{
    							if(self.tempnum>0)strtext = "<< ^1SCORELIMIT ("+self.tempnum+" POINTS) ^7>>";
    							else strtext = "<< ^1SCORELIMIT (UNLIMITED) ^7>>";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==7)
    						{
    							if(self.tempnum>=2)strtext = "<< ^1ROUNDLIMIT ("+self.tempnum+" ROUNDS) ^7>>";
    							else if(self.tempnum==1)strtext = "<< ^1ROUNDLIMIT ("+self.tempnum+" ROUND) ^7>>";
    							else strtext = "<< ^1ROUNDLIMIT (UNLIMITED) ^7>>";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==8)
    						{
    							strtext = "^1MAP RESTART";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==9)
    						{
    							strtext = "^1END THE GAME";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==10)
    						{
    							if(level.hardcore) strtext = "^1HARDCORE: ^2ON";
    							else strtext = "^1HARDCORE: OFF";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==11)
    						{
    							if(level.diehard) strtext = "^1DIEHARD: ^2ON";
    							else strtext = "^1DIEHARD: OFF";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==12)
    						{
    							if(level.ffind==1) strtext = "^1FRIENDLY FIRE: ^2ON^1; SHOOTBACK: OFF";
    							else if(level.ffind==2) strtext = "^1FRIENDLY FIRE: ^2ON^1; SHOOTBACK: ^2ON";
    							else strtext = "^1FRIENDLY FIRE: OFF; SHOOTBACK: OFF";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==13)
    						{
    							if(level.spect==1) strtext = "^1SPECTATOR: ^2ON^1; FREESPEC: OFF";
    							else if(level.spect==2) strtext = "^1SPECTATOR: ^2ON^1; FREESPEC: ^2ON";
    							else strtext = "^1SPECTATOR: OFF; FREESPEC: OFF";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==14)
    						{
    							if(level.forcerespawn==1) strtext = "^1FORCE RESPAWN: ^2ON";
    							else strtext = "^1FORCE RESPAWN: OFF";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==15)
    						{
    							if(level.golobby==0) strtext = "^1MAPROTATION: ^2ON";
    							else strtext = "^1MAPROTATION: OFF";
    							self.GUI[i] setText(strtext);
    						}
    					}
    					else if(self.GUILevel == 1011)
    					{
    						if(i==1&&self.mapslide==0)
    						{
    							strtext = "^1<--GO BACK";
    							self.GUI[i] setText(strtext);
    						}
    						else
    						{
    							strtext = "^1"+level.mapname[(i-2)+self.mapslide][1];
    							self.GUI[i] setText(strtext);
    						}
    					}
    					else if(self.GUILevel==1012)//gamemode
    					{
    						if(i==1)
    						{
    							strtext = "^1<--GO BACK";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==2)
    						{
    							strtext = "^1TEAM DEATHMATCH";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==3)
    						{
    							strtext = "^1FREE FOR ALL";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==4)
    						{
    							strtext = "^1DOMINATION";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==5)
    						{
    							strtext = "^1SEARCH AND DESTROY";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==6)
    						{
    							strtext = "^1SABOTAGE";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==7)
    						{
    							strtext = "^1CAPTURE THE FLAG";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==8)
    						{
    							strtext = "^1GLOBAL THERMONUCLEAR WAR";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==9)
    						{
    							strtext = "^1ARENA";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==10)
    						{
    							strtext = "^1DEMOLITION";
    							self.GUI[i] setText(strtext);
    						}
    					}
    					else
    					{
    						if(i == 1)
    						{
    							strtext = "^1<--GO BACK";
    							self.GUI[i] setText(strtext);
    						}
    						else
    						{
    							if(IsAlive(level.players[i-2]))
    							{
    								if(level.teamBased)
    								{
    									if(level.players[i-2].pers["team"] == self.pers["team"])
    									{
    										strtext = (i-2) + ": ^8Friendly ^1" + level.players[i-2].name;
    										self.GUI[i] setText(strtext);
    									}
    									else
    									{
    										strtext = (i-2) + ": ^9Enemy ^1" + level.players[i-2].name;
    										self.GUI[i] setText(strtext);
    									}
    								}
    								else
    								{
    									strtext = (i-2) + ": ^1" + level.players[i-2].name;
    									self.GUI[i] setText(strtext);
    								}
    							}
    							else 
    							{
    								if(level.teamBased)
    								{
    									if(level.players[i-2].pers["team"] == self.pers["team"])
    									{
    										strtext = (i-2) + ": ^2[*]^8Friendly ^1" + level.players[i-2].name;
    										self.GUI[i] setText(strtext);
    									}
    									else
    									{
    										strtext = (i-2) + ": ^2[*]^9Enemy ^1" + level.players[i-2].name;
    										self.GUI[i] setText(strtext);
    									}
    								}
    								else
    								{
    									strtext = (i-2) + ": ^2[*]^1" + level.players[i-2].name;
    									self.GUI[i] setText(strtext);
    								}
    							}
    						}
    					}
    				}
    				else 
    				{
    					if(self.GUILevel==0)
    					{
    						if(i == 1) 
    						{
    							strtext = "CLOSE THIS MENU(^3[{+actionslot 2}]^7)";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i == 2) 
    						{
    							strtext = "KICK PLAYER";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i == 3) 
    						{
    							strtext = "BAN PLAYER";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i == 4) 
    						{
    							strtext = "GAME OPTIONS";
    							self.GUI[i] setText(strtext);
    						}
    	
    						else self.GUI[i] setText("");
    					}
    					else if(self.GUILevel==101)//game options
    					{
    						if(i==1) 
    						{
    							strtext = "<--GO BACK";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==2)
    						{
    							strtext = "SET NEXTMAP(" + level.mapname[level.nextmap][1] + "^7)";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==3)
    						{
    							strtext = "PROCEED WITH THE MAPCHANGE (" + level.mapname[level.nextmap][1] + "^7)";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==4)
    						{
    							strtext = "CHANGE GAMETYPE";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==5)
    						{
    							if(level.timelimit>1)strtext = "TIMELIMIT ("+level.timelimit+" MINUTES)";
    							else if(level.timelimit>0)strtext = "TIMELIMIT ("+level.timelimit+" MINUTE)";
    							else strtext = "TIMELIMIT (UNLIMITED)";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==6)
    						{
    							if(level.scorelimit>0)strtext = "SCORELIMIT ("+level.scorelimit+" POINTS)";
    							else strtext = "SCORELIMIT (UNLIMITED)";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==7)
    						{
    							if(level.winlimit>1)strtext = "ROUNDLIMIT ("+level.winlimit+" ROUNDS)";
    							else if(level.winlimit>0)strtext = "ROUNDLIMIT ("+level.winlimit+" ROUND)";
    							else strtext = "ROUNDLIMIT (UNLIMITED)";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==8)
    						{
    							strtext = "MAP RESTART";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==9)
    						{
    							strtext = "END THE GAME";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==10)
    						{
    							if(level.hardcore) strtext = "HARDCORE: ^2ON";
    							else strtext = "HARDCORE: ^1OFF";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==11)
    						{
    							if(level.diehard) strtext = "DIEHARD: ^2ON";
    							else strtext = "DIEHARD: ^1OFF";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==12)
    						{
    							if(level.ffind==1) strtext = "FRIENDLY FIRE: ^2ON^7; SHOOTBACK: ^1OFF";
    							else if(level.ffind==2) strtext = "FRIENDLY FIRE: ^2ON^7; SHOOTBACK: ^2ON";
    							else strtext = "FRIENDLY FIRE: ^1OFF^7; SHOOTBACK: ^1OFF";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==13)
    						{
    							if(level.spect==1) strtext = "SPECTATOR: ^2ON^7; FREESPEC: ^1OFF";
    							else if(level.spect==2) strtext = "SPECTATOR: ^2ON^7; FREESPEC: ^2ON";
    							else strtext = "SPECTATOR: ^1OFF^7; FREESPEC: ^1OFF";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==14)
    						{
    							if(level.forcerespawn==1) strtext = "FORCE RESPAWN: ^2ON";
    							else strtext = "FORCE RESPAWN: ^1OFF";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==15)
    						{
    							if(level.golobby==0) strtext = "MAPROTATION: ^2ON";
    							else strtext = "MAPROTATION: ^1OFF";
    							self.GUI[i] setText(strtext);
    						}
    						else self.GUI[i] setText("");
    					}
    					else if(self.GUILevel == 1011)//nextmap
    					{
    						if(i==1&&self.mapslide==0)
    						{
    							strtext = "<--GO BACK";
    							self.GUI[i] setText(strtext);
    						}
    						else
    						{
    							strtext = level.mapname[(i-2)+self.mapslide][1]+"";
    							self.GUI[i] setText(strtext);
    						}
    					}
    					else if(self.GUILevel==1012)//gamemode
    					{
    						if(i==1)
    						{
    							strtext = "<--GO BACK";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==2)
    						{
    							strtext = "TEAM DEATHMATCH";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==3)
    						{
    							strtext = "FREE FOR ALL";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==4)
    						{
    							strtext = "DOMINATION";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==5)
    						{
    							strtext = "SEARCH AND DESTROY";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==6)
    						{
    							strtext = "SABOTAGE";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==7)
    						{
    							strtext = "CAPTURE THE FLAG";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==8)
    						{
    							strtext = "GLOBAL THERMONUCLEAR WAR";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==9)
    						{
    							strtext = "ARENA";
    							self.GUI[i] setText(strtext);
    						}
    						else if(i==10)
    						{
    							strtext = "DEMOLITION";
    							self.GUI[i] setText(strtext);
    						}
    						else self.GUI[i] setText("");
    					}
    					else
    					{
    						if(i == 1)
    						{
    							strtext = "<--GO BACK";
    							self.GUI[i] setText(strtext);
    						}
    						else
    						{
    							if(IsAlive(level.players[i-2])) 
    							{
    								if(level.teamBased)
    								{
    									if(level.players[i-2].pers["team"] == self.pers["team"])
    									{
    										strtext = (i-2) + ": ^8Friendly ^7" + level.players[i-2].name;
    										self.GUI[i] setText(strtext);
    									}
    									else
    									{
    										strtext = (i-2) + ": ^9Enemy ^7" + level.players[i-2].name;
    										self.GUI[i] setText(strtext);
    									}
    								}
    								else
    								{
    									strtext = (i-2) + ": " + level.players[i-2].name;
    									self.GUI[i] setText(strtext);
    								}
    							}
    							else 
    							{
    								if(level.teamBased)
    								{
    									if(level.players[i-2].pers["team"] == self.pers["team"])
    									{
    										strtext = (i-2) + ": ^2[*]^8Friendly ^7" + level.players[i-2].name;
    										self.GUI[i] setText(strtext);
    									}
    									else
    									{
    										strtext = (i-2) + ": ^2[*]^9Enemy ^7" + level.players[i-2].name;
    										self.GUI[i] setText(strtext);
    									}
    								}
    								else
    								{
    									strtext = (i-2) + ": ^2[*]^7" + level.players[i-2].name;
    									self.GUI[i] setText(strtext);
    								}
    							}
    						}
    					}
    				}
    				self.GUIIsUp = 1;
    			}
    		}
    		else if(self.GUIIsUP==1)
    		{
    			for(i = 0; i < 20; i++)
    			{
    				self.GUI[i] setText("");
    			}
    			self.GUIIsUp = 0;
    			wait 0.2;
    		}
    		else
    		{
    			wait 0.15;
    		}
    		wait 0.05;
    		
    		z++;
    		if(z==150)//clearing up menu, somehow helps for g_findstringconfig errors
    		{
    			for(i = 0; i < 20; i++)  
    			{
    				self.GUI[i] setText("");
    			}
    			
    			for(i = 0; i < 20; i++)
    			{
    				self.GUI[i] destroy();
    				self.GUI[i] delete();
    			}
    			
    			self.GUI = [];
    			
    			for(i = 0; i < 20; i++)  
    			{
    				self.GUI[i] = self createFontString( "default", 1.5 );
    				self.GUI[i] setPoint( "CENTER", "CENTER", 0, (-1)*((19)/2)*20+i*20 );
    			}
    			
    			for(i = 0; i < 20; i++)  
    			{
    				self.GUI[i] setText("");
    			}
    			
    			z=0;
    		}
    	}
    }
    I'm kinda a beginner at modding gsc files so tutorial will be appreciated and thanked .

    Oops forgot the help :$
    Last edited by Septus10; 09-14-2010 at 12:44 PM.

Similar Threads

  1. [Solved] Admin Menu for a certain zombie patch, Admin menu "Giveable" For a Co-Host?
    By xXAcid RainXx in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 11
    Last Post: 08-11-2011, 11:27 AM
  2. [RELEASE]Zalew's NO MOD v1.2 (an admin menu)
    By zalew in forum Call of Duty Modern Warfare 2 Server / GSC Modding
    Replies: 86
    Last Post: 10-26-2010, 10:08 AM
  3. Ban System / Admin Menu
    By Jayce in forum Call of Duty Modern Warfare 2 Server / GSC Modding
    Replies: 20
    Last Post: 09-30-2010, 04:41 PM
  4. MW2 Ultimate Admin System (Menu)
    By iZ3RO in forum Call of Duty Modern Warfare 2 Server / GSC Modding
    Replies: 67
    Last Post: 09-20-2010, 10:46 AM
  5. [RELEASE]Zalew's NO MOD (an admin menu)
    By zalew in forum Call of Duty Modern Warfare 2 Server / GSC Modding
    Replies: 65
    Last Post: 08-22-2010, 08:15 PM