AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Respawning players in day of defeat? (https://forums.alliedmods.net/showthread.php?t=26913)

odd2k 04-11-2006 02:01

Respawning players in day of defeat?
 
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) }

Wolle 04-11-2006 19:45

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 );

[ --<-@ ] Black Rose 04-11-2006 19:51

i think that fun is for cstrike and instead there is dodfun for dod, but i can be wrong :P

Hawk552 04-11-2006 20:00

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 :P

The fun module works for anything. DODFun just adds on more stuff that DOD is capable of.

odd2k 04-12-2006 11:36

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.


All times are GMT -4. The time now is 16:41.

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