[TF2] Multiple Buildings with pda & no extension
1 Attachment(s)
Hello !
I don't know if this has been done before but this plugin allows you to quickly setup a game with a custom sentry/dispenser limit. Other plugins have that feature what's different? I haven't searched trough all of the internet but so far, i've seen three different ways to do that.
Well this plugin here needs no server restart, no custom extension and directly uses the ingame pda Cvars & Commands Cvars sm_sentry_limit How many sentries a single player can build. sm_dispenser_limit Same but for the dispensers. Commands: sm_destroy_dispensers Destroy all the dispensers owned by the player who runs this command. sm_destroy_sentries Same but for the sentries Plugin in action: https://www.youtube.com/watch?v=ByQGOWs4h-E Changelog: 1.1:
|
Re: [TF2] Multiple Buildings with pda & no extension
Okay, the sapper trick is really really neat. Nice find.
I don't think you need to cache the offset for m_hBuilder, I believe SM's GetEntProp already does offset caching. I think you could probably pull out the instant upgrade functionality/cvar into a separate plugin, but I also thought that tf_fastbuild existed to provide the same functionality. |
Re: [TF2] Multiple Buildings with pda & no extension
Unfortunately, tf_fastbuild builds instantly but only to level 1, but this functionality is there because i need it for my server ^^.
Yeah actually i'm quite surprised the sapper trick doesn't screw the server up. As for the GetEntProp thing, i had tried GetEntProp(i,Prop_send,"m_hBuilder") but since it's an handle it was returning me weird numbers. The only workaround i found was the offset caching. But if you know a cleaner way to do that please, tell me :) |
Re: [TF2] Multiple Buildings with pda & no extension
GetEntPropEnt?
Should update the inline comments for 'if player is not holding build box' instead of 'if player is holding wrench', etc. Was super confused for a bit there. |
Re: [TF2] Multiple Buildings with pda & no extension
You also need to add the weapon switch hook for all existing clients on plugin start (in the event of plugin reload)
The IsClientInGame safety check in the weapon switch hook should have a ! |
Re: [TF2] Multiple Buildings with pda & no extension
Could you post an example of using GetEntPropEnt with an m_h... prop? I couldn't manage to get it working :/
Also yes i've updated the comments and the safety checks (what a stupid mistake for a last minute edit)... |
Re: [TF2] Multiple Buildings with pda & no extension
int client = GetEntPropEnt(object, Prop_Send, "m_hBuilder"); should work...
Some of those safety checks in there don't seem necessary. Why does the player's secondary weapon need to be valid (slot 1) for this to function, for example? Dyou mind putting this up on GitHub or something? |
Re: [TF2] Multiple Buildings with pda & no extension
Can someone make this with a cfg file automated into cfg/sourcemod folder?
|
Re: [TF2] Multiple Buildings with pda & no extension
1 Attachment(s)
Quote:
|
Re: [TF2] Multiple Buildings with pda & no extension
Great plugin! See in action @ -<ktrain's tf2 server>-
1. Can this be upgraded to also allow multiple teleporter entrances and exits? thanks |
All times are GMT -4. The time now is 00:36. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.