Raised This Month: $ Target: $400
 0% 

respawn for bots


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
striker07
Veteran Member
Join Date: Mar 2012
Location: Solar System/Earth/Belgi
Old 07-16-2012 , 17:51   Re: respawn for bots
Reply With Quote #7

Hey connor I have another issue that i cant seem to fix, wich i am sure of u can

ok so all my terrorist players are bots, (+-14 bots) and when the round ends all ters die due to the plugin force_round_end (its a plugin i can't miss so i can't just delete it). so when all terrorists die a task is set in my plugin to respawn them and there is the problem when the round ended the bots will automaticly spawn and therefore don't need to respawn again so i tryed to remove the task but without succes.

Now my server crashes everytime all terrorists die.

this is what I have done but it doesnt work, could you take a look at it pls?
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta> 
#include <hamsandwich>
#include <cstrike>
#define PLUGIN "T-AutoSpawn"
#define VERSION "1.0"
#define AUTHOR "Sky-High"
#define TASK_REVIVE 1000
new Pcvar_RespawnTime;
public 
plugin_init() {
 
register_plugin(PLUGINVERSIONAUTHOR)
 
 
//RegisterHam(Ham_Killed, "player", "Fwd_PlayerKilled");
 
 
Pcvar_RespawnTime register_cvar"osg_respawn_time""5.0" );
 
 
register_logevent("EventRoundEnd"2"1&Restart_Round");
 
register_logevent("EventRoundEnd"2"1=Game_Commencing");
 
register_logevent("EventRoundEnd"2"1=Round_End");
}
public 
cz_bot_ham_registerableid 

 
RegisterHamFromEntity(Ham_Killedid"Fwd_PlayerKilled"

public 
EventRoundEnd()
{
 static 
iPlayers[32], iNumidiPlayer;
 
get_playersiPlayersiNum"e""T" ); 
 for ( 
id=0id<iNumid++ )
 {
  
iPlayer iPlayers[id];
  
remove_task(TASK_REVIVE+iPlayer)
 }
}
public 
client_authorized (id)
{
 
set_task(4.5"Ad"id);
 
set_task400.0"Ad"id__"b" );
}
public 
Fwd_PlayerKilled(victimattackershouldgib)
{
 new 
FloatTime;
 static 
CsTeams:team;
 
team cs_get_user_team(victim);
 
Time get_pcvar_floatPcvar_RespawnTime );
 
 if (
team == CS_TEAM_T)
 {
  
set_taskTime"Task_Respawn"TASK_REVIVE+victim);
 }
}
 
public 
Task_Respawn(id)
{
 
ExecuteHamB(Ham_CS_RoundRespawnid);

Code:

L 07/17/2012 - 00:273: [HAMSANDWICH] Entity has null private data (1005)
L 07/17/2012 - 00:273: [AMXX] Run time error 10 (plugin "t_autospawn.amxx") (native "ExecuteHamB") - debug not enabled!
L 07/17/2012 - 00:273: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 07/17/2012 - 001:05: FATAL ERROR (shutting down): SZ_GetSpace: overflow without FSB_ALLOWOVERFLOW set on Server Datagram
FATAL ERROR (shutting down): SZ_GetSpace: overflow without FSB_ALLOWOVERFLOW set on Server Datagram
Add "-debug" to the ./hlds_run command line to generate a debug.log to help with solving this problem
__________________

Working on:
[CSGO/CSS] Mmorpg - an extensive XP/level modulair platform
Progress: [♣♣♣♣♣♣♣|♣♣♣]

Last edited by striker07; 07-17-2012 at 08:02.
striker07 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 15:19.


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