![]() |
Forcing everyone to respawn after death
Blop I've been trying for a long time now to make everyone respawn like in the deathmatch mod. The farthest I've gotten is: Spectator mode, player respawns hands respawn near head.... when you click there's a flash on the hands.... basically I guess I might be stuck in spectator mode.....
Anyone done this before? |
Re: Forcing everyone to respawn after death
Please be more explicative. Is it a full mod you're making out of the SDK or is it one of those AMX/metamod plugins ? Which engine is it for (HL/Source) ? What are you doing exactly ?
|
Re: Forcing everyone to respawn after death
err counter-strike 1.6.... dll wrapper HPB_Bot template to be specific. All I want to do is to allow players to respawn after they get killed instantly instead of at the round end. All I'm looking for is the respawn code or theory.
|
Re: Forcing everyone to respawn after death
You don't need to code anythink.:) There is respawn script for AMX. Just look in the AMX web site. But maybe you want to make your own plugin?
|
Re: Forcing everyone to respawn after death
This code has nothing to do with amx. And I am not going to use amx just to respawn. The amx plugin uses a native function in the amx core and I can't find it cause I dont use cvs.
|
Re: Forcing everyone to respawn after death
Try calling pfnSpawn on the player's edict_t pointer.
|
Re: Forcing everyone to respawn after death
It won't work this way. But even if you don't use CVS, you can download the AMX source code and look it up, no ?
|
Re: Forcing everyone to respawn after death
Lets begin: (Taken from AMX Fun Module - Unreleased)
// Lets make them respawnable 1st if(pEdict->v.deadflag != DEAD_RESPAWNABLE) { pEdict->v.deadflag = DEAD_RESPAWNABLE; } // Make sure the camera is set back correctly pEdict->v.iuser1 = 0; // Now respawn the player/bot pfnSpawn(pEdict); Quick note: Player/Bot will spawn with default equipment. |
Re: Forcing everyone to respawn after death
[offtopic]
Isn't it cheaper to just set the deadflag to DEAD_RESPAWNABLE rather than always checking the value first? [/offtopic] |
Re: Forcing everyone to respawn after death
obviously yes...
Didn't know that iuser1 was holding the camera settings for the players. Good to know. |
All times are GMT +2. The time now is 07:50. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.