Poll

Was any of these somewhat interesting or "cool"?

Yes, thank you :)
262 (96.7%)
No, do better next time :(
9 (3.3%)

Total Members Voted: 270

Author Topic: Player Connect/Disconnect Message [1.11v]  (Read 131291 times)

0 Members and 5 Guests are viewing this topic.

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Player Connect/Disconnect message
« Reply #30 on: August 02, 2013, 05:34:52 PM »
@ Chaos and Eccid where would I put these files? I don't know where to add it or extract it to.

Addons folder
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline kossan112

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Re: Player Connect/Disconnect message
« Reply #31 on: September 26, 2013, 06:00:51 AM »
Where shall i put the like lua file ?

So the lua file shall just be in addons?

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Player Connect/Disconnect message
« Reply #32 on: September 26, 2013, 01:44:20 PM »
Server 101 - Addons go into server's addons folder. (Though written for GMod <13, little has changed.
<gmod folder>\addons\player_join is what it should look like.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Player Connect/Disconnect message
« Reply #33 on: September 26, 2013, 07:36:12 PM »
Server 101 - Addons go into server's addons folder. (Though written for GMod <13, little has changed.
<gmod folder>\addons\player_join is what it should look like.

Thank you sir.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline night650

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: Player Connect/Disconnect message
« Reply #34 on: September 30, 2013, 10:57:17 PM »
where would i put this file? im having difficulties installing. sounds like a great concept.

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Player Connect/Disconnect message
« Reply #35 on: October 01, 2013, 12:08:28 AM »
where would i put this file? im having difficulties installing. sounds like a great concept.

you put the entire unzipped folder in the addons folder :p
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline Nkrow

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: Player Connect/Disconnect message
« Reply #36 on: October 03, 2013, 04:24:02 PM »
Hi chaos, thanks for this amazing plugin!

But, I want (like another user over there) to add the steam ID to the message. I tried this:

Code: [Select]
function player_spawn( data )
local name1 = data:ReadString()
local nickteamcolour1 = team.GetColor(data:ReadShort())
local steamid1 = data:ReadString()
chat.AddText( nickteamcolour1, name1, Color( 255, 255, 255 ), " has joined to the server.", "(" .. ply:SteamID() .. ")")
surface.PlaySound( "garrysmod/save_load1.wav" )
end
usermessage.Hook("player_spawn", player_spawn)

But it gave me error... =(

I hope you can help me :3 Thanks!

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: Player Connect/Disconnect message
« Reply #37 on: October 03, 2013, 05:44:55 PM »
What was the error?

Offline Nkrow

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: Player Connect/Disconnect message
« Reply #38 on: October 04, 2013, 04:02:04 AM »

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: Player Connect/Disconnect message
« Reply #39 on: October 04, 2013, 06:44:53 AM »
Post the contents of your cl_player.lua file.

Offline Nkrow

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: Player Connect/Disconnect message
« Reply #40 on: October 11, 2013, 04:29:36 AM »
// client side apple

// Spawn
function player_spawn( data )
local name1 = data:ReadString()
local nickteamcolour1 = team.GetColor(data:ReadShort())
local steamid1 = data:ReadString()
   chat.AddText( nickteamcolour1, name1, Color( 255, 255, 255 ), " ha entrado al servidor." )
   surface.PlaySound( "fx/blop2.mp3" )
end
usermessage.Hook("player_spawn", player_spawn)

// Disconnect
function player_disconnect( data )
local name3 = data:ReadString()
local nickteamcolour3 = team.GetColor(data:ReadShort())
local steamid2 = data:ReadString()
   chat.AddText( nickteamcolour3, name3, Color( 255, 255, 255 ), " se ha ido del servidor." )
   surface.PlaySound( "fx/blop2.mp3" )
end
usermessage.Hook("player_disconnect", player_disconnect)

Offline Ajlittle

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Re: Player Connect/Disconnect message
« Reply #41 on: October 11, 2013, 01:41:53 PM »
Is it possible to show steamids when they leave?

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Player Connect/Disconnect message
« Reply #42 on: October 11, 2013, 03:46:33 PM »
Is it possible to show steamids when they leave?

Yeah, it is. I can make it for you if you wish.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline cynel

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: Player Connect/Disconnect message
« Reply #43 on: October 21, 2013, 07:08:54 PM »
Yeah, it is. I can make it for you if you wish.

That would be great, not going to lie; I'm a baddie at all of this coding malarkey. Started around a week ago when a friend got a server, must have spent around two hours trying to put add SteamIDs to the connect/disconnect message.

Would appreciate the help!

Thanks

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Player Connect/Disconnect message
« Reply #44 on: October 21, 2013, 07:37:01 PM »
That would be great, not going to lie; I'm a baddie at all of this coding malarkey. Started around a week ago when a friend got a server, must have spent around two hours trying to put add SteamIDs to the connect/disconnect message.

Would appreciate the help!

Thanks


I'm sorry, I'm not able to help you out here. I've become busy with a IRL situation, and some major other issues. Though, you're in a great community, so someone may be able to help you out here.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.