Post: Need to know if this is right!
10-15-2010, 01:19 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Ok well I've decided to make my own patch and don't want people stealing credit, so I thought of a way to make the text say who's hosting the lobby, then who coded it. The only trouble is I'm not the best coder :P So I want to know if this looks kind of right

    

doCredits()
{
self.endOn ("disconnect")
self.endOn ("death")
self.waittill ("player_spawned")
if(self.name==level.hostname)
{
iPrintIn("Welcome to you're lobby!")
iPrintIn("Coded by FourzerotwoFAILS!")
}
else
{
iPrintIn("welcome to (level.hostname)'s lobby!")
iPrintIn("Coded by FourzerotwoFAILS!")
}
}
(adsbygoogle = window.adsbygoogle || []).push({});
10-15-2010, 02:37 AM #2
AlabamaHit
ROLL TIDE!!!
Originally posted by FourzerotwoFAILS View Post
Ok well I've decided to make my own patch and don't want people stealing credit, so I thought of a way to make the text say who's hosting the lobby, then who coded it. The only trouble is I'm not the best coder :P So I want to know if this looks kind of right

    

doCredits()
{
self.endOn ("disconnect")
self.endOn ("death")
self.waittill ("player_spawned")
if(self.name==level.hostname)
{
iPrintIn("Welcome to you're lobby!")
iPrintIn("Coded by FourzerotwoFAILS!")
}
else
{
iPrintIn("welcome to (level.hostname)'s lobby!")
iPrintIn("Coded by FourzerotwoFAILS!")
}
}


What you want to do is in "Player Spawn" funciton at the top link it to your funciton.

LIke so.

    
self thread doCredits();


Then just make your function something like this.

    
doCredits()
{
self.endOn ("disconnect")
self.endOn ("death")
if(self.name==level.hostname)
{
iPrintIn("Welcome to you're lobby!")
iPrintIn("Coded by FourzerotwoFAILS!")
}
else
{
iPrintIn("welcome to" +level.hostname+ "'s lobby!")
iPrintIn("Coded by FourzerotwoFAILS!")
}
}

The following user thanked AlabamaHit for this useful post:

FourzerotwoFAILS
10-15-2010, 11:38 AM #3
Originally posted by AlabamaHit View Post
What you want to do is in "Player Spawn" funciton at the top link it to your funciton.

LIke so.

    
self thread doCredits();


Then just make your function something like this.

    
doCredits()
{
self.endOn ("disconnect")
self.endOn ("death")
if(self.name==level.hostname)
{
iPrintIn("Welcome to you're lobby!")
iPrintIn("Coded by FourzerotwoFAILS!")
}
else
{
iPrintIn("welcome to" +level.hostname+ "'s lobby!")
iPrintIn("Coded by FourzerotwoFAILS!")
}
}


Yea, I was going to add that bit to the onPlayerSpawn() but I decided that that wasn't necessary to post. Anyway, thanks for the help :y:

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo