.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Bot Coding (http://forums.bots-united.com/forumdisplay.php?f=24)
-   -   Forcing everyone to respawn after death (http://forums.bots-united.com/showthread.php?t=3991)

AssasinoRuso 19-05-2005 21:12

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?

Pierre-Marie Baty 19-05-2005 22:00

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 ?

AssasinoRuso 20-05-2005 21:15

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.

The Storm 20-05-2005 22:59

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?

AssasinoRuso 21-05-2005 19:59

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.

Lazy 21-05-2005 21:33

Re: Forcing everyone to respawn after death
 
Try calling pfnSpawn on the player's edict_t pointer.

Pierre-Marie Baty 22-05-2005 14:04

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 ?

T(+)rget 23-05-2005 22:50

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.

Lazy 23-05-2005 23:41

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]

Pierre-Marie Baty 23-05-2005 23:58

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.