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

[rq] mode current


Post New Thread Reply   
 
Thread Tools Display Modes
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 07-10-2014 , 01:46   Re: [rq] mode current
Reply With Quote #31

Quote:
For me the author its only meTaLiCroSS, SeniorRamos this guy just added some lines.
Thank you. I will edit the list.
zmd94 is offline
Drissdev1
Senior Member
Join Date: Jun 2014
Old 07-10-2014 , 07:23   Re: [rq] mode current
Reply With Quote #32

Thank you big thank you zmd94 <3
Drissdev1 is offline
Kegla
Member
Join Date: Mar 2014
Location: Serbia
Old 07-11-2014 , 13:42   Re: [rq] mode current
Reply With Quote #33

This is how you can find nemesis or survivor health.

PHP Code:
zp_get_survivor_health()
{
    new 
surv_id zp_get_survivor_id()
    new 
health get_user_health(surv_id)
    return 
health
}
zp_get_nemesis_health()
{
    new 
nem_id zp_get_nemesis_id()
    new 
health get_user_health(nem_id)
    return 
health
}
zp_get_survivor_id()
{
    new 
players[32], num 
    get_players
(playersnum)
    for (new 
id 1id <= numid++)
    {
        if (
is_user_alive(id) && zp_get_user_survivor(id))
        {
            return 
id
        
}
    }
    return -
1
}
zp_get_nemesis_id()
{
    new 
players[32], num 
    get_players
(playersnum)
    for (new 
id 1id <= numid++)
    {
        if (
is_user_alive(id) && zp_get_user_nemesis(id))
        {
            return 
id
        
}
    }
    return -
1

Kegla is offline
Gam3ronE
SourceMod Donor
Join Date: Aug 2010
Old 07-12-2014 , 12:34   Re: [rq] mode current
Reply With Quote #34

Quote:
Originally Posted by zmd94 View Post
I have tested it and it still the same like before for Snipers VS Assassins mode.

However, maybe you misedit this line:
PHP Code:
else if ( zp_is_sniper_round() )
    {
// Hud Options
set_hudmessage(rgb_hud_colors[g_Mode][0], rgb_hud_colors[g_Mode][1], rgb_hud_colors[g_Mode][2], HUD_MODE_XHUD_MODE_Y06.012.0)
// Now the hud appears
ShowSyncHudMsg(idg_SyncHud"%s%s^nSnipers: %i | Humans: %i", (g_Mode == "" hud_tag), mode_names[g_Mode], snipershumans)

So, I edit it to:
PHP Code:
else if ( zp_is_sniper_round() )
    {
// Hud Options
set_hudmessage(rgb_hud_colors[g_Mode][0], rgb_hud_colors[g_Mode][1], rgb_hud_colors[g_Mode][2], HUD_MODE_XHUD_MODE_Y06.012.0)
// Now the hud appears
ShowSyncHudMsg(idg_SyncHud"%s%s^nSnipers: %i | Zombie: %i", (g_Mode == "" hud_tag), mode_names[g_Mode], sniperszombies)

@ Drissdev1.

It is more better if the file is in .sma file not in .amxx file. However, thank you for sharing.
Thanks, updated.
Gam3ronE is offline
Gam3ronE
SourceMod Donor
Join Date: Aug 2010
Old 07-12-2014 , 12:48   Re: [rq] mode current
Reply With Quote #35

Quote:
Originally Posted by Kegla View Post
This is how you can find nemesis or survivor health.

PHP Code:
zp_get_survivor_health()
{
    new 
surv_id zp_get_survivor_id()
    new 
health get_user_health(surv_id)
    return 
health
}
zp_get_nemesis_health()
{
    new 
nem_id zp_get_nemesis_id()
    new 
health get_user_health(nem_id)
    return 
health
}
zp_get_survivor_id()
{
    new 
players[32], num 
    get_players
(playersnum)
    for (new 
id 1id <= numid++)
    {
        if (
is_user_alive(id) && zp_get_user_survivor(id))
        {
            return 
id
        
}
    }
    return -
1
}
zp_get_nemesis_id()
{
    new 
players[32], num 
    get_players
(playersnum)
    for (new 
id 1id <= numid++)
    {
        if (
is_user_alive(id) && zp_get_user_nemesis(id))
        {
            return 
id
        
}
    }
    return -
1

What is the purpose of return -1?
Gam3ronE is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 07-13-2014 , 00:39   Re: [rq] mode current
Reply With Quote #36

Quote:
Thanks, updated.
Thank you very much. I have tested it and it still the same like before for Snipers VS Assassins mode.

However, maybe you misedit this line "| Sniper: %i --> survivors":
PHP Code:
else if ( zp_is_lnj_round() || zp_is_plague_round() )
    {
// Hud Options
set_hudmessage(rgb_hud_colors[g_Mode][0], rgb_hud_colors[g_Mode][1], rgb_hud_colors[g_Mode][2], HUD_MODE_XHUD_MODE_Y06.012.0)
// Now the hud appears
ShowSyncHudMsg(idg_SyncHud"%s%s^nNemesis': %i | Zombies: %i | Sniper: %i | Humans: %i", (g_Mode == "" hud_tag), mode_names[g_Mode], nemesiszombiessurvivorshumans)

So, i change it:
PHP Code:
else if ( zp_is_lnj_round() || zp_is_plague_round() )
    {
// Hud Options
set_hudmessage(rgb_hud_colors[g_Mode][0], rgb_hud_colors[g_Mode][1], rgb_hud_colors[g_Mode][2], HUD_MODE_XHUD_MODE_Y06.012.0)
// Now the hud appears
ShowSyncHudMsg(idg_SyncHud"%s%s^nNemesis': %i | Zombies: %i | Survivor: %i | Humans: %i", (g_Mode == "" hud_tag), mode_names[g_Mode], nemesiszombiessurvivorshumans)

zmd94 is offline
Kegla
Member
Join Date: Mar 2014
Location: Serbia
Old 07-13-2014 , 04:22   Re: [rq] mode current
Reply With Quote #37

Code:
zp_get_nemesis_id() 
{ 
    new players[32], num  
    get_players(players, num) 
    for (new id = 1; id <= num; id++) 
    { 
        if (is_user_alive(id) && zp_get_user_nemesis(id)) 
        { 
            return id 
        } 
    } 
    return -1 
}


It must return some value. -1 means his id(nemesis id).

This thing work, i tested it, so zmd94 you can added features like this:

Nemesis Round
Humans: %i | Nemesis Health: %i

Plague Round
Humans: %i | Zombies: %i
Nemesis HP: %i
Survivor HP: %i

.....


Last edited by Kegla; 07-13-2014 at 04:23.
Kegla is offline
Gam3ronE
SourceMod Donor
Join Date: Aug 2010
Old 07-13-2014 , 06:35   Re: [rq] mode current
Reply With Quote #38

Quote:
Originally Posted by zmd94 View Post
Thank you very much. I have tested it and it still the same like before for Snipers VS Assassins mode.

However, maybe you misedit this line "| Sniper: %i --> survivors":
PHP Code:
else if ( zp_is_lnj_round() || zp_is_plague_round() )
    {
// Hud Options
set_hudmessage(rgb_hud_colors[g_Mode][0], rgb_hud_colors[g_Mode][1], rgb_hud_colors[g_Mode][2], HUD_MODE_XHUD_MODE_Y06.012.0)
// Now the hud appears
ShowSyncHudMsg(idg_SyncHud"%s%s^nNemesis': %i | Zombies: %i | Sniper: %i | Humans: %i", (g_Mode == "" hud_tag), mode_names[g_Mode], nemesiszombiessurvivorshumans)

So, i change it:
PHP Code:
else if ( zp_is_lnj_round() || zp_is_plague_round() )
    {
// Hud Options
set_hudmessage(rgb_hud_colors[g_Mode][0], rgb_hud_colors[g_Mode][1], rgb_hud_colors[g_Mode][2], HUD_MODE_XHUD_MODE_Y06.012.0)
// Now the hud appears
ShowSyncHudMsg(idg_SyncHud"%s%s^nNemesis': %i | Zombies: %i | Survivor: %i | Humans: %i", (g_Mode == "" hud_tag), mode_names[g_Mode], nemesiszombiessurvivorshumans)

It would be easier to understand if you explain like this:

What's expected to happen:

X.

What's actually happening:

Y.
Gam3ronE is offline
Gam3ronE
SourceMod Donor
Join Date: Aug 2010
Old 07-13-2014 , 06:37   Re: [rq] mode current
Reply With Quote #39

Updated based on your feedback, thanks for testing.
Gam3ronE 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 16:13.


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