[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4668: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4670: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4671: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4672: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
Battlefield Modding Tutorials BFMODS :: View topic - Please Review this Code!!
Battlefield Modding Tutorials BFMODS
https://battlefieldmodding.com/ssm/phpBB3/

Please Review this Code!!
https://battlefieldmodding.com/ssm/phpBB3/viewtopic.php?f=3&t=3194
Page 1 of 2

Author:  medict [ Wed Jul 25, 2007 11:35 pm ]
Post subject:  Please Review this Code!!

I modded a vanilla bf1942 Omaha Beach TDM mode. To do this, I only edited the objectspawns.con and objectspawntemplates.con files. I can walk around on the ground in the server for about 1 minute...then I get disconected to my desktop for some reason. If someone could please review this code I made and tell me if there is an error in it or not, that would be great!! Thank you!!

objectspawns.con*****************************************************************************************************************************************************************************************************

rem removed for precache: if v_arg1 == host
rem ----- Host
rem ----------------------------------------------------------------------------


rem ****************************************
rem **** the_beach *****
rem ****************************************



Object.create DestroyerSpawner
Object.absolutePosition 958.61/16.8594/829.235
Object.rotation 80.28/0/0.0442505
Object.setTeam 2

Object.create lighttankspawner
Object.absolutePosition 866.922/18.0057/947.454
Object.rotation 90/0/1.52588e-005
Object.setTeam 2

rem **********M10 beach spawner***********

Object.create heavytankspawner
Object.absolutePosition 898.87/19.10/987.00
Object.rotation 89.76/0/0
Object.setTeam 2

rem ******M10 South of Beach spawner*******

Object.create heavytankspawner
Object.absolutePosition 866.42/17.73/940.02
Object.rotation 91.70/0/0
Object.setTeam 2

rem ******Sherman South of Beach spawner*****

Object.create lighttankspawner
Object.absolutePosition 865.88/17.59/933.91
Object.rotation 90.48/0/0
Object.setTeam 2

rem *****East of Beach Kettenkrad*****
Object.create ScoutCarSpawner
Object.absolutePosition 1062.64/17.94/978.80
Object.rotation -90.06/0/1.34
Object.setteam 2

rem *****2nd East of Beach Kettenkrad********
Object.create ScoutCarSpawner
Object.absolutePosition 1062.77/18.43/981.81
Object.rotation -90.06/0/1.34
Object.setteam 2

Object.create ScoutCarSpawner
Object.absolutePosition 899.257/19.9825/992.181
Object.rotation 96.0913/1.05751/-3.26483
Object.setTeam 2

rem **************************************
rem **** the_wall *****
rem *************************************

rem Object.create AAGunSpawner
rem Object.absolutePosition 978.986/43.7667/1163.88
rem Object.rotation 0/0/1.52588e-005
rem Object.setOSId 3
rem Object.setTeam 1

Object.create MachinegunSpawner
Object.absolutePosition 955.407/46.4482/1142.3
Object.rotation 179.64/0/0.0685425
Object.setOSId 3
Object.setTeam 1

Object.create MachinegunSpawner
Object.absolutePosition 1013.44/46.4382/1142.47
Object.rotation 179.64/0/0.0685425
Object.setOSId 3
Object.setTeam 1

Object.create lighttankspawner
Object.absolutePosition 1025.53/47.0396/1222.83
Object.rotation -179.641/-0.10399/-1.52588e-005
Object.setOSId 3

rem ****West Side Kettenkrad Wall*****

Object.create ScoutCarSpawner
Object.absolutePosition 954.74/47.39/1220.03
Object.rotation -179.26/0/0
Object.setOSId 3

rem ****East side Kettenkrad Wall****
Object.create ScoutCarSpawner
Object.absolutePosition 1036.14/46.16/1225.13
Object.rotation -179.49/0/0
Object.setOSId 3

rem *****Tiger West Side Wall*****

Object.create HeavytankSpawner
Object.absolutePosition 961.31/46.43/1220.62
Object.rotation -180.30/0/0
Object.setOSId 3

Object.create MachinegunSpawner
Object.absolutePosition 926.862/34.4416/1102.15
Object.rotation -180/0/1.52588e-005
Object.setOSId 3
Object.setTeam 1

Object.create MachinegunSpawner
Object.absolutePosition 1026.06/35.6469/1109.21
Object.rotation -154.08/0/1.52588e-005
Object.setOSId 3
Object.setTeam 1

rem **************************************
rem **** the_CITYENTRY *****
rem *************************************

Object.create MachinegunSpawner
Object.absolutePosition 1056.02/53.038/1240.58
Object.rotation -178.74/0/0.0593567
Object.setOSId 5

Object.create MachinegunSpawner
Object.absolutePosition 1089.57/59.318/1212.82
Object.rotation -139.68/0/1.52588e-005
Object.setOSId 5

Object.create MachinegunSpawner
Object.absolutePosition 1085.43/59.338/1256.69
Object.rotation -116.64/0/0.0279846

Object.setOSId 5

rem **************************************
rem **** axisbase *****
rem *************************************


Object.create heavytankspawner
Object.absolutePosition 1015.56/62.5124/1307.35
Object.rotation -93.6/0/0.0395813
Object.setOSId 5
Object.setTeam 1

Object.create lighttankspawner
Object.absolutePosition 978.94/63.47/1306.16
Object.rotation 89.46/0/0
Object.setOSId 5
Object.setTeam 1

Object.create MachinegunSpawner
Object.absolutePosition 998.553/64.909/1293.43
Object.rotation 0/0/1.52588e-005
Object.setOSId 5
Object.setTeam 1

Object.create DefgunSpawner
Object.absolutePosition 1034.21/61.1805/1257.21
Object.rotation 177.12/-3.83453e-007/1.52588e-005
Object.setOSId 5
Object.setTeam 1

Object.create DefgunSpawner
Object.absolutePosition 955.038/61.1205/1251.24
Object.rotation 175.68/0/1.52588e-005
Object.setOSId 5
Object.setTeam 1

Object.create Scoutcarspawner
Object.absolutePosition 979.16/62.12/1314.27
Object.rotation 90.41/0/0
Object.setOSId 5

Object.create Scoutcarspawner
Object.absolutePosition 1016.96/62.12/1315.81
Object.rotation -90.64/0/0
Object.setOSId 5

Object.create MachinegunSpawner
Object.absolutePosition 1072.23/66.9804/1379.97
Object.rotation 177.21/0/0.0656281
Object.setOSId 5
Object.setTeam 1

Object.create MachinegunSpawner
Object.absolutePosition 1035.82/62.7123/1357.51
Object.rotation 93.24/0/0.0523529
Object.setOSId 5
Object.setTeam 1

rem ----------------------------------------------------------------------------
rem removed for precache: endif


objectspawntemplates.con**********************************************************************************************************************************************************************************************

ObjectTemplate.create ObjectSpawner lighttankspawner
ObjectTemplate.setObjectTemplate 2 sherman
ObjectTemplate.setObjectTemplate 1 panzeriv
ObjectTemplate.MinSpawnDelay 10
ObjectTemplate.MaxSpawnDelay 15
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 15
ObjectTemplate.Distance 20
ObjectTemplate.DamageWhenLost 10

ObjectTemplate.create ObjectSpawner heavytankspawner
ObjectTemplate.setObjectTemplate 2 m10
ObjectTemplate.setObjectTemplate 1 Tiger
ObjectTemplate.MinSpawnDelay 10
ObjectTemplate.MaxSpawnDelay 15
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 15
ObjectTemplate.Distance 20
ObjectTemplate.DamageWhenLost 10

ObjectTemplate.create ObjectSpawner APCSpawner
ObjectTemplate.setObjectTemplate 2 M3A1
ObjectTemplate.setObjectTemplate 1 Hanomag
ObjectTemplate.MinSpawnDelay 10
ObjectTemplate.MaxSpawnDelay 15
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 15
ObjectTemplate.Distance 20
ObjectTemplate.DamageWhenLost 10

ObjectTemplate.create ObjectSpawner WillySpawner
ObjectTemplate.setObjectTemplate 2 Willy
ObjectTemplate.setObjectTemplate 1 Willy
ObjectTemplate.MinSpawnDelay 10
ObjectTemplate.MaxSpawnDelay 15
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 20
ObjectTemplate.Distance 20
ObjectTemplate.DamageWhenLost 10


ObjectTemplate.create ObjectSpawner ScoutCarSpawner
ObjectTemplate.setObjectTemplate 2 kettenkrad
ObjectTemplate.setObjectTemplate 1 kettenkrad
ObjectTemplate.MinSpawnDelay 10
ObjectTemplate.MaxSpawnDelay 15
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 20
ObjectTemplate.Distance 20
ObjectTemplate.DamageWhenLost 10


ObjectTemplate.create ObjectSpawner AAGunSpawner
ObjectTemplate.setObjectTemplate 2 AA_allies
ObjectTemplate.setObjectTemplate 1 flak38
ObjectTemplate.MinSpawnDelay 40
ObjectTemplate.MaxSpawnDelay 80
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 45
ObjectTemplate.Distance 40
ObjectTemplate.DamageWhenLost 10

ObjectTemplate.create ObjectSpawner FighterSpawner
ObjectTemplate.setObjectTemplate 2 mustang
ObjectTemplate.setObjectTemplate 1 bf109
ObjectTemplate.MinSpawnDelay 40
ObjectTemplate.MaxSpawnDelay 80
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 45
ObjectTemplate.Distance 40
ObjectTemplate.DamageWhenLost 10

ObjectTemplate.create ObjectSpawner DiveBomberSpawner
ObjectTemplate.setObjectTemplate 2 mustang
ObjectTemplate.setObjectTemplate 1 stuka
ObjectTemplate.MinSpawnDelay 40
ObjectTemplate.MaxSpawnDelay 80
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 45
ObjectTemplate.Distance 40
ObjectTemplate.DamageWhenLost 10

ObjectTemplate.create ObjectSpawner HeavyBomberSpawner
ObjectTemplate.setObjectTemplate 2 B17
ObjectTemplate.setObjectTemplate 1 B17
ObjectTemplate.MinSpawnDelay 160
ObjectTemplate.MaxSpawnDelay 200
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 45
ObjectTemplate.Distance 40
ObjectTemplate.DamageWhenLost 20

ObjectTemplate.create ObjectSpawner MachinegunSpawner
ObjectTemplate.setObjectTemplate 2 Stationary_browning
ObjectTemplate.setObjectTemplate 1 Stationary_mg42
ObjectTemplate.MinSpawnDelay 35
ObjectTemplate.MaxSpawnDelay 55
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 45
ObjectTemplate.Distance 40
ObjectTemplate.DamageWhenLost 10


ObjectTemplate.create ObjectSpawner ArtillerySpawner
ObjectTemplate.setObjectTemplate 2 Priest
ObjectTemplate.setObjectTemplate 1 Wespe
ObjectTemplate.MinSpawnDelay 40
ObjectTemplate.MaxSpawnDelay 80
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 45
ObjectTemplate.Distance 40
ObjectTemplate.DamageWhenLost 10



ObjectTemplate.create ObjectSpawner DestroyerSpawner
ObjectTemplate.setObjectTemplate 2 fletcher2
ObjectTemplate.setObjectTemplate 1 hatsuzuki
ObjectTemplate.SpawnDelay 200
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 120
ObjectTemplate.Distance 200
ObjectTemplate.teamOnVehicle 1

ObjectTemplate.create ObjectSpawner lcvpSpawner
ObjectTemplate.setObjectTemplate 2 lcvp
ObjectTemplate.setObjectTemplate 1 lcvp
ObjectTemplate.SpawnDelay 20
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 45
ObjectTemplate.Distance 40
ObjectTemplate.DamageWhenLost 10

ObjectTemplate.create ObjectSpawner DefgunSpawner
ObjectTemplate.setObjectTemplate 2 Defgun
ObjectTemplate.setObjectTemplate 1 Defgun
ObjectTemplate.MinSpawnDelay 90
ObjectTemplate.MaxSpawnDelay 180
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 45
ObjectTemplate.Distance 40
ObjectTemplate.DamageWhenLost 10

rem *****NO NADES on KITS******



rem *** Remove all gernades from German kits ***

ObjectTemplate.active German_AT
ObjectTemplate.RemoveTemplate 5

ObjectTemplate.active German_Assault
ObjectTemplate.RemoveTemplate 5

ObjectTemplate.active German_Medic
ObjectTemplate.RemoveTemplate 5

ObjectTemplate.active German_Scout
ObjectTemplate.RemoveTemplate 6

rem *****remove all grenades from US kits***

rem *** Remove all gernades from US kits ***

ObjectTemplate.active US_AT
ObjectTemplate.RemoveTemplate 6

ObjectTemplate.active US_Assault
ObjectTemplate.RemoveTemplate 6

ObjectTemplate.active US_Medic
ObjectTemplate.RemoveTemplate 7

ObjectTemplate.active US_Scout
ObjectTemplate.RemoveTemplate 7




rem EndOfFile

Author:  Why Two Kay [ Thu Jul 26, 2007 12:45 am ]
Post subject:  Re: Please Review this Code!!

Removing templates usually isn't a good idea.

Author:  cptvengeance [ Thu Jul 26, 2007 3:43 am ]
Post subject:  Re: Please Review this Code!!

Yeah, i dont think you can do the grenade thing. I think the proper way of disabling grenades is in the tutorials.

Author:  medict [ Thu Jul 26, 2007 2:26 pm ]
Post subject:  Re: Please Review this Code!!

Thank you guys this helped. Sorry I'm just kinda new to the modding thing, only been doing it for 3 days :D I wish I could still do the no nades though.

Thanks guys!

Author:  Why Two Kay [ Thu Jul 26, 2007 7:24 pm ]
Post subject:  Re: Please Review this Code!!


Author:  Benny [ Sun Jul 29, 2007 11:45 am ]
Post subject:  Re: Please Review this Code!!

You can also use the magtype 1 code dont know if it works for dc or 1942 But it works for Vietnam:

ObjectTemplate.Active GrenadeAllies
ObjectTemplate.magType 1

Will be the same thing tough cause the grenades wont throw but its good if you want to disable damage from other weapons as well.

Author:  Why Two Kay [ Sun Jul 29, 2007 5:46 pm ]
Post subject:  Re: Please Review this Code!!

magtype 1 does not work for grenades/exppacks.

Author:  Strikernl [ Sun Jul 29, 2007 7:34 pm ]
Post subject:  Re: Please Review this Code!!


Page 1 of 2 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/