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

[DoDS] Medic Class 1.0.111 UPDATED April, 9, 2009


Post New Thread Reply   
 
Thread Tools Display Modes
strontiumdog
Veteran Member
Join Date: Jan 2007
Location: BC, Canada
Old 07-30-2008 , 19:41   Re: [DoDS] Medic Class UPDATED July 16, 2008
Reply With Quote #31

<------- Spot the idiot.

I added punch to the list of weapons to remove....which would crash a server.
Should work now.
__________________
Plugins | TheVille
Zombie Mod for DoD:S - l4dod.theville.org
strontiumdog is offline
Lebson506th
Veteran Member
Join Date: Jul 2008
Old 07-30-2008 , 20:03   Re: [DoDS] Medic Class UPDATED July 16, 2008
Reply With Quote #32

Still crashes.


EDIT: Nevermind. A warning though, just reloading the plugin didn't do it. The server had to be restarted.
EDIT2: A thought, can you put in a case that responds to the sm_medic_who to the console is client == 0?

Last edited by Lebson506th; 07-30-2008 at 21:30.
Lebson506th is offline
strontiumdog
Veteran Member
Join Date: Jan 2007
Location: BC, Canada
Old 07-30-2008 , 22:02   Re: [DoDS] Medic Class UPDATED July 16, 2008
Reply With Quote #33

I've noticed that after recent updates in SourceMod.
Just reloading worked for some plugins but not others.

Will look at the sm_medic_who thingy!
__________________
Plugins | TheVille
Zombie Mod for DoD:S - l4dod.theville.org
strontiumdog is offline
Mosalar
Senior Member
Join Date: Jul 2004
Location: Tampa Fl
Old 07-30-2008 , 22:25   Re: [DoDS] Medic Class UPDATED July 16, 2008
Reply With Quote #34

I can see how to restrict the use to a single class, is there a way to restrict it to 2-3 classes?
Mosalar is offline
strontiumdog
Veteran Member
Join Date: Jan 2007
Location: BC, Canada
Old 07-31-2008 , 00:10   Re: [DoDS] Medic Class UPDATED July 16, 2008
Reply With Quote #35

Yeah, I've been meaning to add this. The ES version had that.
__________________
Plugins | TheVille
Zombie Mod for DoD:S - l4dod.theville.org
strontiumdog is offline
Lebson506th
Veteran Member
Join Date: Jul 2008
Old 08-04-2008 , 16:35   Re: [DoDS] Medic Class UPDATED July 16, 2008
Reply With Quote #36

If you are playing as a normal class, type !class_medic and then shoot your gun it is destroyed like you instantly became a medic.

and

Code:
L 08/04/2008 - 18:17:56: Info (map "dod_argentan") (file "errors_20080804.log")
L 08/04/2008 - 18:17:56: [SM] Native "GetClientTeam" reported: Client 9 is not in game
L 08/04/2008 - 18:17:56: [SM] Debug mode is not enabled for "sm_dod_medic_class.smx"
L 08/04/2008 - 18:17:56: [SM] To enable debug mode, edit plugin_settings.cfg, or type: sm plugins debug 22 on
I'll try to get the debug


Also, this should make the sm_medic_who respond to a console query

PHP Code:
public Action:Who(clientargs)
{
    new 
ctr 0
    
if(client == 0) {
        for(new 
1<= GetConVarInt(g_Cvar_MedicMax); i++) {
            if(
g_medic_master[1][i] != 0) {
                new 
String:playerName[128]
                
GetClientName(g_medic_master[1][i], playerNamesizeof(playerName))

                
PrintToServer("Axis Medic #%i: %s"iplayerName)
                
ctr++
            }
        }
        for(new 
1<= GetConVarInt(g_Cvar_MedicMax); i++) {
            if(
g_medic_master[2][i] != 0) {
                new 
String:playerName[128]
                
GetClientName(g_medic_master[2][i], playerNamesizeof(playerName))

                
PrintToServer("Allies Medic #%i: %s"iplayerName)
                
ctr++
            }
        }
    }
    else {
        new 
team GetClientTeam(client)

        for (new 
1<= GetConVarInt(g_Cvar_MedicMax); i++) {
            if (
g_medic_master[team][i] != 0) {
                new 
String:playerName[128]
                
GetClientName(g_medic_master[team][i], playerNamesizeof(playerName))

                if (
IsClientInGame(client)) {
                    
PrintToChat(client"Medic #%i: %s"iplayerName)
                }
                
ctr++
            }
        }    
    }

    
// Added by Lebson506th
    
if (ctr == 0) {
        if(
client == 0) {
            
PrintToServer("[SM] The medic class is not being used")
        }
        else if (
IsClientInGame(client)) {
            
PrintToChat(client"[SM] There are no medics on your team")
        }
    }

    return 
Plugin_Handled


Last edited by Lebson506th; 08-04-2008 at 19:51.
Lebson506th is offline
Lebson506th
Veteran Member
Join Date: Jul 2008
Old 08-04-2008 , 21:42   Re: [DoDS] Medic Class UPDATED August 4, 2008
Reply With Quote #37

I see the update, here's the debug info.

It's fixed in my above posted and improved code

Code:
L 08/04/2008 - 18:36:13: [SM] Native "GetClientTeam" reported: Client index 0 is invalid
L 08/04/2008 - 18:36:13: [SM] Displaying call stack trace for plugin "sm_dod_medic_class.smx":
L 08/04/2008 - 18:36:13: [SM]   [0]  Line 553, /home/groups/sourcemod/upload_tmp/phpymePoi.sp::Who()

Edit: I just came up with an idea. Can you hook the say and stop the player from actually saying "!heal" so it doesn't spam the chat?

Last edited by Lebson506th; 08-05-2008 at 13:58.
Lebson506th is offline
coal
Junior Member
Join Date: Aug 2008
Old 08-23-2008 , 19:03   Re: [DoDS] Medic Class UPDATED August 4, 2008
Reply With Quote #38

i tryed every thing wont work on my server still crashes im runnig 1.0.0.11 had to take it off
coal is offline
Lebson506th
Veteran Member
Join Date: Jul 2008
Old 08-23-2008 , 19:06   Re: [DoDS] Medic Class UPDATED August 4, 2008
Reply With Quote #39

Quote:
Originally Posted by coal View Post
i tryed every thing wont work on my server still crashes im runnig 1.0.0.11 had to take it off
What version of sourcemod?

Are there errors that come up when you try to run it?
__________________
My Plugins
Spray Tracer by Nican, maintained by me
Simple TK Manager
DoD:S Admin Weapons

Links
Resistance and Liberation (A HL2 Multiplayer Modification)
Lebson506th is offline
coal
Junior Member
Join Date: Aug 2008
Old 08-23-2008 , 22:47   Re: [DoDS] Medic Class UPDATED August 4, 2008
Reply With Quote #40

mani v 1.2betes mm:s v1.6.1 havent seen any errors
coal 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 19:12.


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