ULX

Author Topic: How you did...  (Read 2176 times)

0 Members and 1 Guest are viewing this topic.

Offline Chironex

  • Full Member
  • ***
  • Posts: 197
  • Karma: 11
  • Formerly known as Kyzer
How you did...
« 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 :)

Offline spbogie

  • Ulysses Team Member
  • Sr. Member
  • *****
  • Posts: 456
  • Karma: 41
Re: How you did...
« Reply #1 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.
I have not failed. I've just found 10,000 ways that won't work. - Thomas A. Edison
I reject your reality and substitute my own. - Adam Savage

Offline Chironex

  • Full Member
  • ***
  • Posts: 197
  • Karma: 11
  • Formerly known as Kyzer
Re: How you did...
« Reply #2 on: August 05, 2007, 09:58:29 PM »
Oh right, i will try it, thanks :)