Author Topic: Spawn script  (Read 2619 times)

0 Members and 1 Guest are viewing this topic.

Offline Deathtitan77

  • Jr. Member
  • **
  • Posts: 63
  • Karma: 6
Spawn script
« on: February 11, 2013, 07:21:27 AM »
Alright, so I am making a jailbreak gamemode. I am having a problem though, I can't get my spawn script to work. I would appreciate any help.

GM.Name = "Jailbreak"
GM.Author = ""
GM.Email = ""
GM.Website = ""

warden = ""
function GM:Initialize()
self.BaseClass.Initialize( self )
end

function GM:CreateTeams()
team.SetUp( 1, "Guards"    , Color(0  ,0,255), false)
team.SetSpawnPoint( 1, "info_player_counterterrorist" )
team.SetUp( 2, "Prisoners" , Color(255,0,0  ), false)
team.SetSpawnPoint( 2, "info_player_terrorist" )
end

Offline nathan736

  • Full Member
  • ***
  • Posts: 143
  • Karma: 4
Re: Spawn script
« Reply #1 on: February 11, 2013, 10:55:38 AM »
give us full code this is not the spawn system this is just the back bone team system
PS: MOVE THIS TO DEV AREA
PSS: use the code brackets or use ideone for reading >: )
« Last Edit: February 11, 2013, 11:27:20 AM by nathan736 »
a person asked me how to code lua and i said this " its like building a rocket up side down then  realizing you did it all wrong."

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Spawn script
« Reply #2 on: February 12, 2013, 01:15:34 AM »
give us full code this is not the spawn system this is just the back bone team system
PS: MOVE THIS TO DEV AREA
PSS: use the code brackets or use ideone for reading >: )

Who is us?
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline Deathtitan77

  • Jr. Member
  • **
  • Posts: 63
  • Karma: 6
Re: Spawn script
« Reply #3 on: February 12, 2013, 04:38:58 AM »
Well, this is my code. This is my whole spawn code.

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Spawn script
« Reply #4 on: February 12, 2013, 08:07:15 AM »
Are there any console errors? If there are no errors, are you making sure to play the gamemode on a counter strike map or a map you made using counter strike as your mod in SDK Hammer?
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline nathan736

  • Full Member
  • ***
  • Posts: 143
  • Karma: 4
Re: Spawn script
« Reply #5 on: February 12, 2013, 08:22:59 AM »
EDIT
Well, this is my code. This is my whole spawn code.
this is not spawn code  by the way, this is how you set up the teams theres your problem click the link at the bottom \/ for info about teams

spawn code im sure does not work if you are not on a team (i don't think you get set to a team auto so you need a spectator and or dead team#)
ps : also you don't need to define warden as "" in game int or wherever you doing this (does not hurt tho)
pss: this might help some but might be old
Quote from: http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index6665.html
You need to set the team up on both the client and the server. This would ideally be achieved by defining your team-setup's in your gamemode's shared file.

psss: might want to make sure you have your team set up you kind of did not give me everything so >: (
http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index75fb.html
« Last Edit: February 12, 2013, 08:36:00 AM by nathan736 »
a person asked me how to code lua and i said this " its like building a rocket up side down then  realizing you did it all wrong."