AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Goomba Stomp (https://forums.alliedmods.net/showthread.php?t=316888)

OciXCrom 06-16-2019 09:06

Goomba Stomp
 

Description
  • Inspired by Super Mario, this plugin allows you to deal damage to players by jumping on top of them.

How does it work?
  • In order to make a successfull goomba stomp, you need to jump on top of a player from high enough to receive fall damage. The fall damage, increased by a specific amount set in the configuration file, will be transfered to the player on whom you jumped.

Settings
  • The settings can be found in the file configs/goomba_stomp.ini.
    • goomba_sound_kill = goomba_stomp.wav -- the sound that will be played when a player is killed with goomba stomp
    • goomba_sound_damage -- the sound that will be played when a player is damaged, but not killed with goomba stomp
    • goomba_sound_type = 0 -- how should the sound be played?
      • 0 = the sound will be emitted from the attacker to nearby players
      • 1 = the sound will be played to all players independent of their position on the map
    • goomba_access_flag = 0 -- the admin flag required to use goomba stomp or 0 for all players
    • goomba_damage_factor = +30 -- the amount of damage that a goomba stomp will deal to the victim relative to the fall damage (see the configuration file for examples)
    • goomba_self_damage = 0 -- the amount of damage the attacker will receive relative to the fall damage
    • goomba_frags_bonus = 2 --the amount of frags (in the scoreboard) that players will receive for a successfull kill with goomba stomp
    • goomba_money_bonus = 200 -- the amount of money that players will receive for a successfull kill with goomba stomp, in addition to the default game value
    • goomba_max_money = 16000 -- the maximum amount of money the plugin can reach
    • goomba_xp_bonus = 10 -- the amount of XP that players will receive for a successfull kill with goomba stomp (requires OciXCrom's Rank System)
    • goomba_players_only = 0 -- who can be a victim of goomba stomp?
      • 0 = players will be able to deal damage to breakable objects on the map (e.g. the chickens on cs_italy)
      • players will be able to deal damage only to other players
    • goomba_hostages = 0 -- can players use goomba stomp to damage hostages?
    • goomba_safe_team_land = 0 -- if enabled, landing on top of a teammate will prevent fall damage
    • goomba_bounce_back_force = *10 -- the force with which the player will be pushed upwards upon a successfull goomba stomp relative to the fall damage
    • goomba_bounce_back_players_only = 1 -- if set to 1, the bounce back feature will work for players only
    • goomba_bounce_back_teammates = 0 -- set to 1 to enable bouncing back from teammates when "mp_friendlyfire" is disabled
    • goomba_shake_enabled = 1 -- will goomba stomp shake the victim's screen?
    • goomba_shake_time = 3.0 -- the duration of the shake effect in seconds
    • goomba_fade_enabled = 1 -- will goomba stomp apply a screen fade effect to the victim?
    • goomba_fade_color = 0 0 0 255 -- screen fade color in RGBA format
    • goomba_msg_receiver_kill = 6 -- who can see the message when a player is killed with goomba stomp?
      • 0 = nobody; disable it completely
      • 1 = only the attacker
      • 2 = only the victim
      • 3 = both the attacker and the victim
      • 4 = all players in attacker's team
      • 5 = all players in victim's team
      • 6 = everyone
    • goomba_msg_receiver_damage = 3 -- who can see the message when a player is damaged, but not killed with goomba stomp? (the same rules from "goomba_msg_receiver_kill" apply)
    • goomba_show_damage = 1 -- will the message contain the amount of damage that was dealt?
    • goomba_show_health = 1 -- will the message contain the remaining amount of health that the victim has?

Additional information and download link

https://raw.githubusercontent.com/Oc...using_this.png
https://raw.githubusercontent.com/Oc...plugin_lab.png
https://raw.githubusercontent.com/Oc...ad_default.png

thEsp 06-16-2019 09:16

Re: Goomba Stomp
 
Seems rather nice, I like it.

Snake. 06-16-2019 14:59

Re: Goomba Stomp
 
Code:

[tr]
GOOMBA_MSG_ATTACKER = %s oyuncusuna goomba ezisi yaptin
GOOMBA_MSG_ATTACKER_DAMAGE = %.0f hasar ile
GOOMBA_MSG_ATTACKER_HEALTH = - suan onun %i HP'si var
GOOMBA_MSG_VICTIM = %s sana goomba ezisi yapti
GOOMBA_MSG_VICTIM_DAMAGE = %.0f hasar ile
GOOMBA_MSG_EVERYONE = %s, %s oyuncusuna goomba ezisi yapti
GOOMBA_MSG_EVERYONE_DAMAGE = %.0f hasar ile


OciXCrom 06-16-2019 15:53

Re: Goomba Stomp
 
Thanks, I'll add it later.

HamletEagle 06-29-2019 12:36

Re: Goomba Stomp
 
PHP Code:

if(equal(szKey"goomba_sound_kill"))
                    {
                        if(
szValue[0])
                        {
                            
copy(g_eSettings[goomba_sound_kill], charsmax(g_eSettings[goomba_sound_kill]), szValue)
                            
precache_sound(szValue)
                        }
                    }
                    else if(
equal(szKey"goomba_sound_damage"))
                    {
                        if(
szValue[0])
                        {
                            
copy(g_eSettings[goomba_sound_damage], charsmax(g_eSettings[goomba_sound_damage]), szValue)
                            
precache_sound(szValue)
                        }
                    } 

Why are you checking szValue[0] here? It's already done at line 134:
PHP Code:

if(!szValue[0])
                    {
                        continue
                    } 

Otherwise, looks okay after a quick check. I swear your config files are so obnoxious to review.

OciXCrom 06-29-2019 15:28

Re: Goomba Stomp
 
Quote:

Why are you checking szValue[0] here? It's already done at line 134:
I removed it. Probably forgot about it.

Quote:

I swear your config files are so obnoxious to review.
I'll take that as a compliment. :P

HamletEagle 06-29-2019 16:08

Re: Goomba Stomp
 
It was a compliment, partially.
It's great for the user and I definitely encourage anyone releasing plugins to put more work into providing options for the user.
It's obnoxious to review because it's a lot of boilerplate and boring code.

Good job. Approved.

DJEarthQuake 05-24-2022 19:28

Re: Goomba Stomp
 
Requesting this for Opposing Force and to be able to squash things like monster_babycrab and monster_cockroach as well as players please.
https://cdn.discordapp.com/attachmen...3310/stomp.gif

OciXCrom 05-25-2022 13:36

Re: Goomba Stomp
 
The plugin should work on anything that has health points assigned to it if "goomba_players_only" is set to 0.

Code:
bool:is_ent_breakable(iEnt) {     if((entity_get_float(iEnt, EV_FL_health) > 0.0) && (entity_get_float(iEnt, EV_FL_takedamage) > 0.0) && !(entity_get_int(iEnt, EV_INT_spawnflags) & SF_BREAK_TRIGGER_ONLY))     {         return true     }     return false }

Try modifying this check if it doesn't work.

DJEarthQuake 05-27-2022 06:58

Re: Goomba Stomp
 
Anything with health. That's perfect. I will download it and play with it. Thanks OciXCrom.


All times are GMT -4. The time now is 16:55.

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