ID:270133
 
people, i want to know how to do this on world.status :

-How much players can log in the world
-For how long the server is on
Pharaoh Atem wrote:
people, i want to know how to do this on world.status :

Make a variable for each thing you want to put into world.status.

-How much players can log in the world

var/max_players
client/verb/maximum_players(N as num)
max_players = N


-For how long the server is on

There is already a variable for this called time belonging to the world.

Put the variables into the status. For the time, you will want to update it every once in a while.
client/verb/maximum_players(N as num)
max_players = N
world.status = "[N] max players, [world.time/10] seconds running"
world/New()
spawn()time_status()
proc/time_status()
while(1)
sleep(300) //it will update about twice a minute with that
world.status = "[N] max players, [world.time/10] seconds running"

Try to make a function that displays it in hours, minutes and seconds rather than just seconds.
In response to Loduwijk
Loduwijk wrote:
Pharaoh Atem wrote:
people, i want to know how to do this on world.status :

Make a variable for each thing you want to put into world.status.

-How much players can log in the world

> var/max_players
> client/verb/maximum_players(N as num)
> max_players = N
>
> > -For how long the server is on
>
> There is already a variable for this called time belonging to the world.
>
> Put the variables into the status. For the time, you will want to update it every once in a while.
>

client/verb/maximum_players(N as num)
max_players = N
world.status = "[N] max players, [world.time/10] seconds running"
world/New()
spawn()time_status()
proc/time_status()
while(1)
sleep(300) //it will update about twice a minute with that
world.status = "[N] max players, [world.time/10] seconds running"
</dm>
Try to make a function that displays it in hours, minutes and seconds rather than just seconds.

mob
Login()
..()
var/servHost
var/mob/Player/lHost = new /mob/Player()
for(var/mob/i in world)
if (istype(i,/mob/Player))
if (i.client != null)
if(i.client.address == world.address)
servHost = i.name
lHost = i
if (servHost == null) servHost = "(Unknown)"
if (servHost == "(Unknown)")
for(var/mob/n in world)
if (istype(n,/mob/Player))
if (n.client != null)
if(length(n.client.address) < 3||n.client.address == "127.0.0.1"||n.client.address == "localhost")
servHost = n.name
lHost = n
if (servHost != currentHost)
lHost:hasHost = 1
spawn(20)
currentHost = servHost
//world.status = "Dragonball Power Struggle - hosted by [servHost]"
//world.name = "Dragonball Power Struggle - hosted by [servHost]"
lHost = null
del(lHost)
..()
CreateName()
Give_Name()
usr<<sound('title.mid',1)
speeding = 0
usr.AddHP()
if(usr != servHost)
amount_players ++
usr.icon = 'transparent.dmi'
src << "Click <a href=?readme>here</a> to download the readme, you will need this to play rightly on this update!!!."
if(servHost == "JeanPana")
world.status = "<B><font color = blue>2006 Version 10.0</font><font color = red></B>{</font><font color = blue><B>HOSTER :</B> [servHost]</font><font color = red>}</font> <font color = blue>Players logged in : [amount_players] </font>"
else
world.status = "<font color = blue>Version 10.0</font>{HOSTER : <b>[servHost]</b>} <font color = blue>Players logged in : [amount_players] </font> "
world.name = "Mega Man Batle of The Network v10.0"
if(prob(45)) // There's a 50 percent chance that this is true
usr.loc = locate(137,26,2) // Locate them to one title screen. Replace those vars with numbers
usr.verbs += /mob/verb/Say
client.view = 8
usr:AddBG10()
usr:Speed_Boost()
CheckBan(src)
else // The if was false
usr.loc = locate(279,41,1)
usr.verbs += /mob/verb/Say
client.view = 8
usr:AddBG10()
usr:Speed_Boost()
CheckBan(src)


can you aplly your code to my code?
In response to Pharaoh Atem
1. Any peice of code can be modified to do anything, if you couldnt do that, it wouldnt be programming, it would be... something else.

2. No exemple given on any forum anywhere is gona be formated to your specific needs. You will not be able to copy paste it into your code and expect it to work. Those are called libraries.

Answer : No, write your own from the given exemple.
In response to FranquiBoy
Well, that's not true. Number one, that is.

For example, stat() cannot be rewritten to display a person's suffix with red text instead of blue. Hell, you can't even make it display the mob with an altered name beside it without changing the name directly.
In response to FranquiBoy
FranquiBoy wrote:
1. Any peice of code can be modified to do anything, if you couldnt do that, it wouldnt be programming, it would be... something else.

2. No exemple given on any forum anywhere is gona be formated to your specific needs. You will not be able to copy paste it into your code and expect it to work. Those are called libraries.

Answer : No, write your own from the given exemple.

i dont understood his code
In response to Loduwijk
Loduwijk wrote:
Pharaoh Atem wrote:
people, i want to know how to do this on world.status :

Make a variable for each thing you want to put into world.status.

-How much players can log in the world

> var/max_players
> client/verb/maximum_players(N as num)
> max_players = N
>

-For how long the server is on

There is already a variable for this called time belonging to the world.

Put the variables into the status. For the time, you will want to update it every once in a while.
> client/verb/maximum_players(N as num)
> max_players = N
> world.status = "[N] max players, [world.time/10] seconds running"
> world/New()
> spawn()time_status()
> proc/time_status()
> while(1)
> sleep(300) //it will update about twice a minute with that
> world.status = "[N] max players, [world.time/10] seconds running"
>

Try to make a function that displays it in hours, minutes and seconds rather than just seconds.


i want do something like :
[players logged in]/[max players that can log in]
In response to Pharaoh Atem
Look up what you dont get here : http://www.byond.com/docs/ref/
In response to Pharaoh Atem
var/max_players     //Creates a new varible called max_players.
client/verb/maximum_players(N as num) //Creates a new verb that brings up a box that you can enter numbers into.
max_players = N //Sets max_players to N (the number you inputed).
world.status = "[max_players] players, [world.time/10] seconds running" //Changes the worlds status to, "<number> players, <time> seconds running.
world/New() //When the world is created.
spawn()time_status() //Call the time_status() procedure.
proc/time_status() //The time_status() procedure.
while(1)
sleep(300) //it will update about twice a minute with that
world.status = "[max_players] max players, [world.time/10] seconds running"


It's not really complicating if you examine what it says. I mean I don't fully "understood" your English, but I can kind of tell what it says by the words around it.

If you don't understand how to program, then maybe you should check out ZBT.