it didn't work. i did all of that and the mod did not work
it didn't work. i did all of that and the mod did not work
So you will need to wait for someone smarter than me
not smarter but check for other DMPrecache's from other mods
^ AncientOrder is right.
If you have other mods and if in them is placed DMprecache.scr it will overwrite that DMprecache from global folder. Then you just can put spawnprotect.scr in that mod global folder and add exec global/spawnprotect.scr to it's DMprecache, it would be the fastest way which will not require from you checking what does other mod add to it's own DMprecache and then deleting it and pasting these files to main/global/dmprechace.scr
u saved spawnprotect.scr in mohaa/main............. NOOOOOOOOOOOOOOO..... it should be in global folder.... as u exec from dmprecache -----> exec global/spawnprotect.scr..... understand?.
look.... if u have a mod for example spawnprotect.scr:
u need the scr file in global.... and u need the dmprecache.scr also in global.
so now u have 2 files in global.... spawnprotect.scr and dmprecache.scr.
now u open dmprecache.scr and on the bottom u should see exec global/spawnprotect.scr
the dmprecache will now execute the mod that is called spawnprotect.scr in the global folder.
if u putt the spawnprotect.scr in main folder.... it will say can not find spawnprotect.scr in global folder..... understand a bit?
main:
if (self==NIL)
end
if(self.dmteam == "spectator")
end
if (level.cvar_["antispawnkill"] != 1)
end
if(level.cvar_["printspawnprotect"] == 1)
self stufftext "locationprint 500 60 Spawn-Protect-On 1"
if (level.cvar_["invulnerabletime"] ==NIL)
level.cvar_["invulnerabletime"] = 3
else
if (level.cvar_["invulnerabletime"] < 1)
level.cvar_["invulnerabletime"]=3
if(level.cvar_["showspawnlight"] == 1)
{
self light 0 1 0 100
}
self nodamage
self.antispawnprotect=1
for(local.i = 0; local.i <= level.cvar_["invulnerabletime"] ; local.i = local.i + .5)
{
wait .5
if(self.fireheld == 1 || self.dmteam == "spectator")
{
break
}
}
if( level.cvar_["printspawnprotect"] == 1)
{
self stufftext "locationprint 500 50 Spawn-Protect-Off 1"
}
self takedamage
self.antispawnprotect=0
self light 0 0 0 0
end
The one i posted does work, you just have to install it correctly by what the others have been saying. There ARE MANY tutorials and instructions around the internet on how to do this.
Purple's Playground
OBJ : 103.29.85.127:12203
xfire: purpleelephant1au
email: purpleelephant1au@gmail.com
skydrive: PurpleElephantSkydrive
@slimbips i wrote it wrong m8 i meant i put it in global in main folder and it didn't work then i tryed to put it in pk3 file and create new folder and rename it to global then take scr file and put it in and still didn't work
i guess the problem the path which in scr file .
@PE i'm sorry m8 but did you tried to test it ?
Yes I tested it, that's the main reason I called my script test.scr when I ran it on my own servers
Check your log files as it should tell you if something is wrong. If you have installed it correctly you should see the println about registering the spawn event. If you do not see it you either havent installed it correctly or you forgot to turn the mod on by the cvar
Last edited by Purple Elephant1au; June 21st, 2018 at 04:30 PM.
Purple's Playground
OBJ : 103.29.85.127:12203
xfire: purpleelephant1au
email: purpleelephant1au@gmail.com
skydrive: PurpleElephantSkydrive