Raised This Month: $ Target: $400
 0% 

Restart Round? [Solved]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 11-21-2007 , 18:41   Restart Round? [Solved]
Reply With Quote #1

In both Counter-Strike and Day of Defeat, restarting the round not only respawns all players (and resets flags in dod) but it also resets all entities.

This includes func_breakables, and other triggers in the map that were set off. These all return to their default state on round restarting.

Does anyone know how to achieve this without restarting the round through a console command, which would also respawn everyone?


I have tried looping through all entities and executing hamsandwich's Ham_DOD_RoundRespawn, but the plugin dies mid-loop and doesn't make it to the echo. When I perform it on an individual func_breakable, it makes it to the echo but nothing happens to the entity at all.

Code:
    static maxents;     maxents = global_get( glb_maxEntities );             for( new i = 1; i < maxents; i++ )         if( pev_valid(i) ) ExecuteHam( Ham_DOD_RoundRespawn, i );             console_print( id, "Reset All %i Entities", maxents );

One thing I did notice was that a func_breakable's pev_health is set to 100.0 or 150.0 before it is broken, when it is set to 0.0 or negative, depending on the damage done to it. In addition, after it "breaks," its pev_deadflag is set to 2. I have tried setting the health back to 100.0 and the deadflag back to 0 and using DLLFunc_Spawn on it, but all that happens is I can no longer walk through it - but there is no window there, visually.


Thanks in advance gents.
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician

Last edited by Wilson [29th ID]; 11-22-2007 at 11:35.
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
 


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 01:17.


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