Raised This Month: $ Target: $400
 0% 

[Respawn] Crash my server ...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
sbeex
Member
Join Date: Sep 2005
Location: switzerland
Old 04-15-2007 , 11:03   [Respawn] Crash my server ...
Reply With Quote #1

Hello !
Today with help of Doombringer I tried to do a plugin who do : auto-respawn when you die.

The problem is that it do crash the server when you're die ^^

This is the code :
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <string> 

#define PLUGIN "Auto-Respawn"
#define VERSION "1.0"
#define AUTHOR "Sbeex"


public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_event("DeathMsg", "Respawn", "a")	//when someone die -> exec Respawn()
	
}

public Respawn() {
	
	new id = read_data(2)
	
	//Read_data values :
	
	// 1 -> killer
	// 2 -> victim
	// 3 -> headshot
	// 4 -> weapon id

	spawn(id);
	set_task(0.5, "Respawn_Again", id);
	client_print(id, print_chat, "If it work you have respawn !"); 
	
	
	
	return PLUGIN_CONTINUE 	
}

public Respawn_Again(id)
{
	spawn(id);
}
If you can see any errors please tell me !

(i'm french sorry for my english)
sbeex is offline
Send a message via MSN to sbeex Send a message via Skype™ to sbeex
 



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 06:42.


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