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

TF2Classic


Post New Thread Reply   
 
Thread Tools Display Modes
CrancK
Senior Member
Join Date: Jan 2009
Location: Netherlands
Old 04-17-2009 , 07:21   Re: TF2Classic
Reply With Quote #21

updatey,

-added a welcome message, (didn't know quite yet what to put into it, so for the moment it'll only tell you theres a mod on the server + that you can type /info for info, which atm is only saying to bind keys to +nade1 and +nade2)
-speedometer now in units
-doors open quicker now (note, doors which are not func_door still open slowly, example: granary doors on second point)
-some minor tweaks i forgot
CrancK is offline
MikeJS
Senior Member
Join Date: Nov 2008
Old 04-17-2009 , 09:38   Re: TF2Classic
Reply With Quote #22

Quote:
Originally Posted by CrancK View Post
-doors open quicker now (note, doors which are not func_door still open slowly, example: granary doors on second point)
If they're prop_dynamics with a nodraw'd func_door inside them like most of the doors in TF2 are, you could make the prop_dynamic non solid.

edit: stupid idea
__________________

Last edited by MikeJS; 04-17-2009 at 11:12.
MikeJS is offline
CrancK
Senior Member
Join Date: Jan 2009
Location: Netherlands
Old 04-17-2009 , 10:41   Re: TF2Classic
Reply With Quote #23

true, but the problem with that, is that, i can't just do that for all prop_dynamics(since they might not be doors, ressuply locker for example) and i don't know the specific names of doors, so i really don't know how to find which entities are those doors, which are not func_door
CrancK is offline
CrancK
Senior Member
Join Date: Jan 2009
Location: Netherlands
Old 04-18-2009 , 05:25   Re: TF2Classic
Reply With Quote #24

however... it might work, if valve named all doors with door, because then i could check StrContains("door") on the targetname of all the prop_dynamics

i'll see what i can about it, because many doors in tf2 are not func_doors, making them quite annoying

(though it could be that some "door"s are not actual doors, making people able to walk through certain prop_dynamics, ahwell... only one way to find out )


edit: question about that though, would this be the correct way of dispatching the keyvalue?
(because if so, then none of the prop_dynamics are called door , because it didn't find anything )
PHP Code:
setDoorSpeed()
{
    new 
ent MaxClients+1;
    while((
ent FindEntityByClassname(ent"func_door"))!=-1
    {
        
PrintToServer("found door %i"ent);
        
//SetVariantString("1234.5");
        //DispatchKeyValue(ent, speed, 1234);
        
SetVariantFloat(6789.0);
        
AcceptEntityInput(ent"SetSpeed");
    }
    
ent MaxClients+1;
    while((
ent FindEntityByClassname(ent"prop_dynamic"))!=-1
    {
        if (
IsValidEdict(ent))
        {
            
GetEntPropString(entProp_Data"m_iName"tNamesizeof(tName));
            if (
StrContains(tName,"door",false)!=-1)
            {
                
PrintToServer("entity: %i, full name:%s"enttName);
                
DispatchKeyValue(ent"solid""0");
            }
        }
    }

edit2: even better, after testing this a bit, it seems that the badlands doors mostly are called doors, thus you can now go through them, on granary, the slow ones aren't called door, though the ones at spawn are (or the ones at spawn are func_doors), and on cp_fastlane the doors aren't called door, and again.. the ones at spawn are called door or are func_door...

hmmm.. any other common name for door which valve uses? (already tried gate, works for some doors)
also, is it possible to make doors with other kind of entities? prop_dynamic_override? if so... i'll have to search them aswell...

Last edited by CrancK; 04-18-2009 at 06:33.
CrancK is offline
retsam
Veteran Member
Join Date: Aug 2008
Location: so-cal
Old 04-18-2009 , 13:17   Re: TF2Classic
Reply With Quote #25

Can you please add a cvar to allow for nades when respawning? Having to go to a locker to get nades is, well, ridiculous. We were considering replacing the default tf2 nades with this one, but I cant do that if theres no way to spawn with nades.
retsam is offline
CrancK
Senior Member
Join Date: Jan 2009
Location: Netherlands
Old 04-18-2009 , 14:22   Re: TF2Classic
Reply With Quote #26

sure, one cvar coming up, i'll prolly have it done by tonightish (maybe tommorowish) ;)

done, i've made it into a cvar with 3 modes,

0 = no nades on spawn
1 = resupply locker amount of nades on spawn (amounts defined in cvars, ie :tf2c_nades_health_min, tf2c_nades_frag_engineer_min)
2 = max amount of nades on spawn (amounts defined in cvars, ie:tf2c_nades_health_max, tf2c_nades_frag_engineer_max)

Last edited by CrancK; 04-18-2009 at 16:15.
CrancK is offline
retsam
Veteran Member
Join Date: Aug 2008
Location: so-cal
Old 04-18-2009 , 22:10   Re: TF2Classic
Reply With Quote #27

You did it already? Awesome man.

Last edited by retsam; 04-18-2009 at 22:14.
retsam is offline
clad
Senior Member
Join Date: Oct 2006
Old 04-19-2009 , 04:18   Re: TF2Classic
Reply With Quote #28

Quote:
Originally Posted by CrancK View Post
sure, one cvar coming up, i'll prolly have it done by tonightish (maybe tommorowish) ;)

done, i've made it into a cvar with 3 modes,

0 = no nades on spawn
1 = resupply locker amount of nades on spawn (amounts defined in cvars, ie :tf2c_nades_health_min, tf2c_nades_frag_engineer_min)
2 = max amount of nades on spawn (amounts defined in cvars, ie:tf2c_nades_health_max, tf2c_nades_frag_engineer_max)
This would be exactly what we need.

i downloaded the .sp and compiled it with no errors, and loaded it up.
i still do not spawn with grenades.
So i downloaded the TF2Classic package and tried yours that was compiled.
It throws out this in the server console.


Code:
L 04/19/2009 - 04:14:59: [SM] Displaying call stack trace for plugin "TF2Classic.smx":
L 04/19/2009 - 04:14:59: [SM]   [0]  Line 94, F:\downloads\sourcemod-1.2.0\addons\sourcemod\scripting\include\tf2_stocks.inc::TF2_GetPlayerClass()
L 04/19/2009 - 04:14:59: [SM]   [1]  Line 510, F:\downloads\sourcemod-1.2.0\addons\sourcemod\scripting\TF2Classic.sp::MainEvents()
L 04/19/2009 - 04:15:04: [SM] Native "GetEntProp" reported: Entity 2 is invalid
L 04/19/2009 - 04:15:04: [SM] Displaying call stack trace for plugin "TF2Classic.smx":
L 04/19/2009 - 04:15:04: [SM]   [0]  Line 94, F:\downloads\sourcemod-1.2.0\addons\sourcemod\scripting\include\tf2_stocks.inc::TF2_GetPlayerClass()
L 04/19/2009 - 04:15:04: [SM]   [1]  Line 510, F:\downloads\sourcemod-1.2.0\addons\sourcemod\scripting\TF2Classic.sp::MainEvents()
__________________
clad is offline
CrancK
Senior Member
Join Date: Jan 2009
Location: Netherlands
Old 04-19-2009 , 14:52   Re: TF2Classic
Reply With Quote #29

clad: that's weird, i'll check if i can find anything wrong with it, it works for me though, but maybe i might have messed something up in the uploading (if i cant find anything, i'll try just reuploading it)

(the error message is strange though, since it uses entity with id 2, and i think id's 1-32 are reserved for clients, so somehow the client got invalid, i think...)

edit:

i've added several checks to it, so it shouldn't error out anymore, could you check please? as i can't on my server since it works without it aswell :S
Attached Files
File Type: sp Get Plugin or Get Source (TF2Classic.sp - 161 views - 109.6 KB)

Last edited by CrancK; 04-19-2009 at 15:15.
CrancK is offline
clad
Senior Member
Join Date: Oct 2006
Old 04-20-2009 , 13:52   Re: TF2Classic
Reply With Quote #30

I get this in the server console before anyone even joins.

Code:
L 04/20/2009 - 13:30:47: [SM] Native "IsPlayerAlive" reported: Invalid client index 25
L 04/20/2009 - 13:30:47: [SM] Displaying call stack trace for plugin "TF2Classic.smx":
L 04/20/2009 - 13:30:47: [SM]   [0]  Line 515, TF2Classic.sp::MainEvents()
L 04/20/2009 - 13:30:47: [SM]   [1]  Line 433, TF2Classic.sp::OnMapStart()
after i joined i never spawn with grenades, so i killed myself thinking maybe it was because the server was just started. I still didn't receive any nades at spawn. i am testing this on dustbowl.

this was after i joined:

Code:
L 04/20/2009 - 13:40:15: [SM] Native "IsPlayerAlive" reported: Invalid client index 25
L 04/20/2009 - 13:40:15: [SM] Displaying call stack trace for plugin "TF2Classic.smx":
L 04/20/2009 - 13:40:15: [SM]   [0]  Line 515, TF2Classic.sp::MainEvents()
L 04/20/2009 - 13:40:20: [SM] Native "IsPlayerAlive" reported: Invalid client index 25
L 04/20/2009 - 13:40:20: [SM] Displaying call stack trace for plugin "TF2Classic.smx":
L 04/20/2009 - 13:40:20: [SM]   [0]  Line 515, TF2Classic.sp::MainEvents()
Let me ask you tho.. this is a dedicated server (anyone can join) but it's on my own network where i'm testing it. would that matter ?
__________________
clad 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 21:11.


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