Team Name Change & Team Choose Code

Forum Archive - from http://theuniversal.net
Locked
User avatar
Rikku
Posts: 273
Joined: Sat Apr 21, 2007 8:51 pm
Location: World

Team Name Change & Team Choose Code

Post by Rikku »

We should have a command to change a team name like

Examples

*changeteamname team 1,The Universal Monkeys
*changeteamname team 2,Navy
*changeteamname team 3,Army

Like that also
i would like a code to make you choose a team for the first time you get on
Example:

Code: Select all

Event( "PlayerLogin", 0 )
{
*setteam %player% team 1
or
*setteam %player% team 2
}
if that is not possible here is another

{
*setteam %player% team 1 chance 50%
*setteam %player% team 2 chance 50%
}
The first one in the code is the one i want is because i want people to chooose there team on login. If anything i said was posssible already please telll me and if there not yet made please consider them please!!!
User avatar
Mit
Staff
Staff
Posts: 3551
Joined: Sun Sep 21, 2003 10:14 pm
Location: Unknown

Post by Mit »

Code: Select all

Event( "PlayerLogin", 0 ) 
{ 
$random = Rand(2)
*setteam %PLAYER% $random
} 
.. will work on the 0.51.3 servers.

In english, the script is saying :
When a player logs in..
set the variable "$random" to a Random number between ( 1 and 2 )
do the command *setteam <PLAYERNAME> $random
i.e. if 'bob' logs in, the command is either
*setteam Bob 1
or
*setteam Bob 2
User avatar
Rikku
Posts: 273
Joined: Sat Apr 21, 2007 8:51 pm
Location: World

Post by Rikku »

I put that code in my events folder in the worlds data folder and i updated the version to the newest one 0.51.3 and it stilll doesnt work what did i do wrong!
User avatar
morbydvisns
Posts: 1889
Joined: Sun Jan 30, 2005 12:51 am

Post by morbydvisns »

servergamescript.mts goes in the server data folder

and type *reloadscript to load it into the server
User avatar
Rikku
Posts: 273
Joined: Sat Apr 21, 2007 8:51 pm
Location: World

Post by Rikku »

thank you
User avatar
Rikku
Posts: 273
Joined: Sat Apr 21, 2007 8:51 pm
Location: World

Post by Rikku »

Code: Select all

Event ( "PlayerLogin" )
{ 
*say 0 Welcome To Superior %player%! 
*say 0 Where you can find jobs to earn money, fight other players, and advance! 
}
Is There Anything Wrong With This Script! Its Saved As ServerGameScript.mts
It Wont Work Though If its Right! Also the server is running on 0.51.3!!!!! PLease Help If you Can!!
User avatar
morbydvisns
Posts: 1889
Joined: Sun Jan 30, 2005 12:51 am

Post by morbydvisns »

here's proper:

Code: Select all

Event ( "PlayerLogin", 0  )
{ 
*say Welcome To Superior %player%! 
*say Where you can find jobs to earn money, fight other players, and advance! 
}
Locked