Page 1 of 3 123 LastLast
Results 1 to 10 of 27

Thread: Spawn Protect Mod IN Mohaa

  1. #1

    Default Spawn Protect Mod IN Mohaa

    hello guy i've problem with Spawn Protect mod cuz i used a lot of Spawn Protect and all of these mods don't working like what i want to use it
    1-http://www.mohaaaa.co.uk/AAAAMOHAA/m...t.zip&nid=3407
    this mod works intermittently it is working and stop working and back to work again (part of a second)
    2-http://www.mohaaaa.co.uk/AAAAMOHAA/m...o.pk3&nid=7525
    this mod have a lot of bugs like it can working without Turn OFF and have something called [Rush] have bugs too

    the best one i wanna use it is the one which in Admin pro but idk how i can spilt it . have anyone good spawnprotect
    i just want to make spawnprotect when you respawn you have below you light and no one can kill you after 5 sec and if u tried shot .

  2. #2

    Default

    why there is no reply

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

    Default

    1. Because it has only been 1 day and most of us have lives outside of this forum.
    2. Your post is very vague on what you want, you said you wanted a spawn protect mod, which you posted 3 of them, 1 of them you said doesn't work the way you wanted but didn't say how it is different. The second one all you said was had bugs but nothing about them. And then you mentioned you liked the one in admin pro, so why don't you just it, it doesn't need to be split from the rest.

    You could always use the search bar.

    If you want a spawn protect mod suited to how you want it, then I suggest making your own, with the reborns spawn event it makes it so much easier, just register the event with your script, apply no damage to the player and add a light. Have a while loop with timer and if it expires or thr player shoots then disable the protection(set player take damage) and your done.

    When I get home from work I might consider making a very simple one like the one I outlined about, but it's a good learning curve to atleast attempt it yourself first.

    Try this:
    Save as whatever you like just remember to change it in the script below where i mentioned to change it.
    And add it to your dmprecache.scr
    And turn on my cvar spawn_protect # // number of seconds it will last for, 0 to turn mod off

    main:

    if(level.spawn_protect)
    end

    level.spawn_protect = 1;

    if(int(getcvar("spawn_protect"))){

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

    if(local.spawn)
    println("~~[SPAWN-PROTECT]~~ Error registering spawn event, Error code " + local.spawn)
    else
    println("~~[SPAWN-PROTECT]~~ Successfully registered spawn event")

    }

    end

    spawn local.player:

    // Wait until player has fully spawned, ie got a weapon
    while((local.player getactiveweap 0) == NULL)
    waitframe

    // Get the time to wait
    local.time = int(getcvar("spawn_protect"))

    // If time is not 0
    if(local.time){

    // Set nodamage and light on
    if(local.player){
    local.player nodamage
    local.player light 1 0 1 100 /// You can change colour of the light, it is light R G B Size, so its purple atm
    local.player iprint("You are spawnprotected") /// You can adjust the message
    }
    // Loop through the time
    while(local.time > 0){

    // If player has shot their weapon, then exit out
    if(local.player.fireheld || local.player.secfireheld)
    break

    local.time -= 0.1
    wait 0.1
    }
    // Set damage on and light off
    if(local.player){
    local.player takedamage
    local.player light 0 0 0 0
    local.player iprint("You are no longer protected") /// You can adjust the message
    }

    }


    end


    Or use my eventhandler and only copy the spawn local.player thread into its own script and it in the autoload folders. :P
    Last edited by Purple Elephant1au; June 20th, 2018 at 05:13 AM. Reason: Added Code

    Purple's Playground
    OBJ :
    103.29.85.127:12203
    xfire: purpleelephant1au
    email: purpleelephant1au@gmail.com
    skydrive: PurpleElephantSkydrive




  4. #4

    Default

    use the one in admin pro, u dont need to split it... it doesnt lag or something.... the mod is very clean..... i made it.... (dont tell elgan he would just agree).

    i use admin pro for years.. works perfect!

  5. #5

    Default

    @Purple Elephant

    1- I'M don't mean to reply quickly m8. i had problems about create threads i thought i'm and admin who the only can see this post back to chatbox and you will know what i was mean i'm sorry about I did not know how to express what I meant
    2-and i meant the first don't working well the enemies can kill you after respawn again [ i mean they can kill while the spawn protect on ] that's what i was mean about intermittently. and the second have bug can make some of players by random the spawn protect don't turn off after the time of protect end you walk on all map with this light which gave it to you spawnprotect mod and no one can kill you and the other players the spawn protect works fine with them in the same time .
    3- i don't want to use admin pro because the admin pro have a lot of mods and i want the spawn protect only
    4-i'm sorry mate idk how i can do my own mod
    and thank you dude

  6. #6

    Default

    @slimbips

    hi mate i don't want the admin pro because it have a lot of mods and i want the spawn protect only

  7. #7

    Default

    Quote Originally Posted by Purple Elephant1au View Post

    Try this:
    Save as whatever you like just remember to change it in the script below where i mentioned to change it.
    idk how i can install this can you explain to me how i can do it
    this is the exactly part which i did not understand it.

    Quote Originally Posted by Purple Elephant1au View Post
    And add it to your dmprecache.scr.
    do you to get exec global/spawnprotect. in dmprchache ?!

    Quote Originally Posted by Purple Elephant1au View Post
    And turn on my cvar spawn_protect # // number of seconds it will last for, 0 to turn mod off
    the same question above put this in server.cfg [set spawn_protect]. another question what is the difference between (seta & set & sets) in server.cfg

    Or use my eventhandler and only copy the spawn local.player thread into its own script and it in the autoload folders. :P
    or use what !!!? when the translation come call me, can you speak english please. hahahahahaha
    lmao talk in simple or on newbie language please

  8. #8

    Default

    idk how i can install this can you explain to me how i can do it
    Place where purple mentioned to make changes into spawnprotect scrip (I made part of code where you change path and name of script to match yours bold):
    local.spawn = registerev "spawn" test.scr::spawn /// <<<< CHANGE THIS LINE TO THE NAME AND PATH OF YOUR SCRIPT
    1. Copy and paste that bunch of code into text editor and click "save as" and name it spawnprotect.scr, or whatever you like to name it, just remember about ".scr" extension at the end.
    2. Put that file into global folder and open DMprecache.scr with text editor,
    3. At the bottom of DMprecache add line: exec global/spawnprotect.scr
    4. After adding this line save changes and exit DMprecache.

    Now in server.cfg file:

    1. Open it and add somewhere line: set spawn_protect # // # stands for number of seconds it will last for, 0 to turn mod off.
    2. Save changes and exit file.
    3. Restart your server.

  9. #9

    Default

    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

  10. #10

    Default

    Put mod in global folder, because when you say exec global/spawnprotect.scr, you tell in other words DMprecahce that in global folder is file named spawnprotect, and you want to execute it, if spawnprotect.scr is in main folder, DMprecache checks global folder and see that there is nothing called spawnscript.scr, so it doesn't execute anything.

    what is the meaning of PATH ?! should i change test.scr to global/spawnprotect.scr ?!! or what
    Yes m8.

Posting Permissions

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