Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 27

Thread: Spawn Protect Mod IN Mohaa

  1. #11

    Default

    it didn't work. i did all of that and the mod did not work

  2. #12

    Default

    So you will need to wait for someone smarter than me

  3. #13
    Senior Member Ancient Order's Avatar
    Join Date
    Aug 2015
    Location
    Paris, Fr.
    Posts
    256

    Default

    not smarter but check for other DMPrecache's from other mods

  4. #14

    Default

    ^ 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

  5. #15

    Default

    Quote Originally Posted by yousef View Post
    i saved spawnprotect.scr in mohaa/main then i added exec global/spawnprotect.scr in DMprechache and i added set spawn_protect 5 in server.cfg

    i'm still don't understand what is meaning of

    local.spawn = registerev "spawn" test.scr::spawn /// <<<< CHANGE THIS LINE TO THE NAME AND PATH OF YOUR SCRIPT

    what is the meaning of PATH ?! should i change test.scr to global/spawnprotect.scr ?!! or what
    because the mod don't work
    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?

  6. #16

    Default

    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

  7. #17
    Purple Developer Purple Elephant1au's Avatar
    Join Date
    Feb 2012
    Location
    Australia
    Posts
    1,269

    Default

    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




  8. #18

    Default

    Quote Originally Posted by Slimbips {sfx} View Post
    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?
    @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 ?

  9. #19

    Default

    Quote Originally Posted by Ancient Order View Post
    not smarter but check for other DMPrecache's from other mods
    thank you mate about this note but i have only one DMPrechache

  10. #20
    Purple Developer Purple Elephant1au's Avatar
    Join Date
    Feb 2012
    Location
    Australia
    Posts
    1,269

    Default

    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




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •