Raised This Month: $12 Target: $400
 3% 

[TF2] Add a plugin to disable cloaking or disguising as spy?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DeathGod
Junior Member
Join Date: Jan 2016
Old 02-19-2018 , 03:13   [TF2] Add a plugin to disable cloaking or disguising as spy?
Reply With Quote #1

Can this happen?
__________________
DeathGod is offline
timtam95
Member
Join Date: Feb 2018
Old 02-19-2018 , 08:31   Re: [TF2] Add a plugin to disable cloaking or disguising as spy?
Reply With Quote #2

Why not just remove any spy cloak weapons on spawn? I can write a plugin to do that if you want.
timtam95 is offline
DeathGod
Junior Member
Join Date: Jan 2016
Old 02-19-2018 , 23:53   Re: [TF2] Add a plugin to disable cloaking or disguising as spy?
Reply With Quote #3

Would you know to disable the disguise kit for spy? If so, could you write me one please?
__________________
DeathGod is offline
timtam95
Member
Join Date: Feb 2018
Old 02-20-2018 , 12:54   Re: [TF2] Add a plugin to disable cloaking or disguising as spy?
Reply With Quote #4

::
Attached Files
File Type: smx TF2NoSpyCloakOrDisguise.smx (4.9 KB, 90 views)
File Type: sp Get Plugin or Get Source (TF2NoSpyCloakOrDisguise.sp - 251 views - 1.3 KB)
timtam95 is offline
ThatKidWhoGames
Veteran Member
Join Date: Jun 2013
Location: IsValidClient()
Old 02-20-2018 , 15:12   Re: [TF2] Add a plugin to disable cloaking or disguising as spy?
Reply With Quote #5

Quote:
Originally Posted by timtam95 View Post
::
That plugin won't work since you hooked player_spawn instead of post_inventory_application.

post_inventory_application is called when the player touches resupply or receives a new set of weapons. The player hasn't received the weapons with the player_spawn event yet. Furthermore, since you are only attempting to remove the weapons on spawn, this means that if they touch resupply they will receive the weapons again. Also, I would recommend reading up on the new syntax. Here is a fixed version with the updated syntax. You also defined includes that aren't even used in the plugin.

Oh yeah, another tip, if the plugin doesn't use custom includes (ones that don't come with sourcemod), only upload the .sp file as it will compile on the forums.
Attached Files
File Type: sp Get Plugin or Get Source (nocloakordisguise.sp - 265 views - 934 Bytes)

Last edited by ThatKidWhoGames; 02-20-2018 at 15:15.
ThatKidWhoGames is offline
DeathGod
Junior Member
Join Date: Jan 2016
Old 02-20-2018 , 22:13   Re: [TF2] Add a plugin to disable cloaking or disguising as spy?
Reply With Quote #6

Quote:
Originally Posted by ThatKidWhoGames View Post
That plugin won't work since you hooked player_spawn instead of post_inventory_application.

post_inventory_application is called when the player touches resupply or receives a new set of weapons. The player hasn't received the weapons with the player_spawn event yet. Furthermore, since you are only attempting to remove the weapons on spawn, this means that if they touch resupply they will receive the weapons again. Also, I would recommend reading up on the new syntax. Here is a fixed version with the updated syntax. You also defined includes that aren't even used in the plugin.

Oh yeah, another tip, if the plugin doesn't use custom includes (ones that don't come with sourcemod), only upload the .sp file as it will compile on the forums.
Thanks for this, but could you maybe just make it so it just disables the disguise menu?
__________________
DeathGod is offline
ThatKidWhoGames
Veteran Member
Join Date: Jun 2013
Location: IsValidClient()
Old 02-21-2018 , 00:40   Re: [TF2] Add a plugin to disable cloaking or disguising as spy?
Reply With Quote #7

Quote:
Originally Posted by DeathGod View Post
Thanks for this, but could you maybe just make it so it just disables the disguise menu?
Yeah, here ya go!
Attached Files
File Type: sp Get Plugin or Get Source (nodisguise.sp - 278 views - 826 Bytes)
ThatKidWhoGames is offline
Reply


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 04:46.


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