AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   TF2 Idle Server Plugin? (https://forums.alliedmods.net/showthread.php?t=217196)

igotfits 05-31-2013 01:20

TF2 Idle Server Plugin?
 
is there a plugin that when a red player spawns it cannot move or shoot.

friagram 05-31-2013 03:45

Re: TF2 Idle Server Plugin?
 
Not publicly available.

ddhoward 05-31-2013 05:32

Re: TF2 Idle Server Plugin?
 
1 Attachment(s)
Here you go.

cvar is sm_disableteam. Set to 2 to freeze RED, 3 to freeze BLU, anything else to disable the plugin.

friagram 05-31-2013 06:35

Re: TF2 Idle Server Plugin?
 
You use a timer passing client on player spawn, then search and remove all weapons. This is going to cause some errors. There are other plugins, posted in other threads but that do this already. You may want to just use TF2_RemoveAllWeapons.. Inventory application would be a better hook. Or if using tf2items, just return plugin handled and prevent the item from even being generated.

This approach leaves clients in ref pose (looks dumb). It also can cause issues with spawn/view offset (freezing in place).

Unreal1 05-31-2013 09:01

Re: TF2 Idle Server Plugin?
 
I can make that plugin, just PM me.

ddhoward 05-31-2013 20:01

Re: TF2 Idle Server Plugin?
 
Quote:

Originally Posted by friagram (Post 1961679)
You use a timer passing client on player spawn, then search and remove all weapons. This is going to cause some errors.

How so? The timer is so short; not many people will be disconnecting in the 1/10th of a second that the timer is in effect. In any case, I've added some redundant checks to the timed event.

Removing all the weapons immediately upon spawn/application doesn't seem to sucessfully grab all weapons. Just tried it without a timer; sappers are not successfully removed. The delay is apparently necessary if you want to remove sappers and the engineer's build tool.

Quote:

There are other plugins, posted in other threads but that do this already.
??? I thought you said that the plugins weren't publicly available?

Quote:

You may want to just use TF2_RemoveAllWeapons
Forgot all about that, thanks. Changing the attached plugin now.

Quote:

This approach leaves clients in ref pose (looks dumb). It also can cause issues with spawn/view offset (freezing in place).
None of that matters, as the players are idle/AFK.

igotfits 05-31-2013 21:10

Re: TF2 Idle Server Plugin?
 
Quote:

Originally Posted by ddhoward (Post 1961663)
Here you go.

cvar is sm_disableteam. Set to 2 to freeze RED, 3 to freeze BLU, anything else to disable the plugin.

hey ddhoward ty verymuch, ill try it out. greatly appreciated here man.

friagram 06-01-2013 16:19

Re: TF2 Idle Server Plugin?
 
There's no reason to skip client/validation checks. Just because sourcemod (generally) holds your hand and will stack trace if something bad does happen and bail you out, does not mean that it ever should.

It takes virtually no time to pass timers with userids, or validate clients :|
I also learned this the hard way.

Sorry I was a bit tired... I was referring to the strange/unlocks plugins which you could have modified.

PHP Code:

public Action:DoFreeze(Handle:timerany:client) {
    if (
IsClientConnected(client)) {
        if (
IsClientInGame(client)) {
            if (
IsPlayerAlive(client)) {
                if (
GetClientTeam(client) == GetConVarInt(hcvar_team)) {
                    
SetEntityMoveType(clientMOVETYPE_NONE);
                    
TF2_RemoveAllWeapons(client);
                }
            }
        }
    }


??

This is a good one: #4 and on, passing clients safely
https://forums.alliedmods.net/showth...ientFromSerial
If you use userids, all you have to do is check if(client) to see if they are still ingame
also, isclientingame implies isclientconnected.
Only use isclientconnected, if you want to see if they are connected.. use isclientingame if you want to see if their entity exists in the game.

allllllllllllllllllllllso since you are geting a userid from an event... you already have it, so just pass that to your timer.

I'm not 100% sure on this, but I think I read somewhere that timers should return values for clarity =/
Either plugin_continue or plugin_stop I may very well be wrong on this one. I see people returning plugin_handled, and I dunno why they dot hat =|

igotfits 06-02-2013 18:34

Re: TF2 Idle Server Plugin?
 
ddhoward, i have the plugin running great!, but i noticed players do not spawn with weapons. so when they die nothing drops. that can be a problem because when the other team is killing them in hopes of them dropping weapons for ammo nothing drops. is there an alteration that can be made so they spawn with weapons but cant shoot?

igotfits 09-26-2013 20:28

Re: TF2 Idle Server Plugin?
 
Hey fellas me again, can this plugin be modded to allow the team to move but disable weapons?


All times are GMT -4. The time now is 05:10.

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