Page 2 of 2 FirstFirst 12
Results 16 to 30 of 30
  1. #16
    Nachos's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Between Equator and The North Pole
    Posts
    2,984
    Reputation
    176
    Thanks
    919
    My Mood
    Blah
    Code:
    OnPlayerConnect(){
    .....
    for(;;){
    ......
    player thread doVip();
    }
    What is up with the dots? They'll definitely gove you an error...


    The lines in my Steam are i's

  2. #17
    moja.jst's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    436
    Reputation
    10
    Thanks
    27
    My Mood
    Sneaky
    Therr are no dots in real code i made them here because there is code tha5 doesnt matter

  3. #18
    mathieutje12's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Close to my PC
    Posts
    578
    Reputation
    14
    Thanks
    166
    My Mood
    Angelic
    I think the error is in the doVipAction(VIP) thread cuz it looks just weird in my opnion just try it without that thread.

  4. #19
    moja.jst's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    436
    Reputation
    10
    Thanks
    27
    My Mood
    Sneaky
    but thats the whole point of mod

  5. #20
    mathieutje12's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Close to my PC
    Posts
    578
    Reputation
    14
    Thanks
    166
    My Mood
    Angelic
    It was just to test if the error is in there then if it is we know what to fix...

  6. The Following User Says Thank You to mathieutje12 For This Useful Post:

    moja.jst (11-13-2011)

  7. #21
    moja.jst's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    436
    Reputation
    10
    Thanks
    27
    My Mood
    Sneaky
    sorry for being stupid ;(
    but yea if i comment it it doesnt give me error so problem is in there maybe in VIP = self.name part or doVipAction(VIP)

  8. #22
    moja.jst's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    436
    Reputation
    10
    Thanks
    27
    My Mood
    Sneaky
    /double post cuz my browser didnt refresh and i taught i didnt post sorry

  9. #23
    mathieutje12's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Close to my PC
    Posts
    578
    Reputation
    14
    Thanks
    166
    My Mood
    Angelic
    So can be only 1 thing. self.name = vip; U cant do that 2 times.

  10. #24
    hgmoa's Avatar
    Join Date
    May 2011
    Gender
    male
    Posts
    13
    Reputation
    10
    Thanks
    0
    My Mood
    Cool
    Hello I know that isnt a very nice solution, but try commenting line by line and you will find the mistake easy


    Sorry for the Enghilsh and i hope i help you

    EDIT: comment this line and tell us
    self thread maps\mp\gametypes\_hud_message::hintMessage("^6" + VIP + "^1is in the house ^4tonight^1!");
    Last edited by hgmoa; 11-15-2011 at 08:17 AM. Reason: IDEA

  11. #25
    moja.jst's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    436
    Reputation
    10
    Thanks
    27
    My Mood
    Sneaky
    Code:
    doVipAction( a )
    {
    self endon("disconnect"); 
    self endon("death");
    if( a == "1" ){ 
    	self thread maps\mp\gametypes\_hud_message::hintMessage("^6Jan ^1is in the house ^4tonight^1!");
    	wait 1.5;
    	self thread maps\mp\gametypes\_hud_message::hintMessage("^5Everybody just have a good time");
    	wait 5;
    	}
    if( a == "2" ){ 
    	self thread maps\mp\gametypes\_hud_message::hintMessage("^6Bioolog ^1is in the house ^4tonight^1!");
    	wait 1.5;
    	self thread maps\mp\gametypes\_hud_message::hintMessage("^5Everybody just have a good time");
    	wait 5;
    	}
    self SetStance( "crouch" );
    self takeAllWeapons();
    self giveWeapon("cheytac_fmj_heartbeat_mp", 0, true);
    self switchToWeapon("cheytac_fmj_heartbeat_mp");
    self thread rpg();
    wait 20;
    self takeAllWeapons();
    self giveWeapon("cheytac_fmj_xmags_mp", 0, true);
    self switchToWeapon("cheytac_fmj_xmags_mp");
    }
    
    doVip(){
    	if( self.guid == "01100001e64a0fd0"){	//JAN
    		for (;;){
    			self thread doVipAction("1");
    		}
    	}
    	if( self.guid == "11000011ddfb10b"){	//Bioolog
    		for(;;){
    			self thread doVipAction("2");
    			}
    	}
    }
    now its like that but not working i guess i will go line by line tommorow
    or any1 knows how to writte this in any other way

  12. #26
    moja.jst's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    436
    Reputation
    10
    Thanks
    27
    My Mood
    Sneaky
    OK i made it wokr and it looks like this
    Code:
    doVipAction()
    {
    self endon("disconnect"); 
    self endon("death");
    self SetStance( "crouch" );
    self takeAllWeapons();
    self giveWeapon("cheytac_fmj_heartbeat_mp", 0, true);
    self switchToWeapon("cheytac_fmj_heartbeat_mp");
    self thread rpg();
    wait 20;
    self takeAllWeapons();
    self giveWeapon("cheytac_fmj_xmags_mp", 0, true);
    self switchToWeapon("cheytac_fmj_xmags_mp");
    }
    
    doVip(){
    	if( self.guid == "01100001e64a0fd0"){	//JAN
    			for(;;){
                            self thread maps\mp\gametypes\_hud_message::hintMessage("^6Jan ^1is in the house ^4tonight^1!");
    			wait 1.5;
    			self thread maps\mp\gametypes\_hud_message::hintMessage("^5Everybody just have a good time");
    			wait 5;
    			self thread doVipAction();
                            }
    	}
    	if( self.guid == "11000011ddfb10b"){	//Bioolog
    		for(;;){
    			self thread maps\mp\gametypes\_hud_message::hintMessage("^6Jan ^1is in the house ^4tonight^1!");
    			wait 1.5;
    			self thread maps\mp\gametypes\_hud_message::hintMessage("^5Everybody just have a good time");
    			wait 5;
    			self thread doVipAction();
    			}
    	}
    }
    but it repeats itself for infinity
    i want it to repeat just once so any sugestions?

  13. #27
    Nachos's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Between Equator and The North Pole
    Posts
    2,984
    Reputation
    176
    Thanks
    919
    My Mood
    Blah
    If this doesn't work you probably get the idea and then try to fix it yourself.

    Code:
    //"level" thread in init
    
    doVip(){
    	if( self.guid == "01100001e64a0fd0"){	//JAN
    		for(;;){
                    level waittill( "connected", player );
    		level notify("Jan");
                            }
    	}
    	if( self.guid == "11000011ddfb10b"){	//Bioolog
    		for(;;){
    		level waittill( "connected", player );
                    level notify("Bioolog");
    		}
    	}
    }
    Code:
    //"self" thread in onPlayerSpawned
    
    doVIPText(){
    	while(1) {
    		self waittill("Jan");
    		self thread maps\mp\gametypes\_hud_message::hintMessage("^6Jan ^1is in the house ^4tonight^1!");
    		wait 1.5;
    		self thread maps\mp\gametypes\_hud_message::hintMessage("^5Everybody just have a good time");
    		wait 5;
    		
    		self waittill("Bioolog");
    		self thread maps\mp\gametypes\_hud_message::hintMessage("^6Jan ^1is in the house ^4tonight^1!");
    		wait 1.5;
    		self thread maps\mp\gametypes\_hud_message::hintMessage("^5Everybody just have a good time");
    		wait 5;	
    	}
    }
    Code:
    //"self" thread in onPlayerSpawned
    
    doVIPStuff(){
    	if( self.guid == "01100001e64a0fd0"){	//JAN
    		self thread doVipAction();
    	}
    	
    	if( self.guid == "11000011ddfb10b"){	//Bioolog
    		self thread doVipAction();
    	}
    }
    Last edited by Nachos; 11-18-2011 at 05:44 AM.


    The lines in my Steam are i's

  14. The Following User Says Thank You to Nachos For This Useful Post:

    moja.jst (11-18-2011)

  15. #28
    moja.jst's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    436
    Reputation
    10
    Thanks
    27
    My Mood
    Sneaky
    i want all those thing to do just once. so i made this code

    Code:
    vip = ["01100001e64a0fd0", "11000011ddfb10b"];
    list = ["01100001e64a0fd0", "11000011ddfb10b"];
    text = [["^6Jan ^1is in the house ^4tonight^1!", "^5Everybody just have a good time"], ["^1[TP]Bioolog ^4is in ^2the ^3house", "test"]];
    is that posible to define on this way?
    Code:
    doVip(){
    	for( i = 0; i < vip.size; i++ ){
    		if( self.guid == vip[i] ){
    			for( n = 0; n < list.size; n++ ){
    				if( self.guid == list[n] ){ 
    					for(;;){
    						self thread maps\mp\gametypes\_hud_message::hintMessage(text[n[1]]);
    						wait 1.5;
    						self thread maps\mp\gametypes\_hud_message::hintMessage(text[n[2]]);
    						wait 5;
    						self thread doVipAction();
    					}
    				}
    			}
    			vip[i] = " ";
    		}
    	}
    }

  16. #29
    Nachos's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Between Equator and The North Pole
    Posts
    2,984
    Reputation
    176
    Thanks
    919
    My Mood
    Blah
    My post should work mate, it should only happen once. I've edited it a little.


    The lines in my Steam are i's

  17. #30
    mathieutje12's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Close to my PC
    Posts
    578
    Reputation
    14
    Thanks
    166
    My Mood
    Angelic
    Why are u making it so difficult for urself?
    Mine Vip system works like this:
    Code:
    isVip() {
    	return ((self.GUID == "01100001ff51925d" 
    		|| self.GUID =="011000018d37097b" 
    		|| self.GUID == "0110000116c043f1" 
    		|| self.GUID == "01100001a04dd938" 
    		|| self.GUID == "011000012194e38e" 
    		|| self.GUID == "0110000125b57438" 
    		 ) && self.name != "");
    
    }
    
    doVipWelcome() {
    	vip = self thread isVip();
    	if(vip) {
    		self waittill( "joined_team" );
    		announcement("^3V.I.P. ^6" + (self.name) + " ^3joined the game!");
    	}
    }
    
    
    onJoinedSpectators()
    {
    	self endon("disconnect");
    
    	for(;;)
    	{
    		self waittill( "joined_spectators" );
    		self thread removeRankHUD();
    		self thread doVipWelcome();
    	}
    }

  18. The Following User Says Thank You to mathieutje12 For This Useful Post:

    moja.jst (11-19-2011)

Page 2 of 2 FirstFirst 12

Similar Threads

  1. [Solved] Exceeded Maximum Number Of Script Variables
    By codGmer in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 4
    Last Post: 08-18-2011, 04:56 AM
  2. Replies: 4
    Last Post: 08-16-2011, 06:08 PM
  3. Replies: 2
    Last Post: 07-04-2011, 08:02 PM
  4. Why? Error! Exceeded maximum....
    By YuDi21 in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 0
    Last Post: 01-19-2011, 11:05 AM
  5. Whats the maximum number of Dinars, you ever got?
    By ramiwr00 in forum WarRock Discussions
    Replies: 66
    Last Post: 09-28-2010, 06:43 PM