Results 1 to 6 of 6

Thread: Spawn protection + spawn effect

  1. #1
    Private First Class
    Join Date
    Jul 2013
    Posts
    170
    Thanks
    44
    Thanked 16 Times in 11 Posts

    Spawn protection + spawn effect

    Hey.. how to make spawn protection?

    How to put effect at spawn? when player spawn to effect start..

    Thanks.!

  2. #2
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Seriously.

    You have been in this community for over 9 months now, and you are STILL asking this kind of questions?

    Try to use your brain instead of constantly relying on ours.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  3. The Following User Says Thank You to IzNoGoD For This Useful Post:

    milepunta (29th June 2014)

  4. #3
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Look in spawnplayer(). And edit the callbackdamage. Return damage to 0 if he is spawnprotected

  5. #4
    Private First Class RobsoN's Avatar
    Join Date
    Jan 2013
    Location
    /home/cod2/
    Posts
    230
    Thanks
    119
    Thanked 95 Times in 64 Posts
    On spawn:

    PHP Code:
    self thread spawnProtection(); 
    Somewhere in same file:

    PHP Code:
    spawnProtection()
    {
    self endon("killed_player");
    self endon("disconnect");
    self.spawnprotected true;
    wait 5;
    self.spawnprotected false;

    In callback damage, after {
    PHP Code:
    if(isdefined(self.spawnprotected) && self.spawnprotected)
    return; 
    "Don't worry if your code doesn't work correctly - if everything worked, you would not work" ~Mosher's right

  6. The Following 3 Users Say Thank You to RobsoN For This Useful Post:

    kung foo man (28th March 2014),ORDI (29th March 2014),Rocky (28th March 2014)

  7. #5
    Private First Class
    Join Date
    Jul 2013
    Posts
    170
    Thanks
    44
    Thanked 16 Times in 11 Posts
    Ty,and for spawn effect...

  8. #6
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Place effect if someone spawn...

Posting Permissions

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