Therr are no dots in real code i made them here because there is code tha5 doesnt matter
What is up with the dots? They'll definitely gove you an error...Code:OnPlayerConnect(){ ..... for(;;){ ...... player thread doVip(); }
The lines in my Steam are i's
Therr are no dots in real code i made them here because there is code tha5 doesnt matter
I think the error is in the doVipAction(VIP) thread cuz it looks just weird in my opnion just try it without that thread.
but thats the whole point of mod
It was just to test if the error is in there then if it is we know what to fix...
moja.jst (11-13-2011)
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)
/double post cuz my browser didnt refresh and i taught i didnt post sorry
So can be only 1 thing. self.name = vip; U cant do that 2 times.
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
now its like that but not working i guess i will go line by line tommorowCode: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"); } } }
or any1 knows how to writte this in any other way
OK i made it wokr and it looks like this
but it repeats itself for infinityCode: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(); } } }
i want it to repeat just once so any sugestions?
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
moja.jst (11-18-2011)
i want all those thing to do just once. so i made this code
is that posible to define on this way?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"]];
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] = " "; } } }
My post should work mate, it should only happen once. I've edited it a little.
The lines in my Steam are i's
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(); } }
moja.jst (11-19-2011)