Raised This Month: $ Target: $400
 0% 

How do i make an choice window(TF2)(VSCRIPT)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jarik_guy
Junior Member
Join Date: Dec 2023
Old 12-29-2023 , 17:39   How do i make an choice window(TF2)(VSCRIPT)
Reply With Quote #1

How do i make an choice window in TF2 using vscript like on TF2 servers?

Im trying to make a simple vscript ""mod"" that allows people to replace their 'porters with nano sentries and i need to make people able to switch it on and off.

I figured out that i should use something like those selection windows that are on the TF2 servers but i cant figure out how to make them.

If anybody knows please respond.


Mod code(if that helps):

local entity = null
while (entity = Entities.FindByClassname(entity, "obj_teleporter"))
{
printl(entity)
printl(entity.GetModelName())
printl(entity.GetTeam())
if(entity.GetMaxHealth() == 150)
{
if (entity.GetModelName() == "models/buildables/teleporter_light.mdl")
{
entity.SetMaxHealth(50)
local secondary = SpawnEntityFromTable("obj_sentrygun",
{
// This is a table of keyvalues, which is the same way as keyvalues that are defined in Hammer
// Key Value
defaultupgrade = 0,
teamnum = entity.GetTeam(),
origin = entity.EyePosition()+entity.EyeAngles().Forwa rd(),
angles = entity.EyeAngles()
})

secondary.SetModelScale(0.6,0)
secondary.SetSkin((1 - (entity.GetTeam() - 1)) + 2)
secondary.SetOwner(entity.GetOwner())
printl("aditional sentry skin value")
printl(secondary.GetSkin())
secondary.SetMaxHealth(50)
secondary.SetHealth(50)
entity.Destroy()
}

}
}
jarik_guy is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-29-2023 , 21:04   Re: How do i make an choice window(TF2)(VSCRIPT)
Reply With Quote #2

Step 1: Post in a section of the form that supports that game. You're currently posting in the AMX Mod X section which is a tool that doesn't run on TF2 (it'll run on TFC). If you're asking about a SourceMod plugin, you should post in the SourceMod section of the forums.
__________________
fysiks is offline
jarik_guy
Junior Member
Join Date: Dec 2023
Old 12-30-2023 , 08:14   Re: How do i make an choice window(TF2)(VSCRIPT)
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
Step 1: Post in a section of the form that supports that game. You're currently posting in the AMX Mod X section which is a tool that doesn't run on TF2 (it'll run on TFC). If you're asking about a SourceMod plugin, you should post in the SourceMod section of the forums.
Where do i post the stuff related with vscript?
jarik_guy is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-31-2023 , 17:50   Re: How do i make an choice window(TF2)(VSCRIPT)
Reply With Quote #4

Wherever it's actually supported. Maybe try wherever you went to get the files to install it. I'm not familiar with it so I wouldn't know.
__________________
fysiks is offline
Reply



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 18:31.


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