Raised This Month: $ Target: $400
 0% 

Respawning players in day of defeat?


Post New Thread Reply   
 
Thread Tools Display Modes
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
Wolle
Member
Join Date: Jun 2005
Location: Berlin / Germany
Old 04-11-2006 , 19:45  
Reply With Quote #2

Im not sure but your set_task function looks funny.
This is how I use it in my plugins.
Code:
set_task( 0.2, "Timer", 1, "", 0, "a", g_iTimesToSlap );
Wolle is offline
Send a message via AIM to Wolle
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 04-11-2006 , 19:51  
Reply With Quote #3

i think that fun is for cstrike and instead there is dodfun for dod, but i can be wrong
[ --<-@ ] Black Rose is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 04-11-2006 , 20:00  
Reply With Quote #4

Quote:
Originally Posted by [ --<-@
Black Rose]i think that fun is for cstrike and instead there is dodfun for dod, but i can be wrong
The fun module works for anything. DODFun just adds on more stuff that DOD is capable of.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
odd2k
New Member
Join Date: Apr 2006
Old 04-12-2006 , 11:36  
Reply With Quote #5

Hmm, btw if it's not possible to "resurrect" people in dod, it would also work if I could somehow set the respawn time to 0. Any help would be appreciated.
odd2k is offline
Reply


Thread Tools
Display Modes

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