Ulysses

General => Off-Topic => Topic started by: Chironex on August 05, 2007, 09:16:47 PM

Title: How you did...
Post by: Chironex on August 05, 2007, 09:16:47 PM
On your server, you overwrite the connecting message "What happen now?" with your own message, can you tell me how you did?

I tried that in a new file that i placed into lua/autorun:

Code: [Select]
local function player_SetMsgUrl( ply )

ply:ConCommand("sv_messageurl http://www.the_new_url.here")
end
end
hook.Add( "PlayerConnect", "SetMsgUrl", player_SetMsgUrl )


local function player_RestoreMsgUrl( ply )

ply:ConCommand("sv_messageurl http://www.garrysmod.com/sv_messageurl")
end
end
hook.Add( "PlayerDisconnected", "RestoreMsgUrl", player_RestoreMsgUrl )

But it doesn't work :[, please help :)
Title: Re: How you did...
Post by: spbogie on August 05, 2007, 09:54:28 PM
notice the sv on sv_messageurl, that means it's a SERVER convar. Just set it in your config file.
Title: Re: How you did...
Post by: Chironex on August 05, 2007, 09:58:29 PM
Oh right, i will try it, thanks :)