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

Suggestion / Subplugin Request [REQ] Garg in a zombie plague (sub-round).


Post New Thread Reply   
 
Thread Tools Display Modes
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 11-25-2008 , 05:56   Re: [REQ] Garg in a zombie plague (sub-round).
Reply With Quote #11

Quote:
Then how Garg can get to the humans in some high structures or towers without ladders & stuff?
For example let's take zm_death_alley: humans will break the brigde and what Garg should do then to get them?
he is BIG. He can just step over some barricades, e.t.c.
but if you use small model, then jumping is ok, but it's not Garg =\

About roar - i don't know about amxx coding, but originally game had env_shake to shake players screen into certain area.

Last edited by SonicSonedit; 11-25-2008 at 06:00.
SonicSonedit is offline
Hammerfallerz
Senior Member
Join Date: Feb 2008
Old 11-25-2008 , 06:05   Re: [REQ] Garg in a zombie plague (sub-round).
Reply With Quote #12

Quote:
Originally Posted by SonicSonedit View Post
he is BIG. He can just step over some barricades, e.t.c.
I'm in doubt about how it will really work, so for the first tests he should be able to jump.

In any case, I failed again to transfer that flamethrower to the Garg Without transfering flamethrower everything compiles ok (finally).
Gives me a few errors and I don't even understand what exactly is wrong (I'm not a coder).

Please, experience coders, contact me, I really need your help
Hammerfallerz is offline
Mazzerin
BANNED
Join Date: Sep 2008
Location: Lithuania
Old 11-25-2008 , 08:57   Re: [REQ] Garg in a zombie plague (sub-round).
Reply With Quote #13

I hope you release this.I would use this.
Mazzerin is offline
Send a message via Skype™ to Mazzerin
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 11-25-2008 , 09:50   Re: [REQ] Garg in a zombie plague (sub-round).
Reply With Quote #14

Quote:
Gives me a few errors and I don't even understand what exactly is wrong (I'm not a coder).

Please, experience coders, contact me, I really need your help
Why don't you post errors in this thread? Someone will help you for sure!
SonicSonedit is offline
Hammerfallerz
Senior Member
Join Date: Feb 2008
Old 11-25-2008 , 11:28   Re: [REQ] Garg in a zombie plague (sub-round).
Reply With Quote #15

First of all, once again: I'm not a coder, so don't blame me for my lame methods. It's not a plugin, it's modified sourcecode.
Ok, what I did at first. I searched for zombieme function and found zombie/nemesis transformation (id,0,0,0), so red number won't have only 0\1 (zombie/nemesis), but also 2 (garg).
Here how it looks like (part of code):
Code:
// Zombie Me Function (player id, infector, turn into a nemesis, special mode)
zombieme(id, infector, nemesis, specialmode)
{
    // Pre user infect forward
    ExecuteForward(g_fwUserInfected_pre, g_fwDummyResult, id, infector)
    
    // Show zombie class menu if they haven't chosen any (e.g. just connected)
    if (g_zombieclass[id] == ZCLASS_NONE && get_pcvar_num(cvar_zclasses))
        set_task(2.0, "show_menu_zclass", id)
    
    // Set selected zombie class
    g_zombieclass[id] = g_zombieclassnext[id]
    
    // Way to go...
    g_zombie[id] = true
    g_survivor[id] = false
    
    // Set zombie attributes based on the mode
    if (!specialmode)
    {
        if (nemesis == 1)
        {
            // Nemesis
            g_nemesis[id] = true
            
            // Get nemesis health setting
            static nemhealth
            nemhealth = get_pcvar_num(cvar_nemhp)
            
            // Set health [0 = auto]
            if (!nemhealth)
                fm_set_user_health(id, g_zclass_hp[0]*(fnGetHumans()+1))
            else
                fm_set_user_health(id, nemhealth)
            
            // Set gravity
            set_pev(id, pev_gravity, get_pcvar_float(cvar_nemgravity))
        }
        else if (nemesis == 2)
        {
            // Garg
            g_garg[id] = true
            
            // Get garg health setting
            static garghealth
            garghealth = get_pcvar_num(cvar_garghp)
            
            // Set health [0 = auto]
            if (!garghealth)
                fm_set_user_health(id, g_zclass_hp[0]*(fnGetHumans()+1)*3) // Garg's hp
            else
                fm_set_user_health(id, g_zclass_hp[0]*(fnGetHumans()+1)*3) // Garg's hp in any way
            
            // Set gravity
            set_pev(id, pev_gravity, get_pcvar_float(cvar_garggravity))
        }
My server calculates nemesis hp by "players count * zombie health" and classes are turned off, so basically it's "players count * 1800". I wanted to make Garg A LOT more stronger (three times), so as you can see I did:
Code:
if (!garghealth)
                fm_set_user_health(id, g_zclass_hp[0]*(fnGetHumans()+1)*3) // Garg's hp
            else
                fm_set_user_health(id, g_zclass_hp[0]*(fnGetHumans()+1)*3) // Garg's hp in any way
Cuz I won't change it anyway.

Then I added all needed stuff for Garg. Basically I searched for ANYTHING that is used by nemesis (98%, didn't touched nemdamage, cuz it's pointless for Garg) and modified a copy-paste. All cvars, natives, consts, updated lang file, include, added needed modules from flamezombie class to the sourcecode, admin stuff etc etc etc and player var is called g_garg (just took all needed stuff with "nem" and modified it, then added it to the source code. Also added all checks that nemesis has, besides damage, once again it's completely modified copy-paste of nemesis). 0 warnings, 0 errors. Compiles fine, however, now Garg is just like nemesis, but deals damage with his claws like with normal knife. But I want him to have a flamethrower.

Now the hardest part comes: I have NO idea how to correctly transfer flamezombie's flamethrower.
Added to the "game vars":
Code:
new smoke
new fire
new burning
new isburning[33]
new tkcount[33]
new gmsgDeathMsg
new gmsgScoreInfo
new bool:flame[33]
Added to the "plugin precache":
Code:
    fire = precache_model("sprites/explode1.spr")
    smoke = precache_model("sprites/steam1.spr")
    burning = precache_model("sprites/xfire.spr")
    precache_sound("ambience/burning1.wav")
    precache_sound("ambience/flameburst1.wav")
    precache_sound("scientist/c1a0_sci_catscream.wav")
    precache_sound("vox/_period.wav")
    precache_sound("player/headshot2.wav")
To the "plugin init":
Code:
    register_cvar("amx_flamethrower_tkpunish1", "0")
    register_cvar("amx_flamethrower_tkpunish2", "0")
    register_cvar("amx_fl_hp", "10")
    // register_logevent("round_start", 2, "1=Round_Start")
    // register_logevent("round_end", 2, "1=Round_End")
    register_forward(FM_PlayerPreThink,"FM_PreThink")
Why this is commented?
Code:
    // register_logevent("round_start", 2, "1=Round_Start")
    // register_logevent("round_end", 2, "1=Round_End")
Cuz there's already
Code:
    register_logevent("logevent_round_start",2, "1=Round_Start")
    register_logevent("logevent_round_end", 2, "1=Round_End")
In a sourcecode, I will change this in flamezombie code.

Now part about what I'm completely unsure:
After setgravity for Garg I've added
Code:
                if (g_garg[id])
                {
                new cost = get_cvar_num("amx_fl_hp");
                fire_flamethrower(id);
                flame[id]=true
                }
amx_fl_hp will be set to 0 in any way, didn't wanted to remove that.
And after that I simply pasted everything from flamezombie starting from:
Code:
fire_flamethrower(id){
Until
Code:
public stop_firesound(args[]){
    isburning[args[0]] = 0
    emit_sound(args[0], CHAN_ITEM, "vox/_period.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
    return PLUGIN_CONTINUE
}
all parts with z_flame changed to g_garg
added in a start/end round, client connect (putinserver) / disconnect
Code:
flame[id]=false
And "FM_PreThink" part pasted to "Forward Player PreThink".
IN_USE changed to IN_ATTACK (so players will use flamethrower with not +use button, but with +attack button).
It's lame, I know, but I have no idea what else can I do, i'm not a coder.
In the end it gives me:
Quote:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Error: Invalid function call, not a valid address on line 1308
Error: Undefined symbol "id" on line 1308
Warning: Expression has no effect on line 1308

(complaints about "flame[d]=false" at logevent_round_start)

Error: Undefined symbol "id" on line 1318
Warning: Expression has no effect on line 1318
Same for flame[id]=false on logevent_round_end.

Warning: Function "fw_PlayerPreThink" should return a value on line 2379
Complaits about ";" in return;. Without ; -- no error.

Error: Undefined symbol "zp_get_user_zombie" on line 2411
Error: Function uses both "return" and "return <value>" on line 2411
Error: Undefined symbol "get_user_button" on line 2414
Error: Undefined symbol "get_user_oldbutton" on line 2415
Error: Array must be indexed (variable "g_garg") on line 2416
Error: Function uses both "return" and "return <value>" on line 2423
Error: Undefined symbol "set_user_health" on line 2425
Error: Undefined symbol "fire_flamethrower" on line 2426
Error: Undefined symbol "get_entity_flags" on line 2429
Warning: Function "fw_PlayerPreThink" should return a value on line 2461
Warning: Loose indentation on line 4837
Error: Undefined symbol "fire_flamethrower" on line 4840
Warning: Symbol is assigned a value that is never used: "cost" on line 4842
Warning: Loose indentation on line 4843
Error: Undefined symbol "fire_flamethrower" on line 4843
Error: Undefined symbol "sqrt" on line 4920
Error: Undefined symbol "check_burnzone" on line 4933
Warning: Symbol is assigned a value that is never used: "radius" on line 4938
Warning: Symbol is assigned a value that is never used: "speed2" on line 4938
Warning: Symbol is assigned a value that is never used: "speed1" on line 4938
Warning: Unreachable code on line 4940
Error: Invalid expression, assumed zero on line 4940
Error: Undefined symbol "te_spray" on line 4940
Error: Undefined symbol "args" on line 4945
Warning: Expression has no effect on line 4945
Error: Expected token: ";", but found "]" on line 4945
Error: Invalid expression, assumed zero on line 4945
Error: Too many error messages on one line on line 4945
Dont even want to comment this

Compilation aborted.
22 Errors.
Can any experienced coder help me to give Garg a flamethrower? Please, contact me!
Hammerfallerz is offline
Mazzerin
BANNED
Join Date: Sep 2008
Location: Lithuania
Old 11-25-2008 , 11:33   Re: [REQ] Garg in a zombie plague (sub-round).
Reply With Quote #16

I wish someone helped you and I could play this Garglike mode.You could add zp_garg "name" command as well.And, make CVars.That would be a perfect-original mode.
Mazzerin is offline
Send a message via Skype™ to Mazzerin
Hammerfallerz
Senior Member
Join Date: Feb 2008
Old 11-25-2008 , 11:36   Re: [REQ] Garg in a zombie plague (sub-round).
Reply With Quote #17

Quote:
Originally Posted by Mazzerin View Post
I wish someone helped you and I could play this Garglike mode.You could add zp_garg "name" command as well.And, make CVars.That would be a perfect-original mode.
ALL cvars, all natives, admin cmd, other cmd, models, sounds, etc everything has been added! It's already working as a mode (tested: I'm already spawning as a Garg, it WORKS!), I just can't give a flamethrower to the Garg, cuz I simply don't know HOW to transfer it correctly.
Hammerfallerz is offline
Mazzerin
BANNED
Join Date: Sep 2008
Location: Lithuania
Old 11-25-2008 , 11:47   Re: [REQ] Garg in a zombie plague (sub-round).
Reply With Quote #18

Cool!Please post it to download.
Mazzerin is offline
Send a message via Skype™ to Mazzerin
Hammerfallerz
Senior Member
Join Date: Feb 2008
Old 11-25-2008 , 11:51   Re: [REQ] Garg in a zombie plague (sub-round).
Reply With Quote #19

What's the point of posting it, if Garg atm is just like nemesis (but with health nemhp*3), but attacks with his claws and gamage is just like normal knife attack?

If someone will help me to give him a flamethrower -- I will post here complete instructions how to create this sub-round (read: how to modify sourcecode).
Hammerfallerz is offline
Mazzerin
BANNED
Join Date: Sep 2008
Location: Lithuania
Old 11-25-2008 , 11:55   Re: [REQ] Garg in a zombie plague (sub-round).
Reply With Quote #20

But sounds,models etc. are not same.I would like to play that mode.
Mazzerin is offline
Send a message via Skype™ to Mazzerin
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 17:01.


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