Raised This Month: $ Target: $400
 0% 

Respawning players in day of defeat?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
odd2k
New Member
Join Date: Apr 2006
Old 04-11-2006 , 02:01   Respawning players in day of defeat?
Reply With Quote #1

I'm trying to get some kind of deathmatch effect going in a dod plugin I'm making. But whatever I try, players won't respawn while dead. Respawning while still alive works great, but once I'm dead using the standard spawn function doesn't work.

I've tried calling the spawn function twice using set_task. I've tried setting the deadflag to 3. I'm absolutely sure my respawning function is being called.

Here's the code I'm using atm:

Code:
#include <amxmodx> #include <amxmisc> #include <engine> #include <fun> #include <dodx> new PLUGIN[] = "respawn mod" new VERSION[] = "1.00" new AUTHOR[] = "Odd2k" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_concmd("amx_respawn", "cmd_respawn", ADMIN_SLAY, "")         register_statsfwd(XMF_DEATH) } public client_death(killer, victim, wpnindex, hitplace, TK) {     entity_set_int(id, EV_INT_deadflag, 3)     set_task(0.5, "cmd_respawn", victim)     set_task(0.7, "cmd_respawn", victim) } public cmd_respawn(id) {     spawn(id) }
odd2k is offline
 



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 16:41.


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