Raised This Month: $ Target: $400
 0% 

Spawn = instant crash


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 12-01-2010 , 20:42   Spawn = instant crash
Reply With Quote #1

Hi. I made this simple plugin:

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <superheromod>


public plugin_init()
{
    
register_plugin("Respawn""1.0""Jelle")
    
    
register_event("DeathMsg""hook_death""a""1>0"
}

public 
hook_death()
{
    new 
victim read_data(2)
    
    
client_print(victimprint_chat"You have been killed!")
    
    
spawn(victim)
    
spawn(victim)

Each time I get killed, or anyone else gets killed, the game closes and I get the message:

SZ_GetSpace: overflow without FSB_ALLOWOVERFLOW set on Server Reliable Datagram

I have also tried using ham to respawn. That just closes my game and no error comes.

It is a condition zero listen server I have made.

Am I doing it wrong?

EDIT:
If I delete the spawn stuff so it just prints to the client that it has been killed then it works. Then I get the message "You have been killed!" in my chat as I should, so it has to be the respawn stuff which doesn't work.
It has superheromod on, and it does have respawn heroes running which uses ham to respawn with so I really don't get it.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
Old 12-01-2010, 20:46
drekes
This message has been deleted by drekes. Reason: didn't read a part
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-01-2010 , 20:50   Re: Spawn = instant crash
Reply With Quote #3

You should aware now that's a really bad method. You should use either DEAD_RESPAWNABLE + think, either Ham_CS_RoundRespawn.
__________________
Arkshine is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 12-01-2010 , 20:52   Re: Spawn = instant crash
Reply With Quote #4

Quote:
Originally Posted by Jelle View Post
Hi. I made this simple plugin:

PHP Code:
//code 
Each time I get killed, or anyone else gets killed, the game closes and I get the message:

SZ_GetSpace: overflow without FSB_ALLOWOVERFLOW set on Server Reliable Datagram

I have also tried using ham to respawn. That just closes my game and no error comes.

It is a condition zero listen server I have made.

Am I doing it wrong?

EDIT:
If I delete the spawn stuff so it just prints to the client that it has been killed then it works. Then I get the message "You have been killed!" in my chat as I should, so it has to be the respawn stuff which doesn't work.
It has superheromod on, and it does have respawn heroes running which uses ham to respawn with so I really don't get it.
With that I mean I have tried Ham_CS_RoundRespawn.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-01-2010 , 20:54   Re: Spawn = instant crash
Reply With Quote #5

So try the first.
__________________
Arkshine is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 12-01-2010 , 20:58   Re: Spawn = instant crash
Reply With Quote #6

Never heard of that method. Not sure I understand what you mean with "+ think"?
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-01-2010 , 21:06   Re: Spawn = instant crash
Reply With Quote #7

I believe he means do Ham_Think on the player.
__________________
fysiks is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 12-01-2010 , 21:12   Re: Spawn = instant crash
Reply With Quote #8

Never used it. How do I do that?
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-01-2010 , 21:50   Re: Spawn = instant crash
Reply With Quote #9

Plenty of discussion regarding both methods and probably more:

http://forums.alliedmods.net/showthread.php?t=76179
__________________

Last edited by Bugsy; 12-01-2010 at 21:52.
Bugsy is offline
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 12-02-2010 , 05:36   Re: Spawn = instant crash
Reply With Quote #10

I also had this problem before
to prevent it, you need to delay spawning by atleast 0.5 seconds
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:26.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode