AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   I can help? (https://forums.alliedmods.net/showthread.php?t=208475)

her0p 02-13-2013 22:20

I can help?
 
will adapt this plugin for cs server normally, can say how?

http://forums.alliedmods.net/showthread.php?t=186150

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <zombieplague>
#include <dhudmessage>

#define PLUGIN    "Zombie Addon : HUD Stats "
#define VERSION    "1.0"
#define AUTHOR    "KiA"

/* Initialization */

new ZombieWins
new HumanWins

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
set_task(0.5,"HUDUpdate"0,"",0,"b")
    
    
/* CVARS */
    
    
register_cvar("zphud_rcolor","0"// RED
    
register_cvar("zphud_gcolor","255"// GREEN
    
register_cvar("zphud_bcolor","0"// BLUE
    
    
}

public 
zp_round_ended(WinTeam)
{
    switch(
WinTeam
    {
        case 
ZP_TEAM_ZOMBIE: {
            
ZombieWins ZombieWins 1
        
}
        case 
ZP_TEAM_HUMAN: {
            
HumanWins HumanWins 1
        
}
    }
}

public 
HUDUpdate()
{
    new 
zombies zp_get_zombie_count()
    new 
humans zp_get_human_count()
    
    
set_dhudmessage(get_cvar_num("zphud_rcolor"),get_cvar_num("zphud_gcolor"),get_cvar_num("zphud_bcolor"), -1.00.0506.012.0)
    
show_dhudmessage(0"Zombies [%i] | [%i] Humans^nZombie Wins [%i] | [%i] Human Wins" zombieshumansZombieWinsHumanWins)




Unkolix 02-14-2013 08:29

Re: I can help?
 
You want to know, how to launch a plugin?

her0p 02-14-2013 18:09

Re: I can help?
 
I want to fix this error to make it work on a server in cs, not zombie


PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <dhudmessage>

#define PLUGIN    "HUD Stats "
#define VERSION    "1.0"
#define AUTHOR    "KiA"

/* Initialization */

new TerroWins
new CtWins

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
set_task(0.5,"HUDUpdate"0,"",0,"b")
    
    
/* CVARS */
    
    
register_cvar("zphud_rcolor","0"// RED
    
register_cvar("zphud_gcolor","255"// GREEN
    
register_cvar("zphud_bcolor","0"// BLUE
    
    
}

public 
zp_round_ended(WinTeam)
{
    switch(
WinTeam
    {
        case 
CS_TEAM_T: {
            
TerroWins TerroWins 1
        
}
        case 
CS_TEAM_CT: {
            
CtWins CtWins 1
        
}
    }
}

public 
HUDUpdate()
{
    new 
terror CS_TEAM_T()
    new 
cts CS_TEAM_CT()
    
    
set_dhudmessage(get_cvar_num("zphud_rcolor"),get_cvar_num("zphud_gcolor"),get_cvar_num("zphud_bcolor"), -1.00.0506.012.0)
    
show_dhudmessage(0"Terroristas [%i] | [%i] Counter^nTerroristas Wins [%i] | [%i] Counter Wins" terrorctsTerroWinsCtWins)



I tried but I get this error

PHP Code:

ErrorInvalid function callnot a valid address on line 45
Error
Invalid expressionassumed zero on line 45
Warning
Expression has no effect on line 45
Error
Invalid function callnot a valid address on line 46
Error
Too many error messages on one line on line 46 


Torge 02-14-2013 18:32

Re: I can help?
 
You removed #include <zombieplague> that's why it failed.

her0p 02-14-2013 19:01

Re: I can help?
 
Quote:

Originally Posted by Torge (Post 1894529)
You removed #include <zombieplague> that's why it failed.

I want to work on a server without cs zombie mod, so remove the include to adapt. The original strip me this error.

PHP Code:

[AMXXPlugin "hud_stats.amxx" failed to loadPlugin uses an unknown function (name "zp_get_human_count") - check your modules.ini


wickedd 02-14-2013 19:17

Re: I can help?
 
@her0p
You need to rewrite the plugin. I suggest you search "team score" in the scripting help forum.

Kia 02-15-2013 10:14

Re: I can help?
 
Here you go : https://forums.alliedmods.net/showth...14#post1894914

her0p 02-15-2013 18:35

Re: I can help?
 
Quote:

Originally Posted by Kia (Post 1894915)

thank you very much, nice plugin


All times are GMT -4. The time now is 20:40.

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