Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin

Restarting a round

by Vet · 2008-12-29 · 7 replies · 3613 views · 12 downloads

Read the thread (8 posts)

From the first post

Is there already a plugin available to restart a round? Like if you're playing along, and just decide you want to restart the current round. Any time I do a search on restart and/or round, I get 500 hits and I don't want to wade through all that.

Added later in the thread

dod_overies.sma Plugin Source 4 KB 12 dl Download Compile

The thread

All 8 posts from 2 people on Restarting a round, kept as they were written.

Vet
started this thread
Posts: 229
Threads: 24
Joined: Oct 2006
12-29-2008, 12:44 PM #1

Is there already a plugin available to restart a round? Like if you're playing along, and just decide you want to restart the current round. Any time I do a search on restart and/or round, I get 500 hits and I don't want to wade through all that.

Dr.G
posted here
Posts: 776
Threads: 75
Joined: Nov 2007
12-29-2008, 01:26 PM #2

yea there are already one https://www.dodplugins.net/forums/showthread.php?t=38 I used it for like 1 year ago and it worked fine

Vet
started this thread
Posts: 229
Threads: 24
Joined: Oct 2006
12-29-2008, 02:01 PM #3

Ah, thanks. I wrote one too, but didn't want to post it if another one does the same thing.

Dr.G
posted here
Posts: 776
Threads: 75
Joined: Nov 2007
12-29-2008, 02:44 PM #4

Its in the old/disconnected section... post the one u made, i cant see why not to...

Vet
started this thread
Posts: 229
Threads: 24
Joined: Oct 2006
12-29-2008, 03:25 PM #5

Here's the one I made. I don't really consider it a full-fledged plugin. It only restarts a round. Plus it hasn't been fully tested other than on my local server. But the method used is kinda unique and can be a tutorial for others.rnrnCommand: round_restart - Restarts the roundrnCVars: NonernNotes: This plugin forces a 'Use' action on a dod_score_ent entity. So... if another plugin hooks a 'Use' of a dod_score_ent entity AFTER this plugin, strange things may occur. You are warned.rnrnIf a map does not have a 'dod_control_point_master' AND a 'dod_score_ent' entity, the plugin will terminate.rnrnThe current scores remain the same. Perhaps some enterprising coder will add the ability to subtract points earned before the restart.rn-

Dr.G
posted here
Posts: 776
Threads: 75
Joined: Nov 2007
12-29-2008, 05:16 PM #6

nice lets hope it gets approved lol

Dr.G
posted here
Posts: 776
Threads: 75
Joined: Nov 2007
12-30-2008, 01:24 PM #7

Nice... well a bit offtopic, but arent these two stocks the same?rnrn#1rn

stock set_keyvalue(ent, key[], value[])rn{rn	new classname[32]rn	pev(ent, pev_classname, classname, 31)rn	set_kvd(0, KV_ClassName, classname)rn	set_kvd(0, KV_KeyName, key)rn	set_kvd(0, KV_Value, value)rn	set_kvd(0, KV_fHandled, 0)rn	rn	dllfunc(DLLFunc_KeyValue, ent, 0)rn}
rnrn#2rn
stock fm_set_kvd(entity, const key[], const value[], const classname[]) rn{rn	set_kvd(0, KV_ClassName, classname)rn	set_kvd(0, KV_KeyName, key)rn	set_kvd(0, KV_Value, value)rn	set_kvd(0, KV_fHandled, 0)rnrn	return dllfunc(DLLFunc_KeyValue, entity, 0)rn}
rnrnThe first one is one i found at allied modders, cant remember where tho.. Ive used it to set some values of an entity, but it didnt work with this ie.
set_keyvalue(ent, "wait", "20")
rnWith others it did work tho... The one u use might be better/working :)rnrnrnAnd a last one :) Is this really needed??:rn
#define fm_find_ent_by_class(%1,%2) engfunc(EngFunc_FindEntityByString, %1, "classname", %2)rn
rnrnCuz ive used:rn
engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, classname))
rnrnWithout:rnrn
#define fm_create_entity(%1) engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, %1))
rnrnAnd that worked fine....

Vet
started this thread
Posts: 229
Threads: 24
Joined: Oct 2006
12-30-2008, 02:33 PM #8

IDK about the set_keyvalue. Bailopan suggested to me one time that I use the FM version, so that's what I do. I figure he knows a hell of a lot more than me. lolrnrnAs far as the calls, there's no difference. I just like to use the define/sub method because I feel its easier for others to understand what's going on using them. Seeing 'fm_create_entity' seems a lot more clear than a big ol' eng/dll function call. And I don't think there's an advantage either way because the function defined is substituted upon compiling. So it all ends up the same.

DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC