ID:148955
 
mob/Login()
if(usr.client.address == world.address)
usr.verbs += typesof(/client/Host/verb)

Ok im trying to use this to give the host of the game the host verbs, so far it doesnt work, im wondering if i did something wrong or if there is another way to do this?
Use src instead of usr at Login!

mob/Login()
if(!src.client.address)
src.verbs += typesof(/client/Host/verb)

Thiefy
mob/Login()
if((src.client.address == world.address) || (src.client.address == null))
//blah blah



-Sariat
In response to Thief Jack
Thief jack wrote:
Use src instead of usr at Login!

mob/Login()
if(!src.client.address)
src.verbs += typesof(/client/Host/verb)

Thiefy

Lol whats the !src.client.address for? that wouldnt serve the purpose, also Src never worked i tried it before
In response to WildBlood
WildBlood wrote:
Lol whats the !src.client.address for? that wouldnt serve the purpose, also Src never worked i tried it before

In Login(), usr is theoretically equal to src; that's why you can use it at all. But src is actually what you should be using anyway.

Lummox JR
I believe reading that in some cases especially with isps and firewalls that world.address may not equal the host.client.address.
Actually, from what experience I have with it, the person hosting the game has a client.address with a null value. However, I am not certain that this holds true in all circumstances. I have not tested this with hosting with dream daemon. Unless someone decides to test that possibility, I will tell you that an effective way to see who really is the host of game is to see which person has a null client.address. I posted a demo that shows this as well.

-Koshigia-
In response to Exadv1
Hmm good point, well then does anyone have another way of giving the host the priviliages that doest hardcode gms or use variables to store the host?
In response to WildBlood
Mine works....
In response to Sariat
mob/Login()
..()
if(isnull(src.client.address) || src.client.address == world.address || src.client.address == "127.0.0.1")
verbs += kakaka

That covers if your hosting on daemon and local host things.