AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   New Plugin Submissions (https://forums.alliedmods.net/forumdisplay.php?f=26)
-   -   Basic Knife Skills (https://forums.alliedmods.net/showthread.php?t=314299)

OciXCrom 02-12-2019 16:53

Basic Knife Skills
 

Description
  • This plugin is an addon for Knife Models that allows you to add special skills to your knives.

Information
  • How is this plugin better than other similar ones?
    • The skills and values are not hardcoded in the plugin and they can be changed and modified at any time via the configuration file.
    • You can add an unlimited amount of knives and skills for them.
    • You can set different values for each knife, rather than using the same one for all of them.
    • You can combine all skills at once, use only one or multiple ones for the same knife.
    • The skills in this plugin aren't the only ones you can use - you can also add other sub-plugins that will add even more skills. You can even create your own ones.

Available skills
  • The skills can be added in the main plugin's configuration file - configs/KnifeModels.ini in the same way like you would add the rest of the knife settings.
  • Bear in mind that by default the skills are active only while the player is holding the knife. If you want to make them active for every weapon, simply change the cvar km_knife_only_skills to "0".
  • The following skills are available in this plugin:
    • GRAVITY = <value> -- changes the player's gravity
      • The values are the same ones that are used with the "sv_gravity" cvar, which means that 800 is default gravity and every number below this will decrease the player's gravity and make you jump higher, while 0 completely disables the gravity.
    • SPEED = <value> -- changes the player's speed
      • The default speed when using a knife is 250.
      • Bear in mind that the maximum allowed speed can be limited by the server cvar "sv_maxspeed" and the client cvars "cl_forwardspeed", "cl_sidespeed" and "cl_backspeed".
    • DAMAGE = <value> -- changes the amount of damage that the player deals
      • You can use +, -, increase the damage by a certain percentage, etc.
      • Examples:
        • DAMAGE = +25% will increase the damage by 25%
        • DAMAGE = +25 will add 25 to the damage
        • DAMAGE = *2 will increase the damage twice
        • DAMAGE = 10 will make each hit deal exactly 10 damage
        • DAMAGE = -5% will decrease the damage by 5%
        • DAMAGE = /2 will decrease the damage by half
    • PROTECTION = <value> -- changes the amount of damage that the player receives
      • Works the same way as "DAMAGE", e.g. a value of "-50%" will reduce the damage received by half.
    • SILENT_STEPS = 1 -- enables silent footsteps for the player
    • HEALTH_ON_KILL = <health on kill> [maximum health] -- gives health on kill
      • If you don't specify the maximum health amount, it will be 100 by default.
    • ARMOR_ON_KILL = <armor on kill> [maximum armor] -- gives armor on kill
      • If you don't specify the maximum armor amount, it will be 100 by default.
    • MONEY_ON_KILL = <money on kill> [maximum money] -- gives money on kill
      • If you don't specify the maximum money amount, it will be 16000 by default.
    • GLOW = <red> <green> <blue> [brightness] [fx mode] [render mode] -- makes the player glow
      • Only the first 3 parameters are mandatory.
      • If you don't specify a brightness amount, it will be 40 by default.
      • FX mode has a default value of 19.
      • Render mode has a default value of 0.
      • Examples:
        • GLOW = 255 0 0 will give a full red glow
        • GLOW = 0 0 0 40 will make the player transparent
  • Here's an example knife with all of this plugin's attributes included:

PHP Code:

[The Red-Glowing Knife of Death]
V_MODEL models/my_knives/v_skill_knife.mdl
GRAVITY 
400
SPEED 
325
DAMAGE 
= +25%
PROTECTION = /2
SILENT_STEPS 
1
HEALTH_ON_KILL 
15
ARMOR_ON_KILL 
30
MONEY_ON_KILL 
1000
GLOW 
0 255 0 

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

DevilBoy.eXe 02-13-2019 07:46

Re: Basic Knife Skills
 
Next level of knife models for dr servers gj

tarsisd2 02-13-2019 09:07

Re: Basic Knife Skills
 
Nice job as always
Mabe make it glow depending on teams blue for ct, red for ts, and yellows for bomb carrier!

Multi jump is also a nice skill!

Another sugestion is to make the player screen blink when kill with cvar for colors, like fade out from blue

But its great so far

OciXCrom 02-13-2019 09:59

Re: Basic Knife Skills
 
Multi jump, blink, etc will be released as separate plugins. This one is only for the well-known basic stuff. The glow is meant to be fully customizable - you can even make the player blink with it, so it doesn't have to be a color.

grimxxl 02-14-2019 09:21

Re: Basic Knife Skills
 
crxknives.inc?

OciXCrom 02-14-2019 10:06

Re: Basic Knife Skills
 
Quote:

Originally Posted by grimxxl (Post 2639599)
crxknives.inc?

Read the first paragraph in the first post. This is not a standalone plugin.

grimxxl 02-14-2019 10:43

Re: Basic Knife Skills
 
I'm aware that it's not a standalone plugin, but couldn't seem to find the .inc in the knife models plugin.

Turns out i haven't updated the original plugin in a while, so it was missing the .inc.

OciXCrom 02-14-2019 12:30

Re: Basic Knife Skills
 
Yup, the new version of Knife Models was released along with this plugin. You must update it in order to use this one, as the API and .inc files are from the new version.

grimxxl 02-14-2019 12:45

Re: Basic Knife Skills
 
Figured, also when i got glow enabled i get this:

L 02/14/2019 - 17:16:41: [AMXX] Plugin "crxknives_basic_skills.amxx" failed to load: Plugin uses an unknown function (name "crxknives_get_attribute_str") - check your modules.ini.

Further more does it seems like having speed enabled, allows you to move before freezetime ends.

OciXCrom 02-14-2019 13:35

Re: Basic Knife Skills
 
If you get that error, it means you didn't add the main Knife Models plugin, or at least not the new version.

I'll check about the freeze time.

OciXCrom 02-15-2019 13:20

Re: Basic Knife Skills
 
https://img.shields.io/badge/bugfix-...2019-green.svg
  • Fixed knife speed being applied during freeze time.

grimxxl 02-21-2019 12:57

Re: Basic Knife Skills
 
A correction in your text: km_knife_only_skills "1" allows the skills to only being used when holding the knife, where "0" (default in sma) doesn't.

-bug

Being able to move before freezetime ends, is still possible.

OciXCrom 02-21-2019 13:59

Re: Basic Knife Skills
 
Are you sure you updated the plugin? I tested every scenario (I think) and I wasn't able to move. How exactly do you manage to do it?

I fixed the text.

grimxxl 02-21-2019 14:19

Re: Basic Knife Skills
 
Seems like my system didn't overwrite the old sma, and plugin when i compiled it. GJ on fixing the freezetime bug :)

However, now it seems like it wont provide the speed i had set for a knife in the knifemodels.ini

OciXCrom 02-21-2019 15:08

Re: Basic Knife Skills
 
Does it provide it after you switch to another weapon and set the knife again? Or you're using it for all weapons?

PS: let me know if you want more abilities created. I'll release a jumping abilities sub-plugin as well (bunnyhop, longjump, highjump, etc).

grimxxl 02-21-2019 19:16

Re: Basic Knife Skills
 
Skills is set to knife only, switching between knife and other weapons doesn't do anything regarding the missing speed.

CrazY. 02-22-2019 07:42

Re: Basic Knife Skills
 
Frost and fire just like zombie plague grenades.

OciXCrom 02-22-2019 08:32

Re: Basic Knife Skills
 
Quote:

Originally Posted by grimxxl (Post 2640498)
Skills is set to knife only, switching between knife and other weapons doesn't do anything regarding the missing speed.

What speed did you set exactly? Did you check the sv_maxpseed cvar and your cl_forwardspeed and similar cvars to see if the speed is limited by them? Are you using HLDS or ReHLDS?

Quote:

Originally Posted by CrazY. (Post 2640534)
Frost and fire just like zombie plague grenades.

Not sure how exactly that would work because if you hit someone with a knife and freeze him - you can continue hitting him forever and he will get frozen again, and again, and again, where on the other hand, using a grenade is a one-time thing.

CrazY. 02-22-2019 09:30

Re: Basic Knife Skills
 
e.g. freeze victim for 0.1 seconds each 3.0 seconds or a random chance, so attacker won't overflow this ability.

grimxxl 02-23-2019 07:17

Re: Basic Knife Skills
 
Knife skill speed: 350
sv_maxspeed: 450
cl_forwardspeed: 900
cl_sidespeed: 900
cl_backspeed: 900
HLDS

OciXCrom 02-23-2019 07:37

Re: Basic Knife Skills
 
Check your other plugins. You may have another plugin that's modifying the speed and is blocking this one.

grimxxl 02-23-2019 20:20

Re: Basic Knife Skills
 
I tried to only having this plugin with the knife model plugin running, same result.

OciXCrom 02-24-2019 07:38

Re: Basic Knife Skills
 
AMXX version?

grimxxl 02-24-2019 16:38

Re: Basic Knife Skills
 
1.8.2

OciXCrom 02-26-2019 13:29

Re: Basic Knife Skills
 
Just tested on 1.8.2 and it works just fine. You're definitely doing something wrong.
Please post the content of your KnifeModels.ini file and info from the "amx_plugins" command where both knife plugins are visible.

grimxxl 02-26-2019 14:57

Re: Basic Knife Skills
 
knifemodels.ini (the one not working as intended)
Code:

[Ninja Knife]
V_MODEL = models/knife_models/v_ninja_knife.mdl
FLAG = a
DEPLOY_SOUND = weapons/ninjaknife/deploy.wav
HIT_SOUND = weapons/ninjaknife/hit1.wav
HIT_SOUND = weapons/ninjaknife/hit2.wav
HIT_SOUND = weapons/ninjaknife/hit3.wav
HIT_SOUND = weapons/ninjaknife/hit4.wav
HITWALL_SOUND = weapons/ninjaknife/hitwall.wav
SLASH_SOUND = weapons/ninjaknife/slash1.wav
SLASH_SOUND = weapons/ninjaknife/slash2.wav
DAMAGE = *3
GRAVITY = 600
SPEED = 350
SILENT_STEPS = 1
;GLOW = 0 0 0 40

amx_plugins output
Code:

Knife Models      3.0      OciXCrom          crx_knife_model  running 
Basic Skills      1.0.1    OciXCrom          crxknives_basic  running


OciXCrom 02-26-2019 15:32

Re: Basic Knife Skills
 
350 is not really a noticeable speed. Try setting a higher speed, for example 500 to see if there's a difference.

OciXCrom 06-02-2019 08:07

Re: Basic Knife Skills
 
https://img.shields.io/badge/update-...2019-green.svg
  • Added a new skill "PROTECTION" that changes the amount of damage that the player receives - this is the exact opposite of the "DAMAGE" skill.

RBE sLayeR 08-02-2019 10:35

Re: Basic Knife Skills
 
Nice plugin , but i have 2 problems
1- speed more than 400 is not working even though i set sv_maxspeed to 999
2- make the player transparent didnt work , i set " GLOW = 0 0 0 40 " but it just gave a white glow

OciXCrom 08-02-2019 15:38

Re: Basic Knife Skills
 
Quote:

Originally Posted by RBE sLayeR (Post 2661546)
Nice plugin , but i have 2 problems
1- speed more than 400 is not working even though i set sv_maxspeed to 999
2- make the player transparent didnt work , i set " GLOW = 0 0 0 40 " but it just gave a white glow

1. Check your "cl_forwardspeed", "cl_backspeed" and "cl_sidespeed" settings. You also may have another plugin that's limiting it.

2. Can you show an image of said "white glow"?

RBE sLayeR 08-02-2019 16:17

Re: Basic Knife Skills
 
Quote:

Originally Posted by OciXCrom (Post 2661582)
2. Can you show an image of said "white glow"?

here

OciXCrom 08-03-2019 06:47

Re: Basic Knife Skills
 
Are you sure it's like that for all players in the server or only for you? It's possible that the /cam plugin you're using is doing that.

You can also try entering all of the arguments:

GLOW = 0 0 0 40 19 0

Even though this should be the exact same thing. If it's still not working - it's either your /cam plugin or some other one.

RBE sLayeR 08-03-2019 14:03

Re: Basic Knife Skills
 
It doesnt work on other players too , but nvm
maybe another plugin is causing this error ,
because i have deathrun shop plugin and when i buy invisibility im still full visible

RBE sLayeR 04-05-2020 10:40

Re: Basic Knife Skills
 
Could you add a new skill KNOCKBACK i need it for zm servers
and how to disable knifes for zombies

Napoleon_be 04-05-2020 19:16

Re: Basic Knife Skills
 
and what should KNOCKBACK do?

OciXCrom 04-07-2020 07:04

Re: Basic Knife Skills
 
@RBE sLayeR - I should probably add ZP support directly in the main plugin. That would be the best way of handling it.

Knockback plugin - https://amxx-bg.info/viewtopic.php?f=110&t=9012

Format:

Code:
KNOCKBACK = <power> <velocity>

Example:

Code:
KNOCKBACK = 1000 500

@Napoleon_be - never heard of knockback? :grrr:

Napoleon_be 04-07-2020 07:16

Re: Basic Knife Skills
 
Quote:

Originally Posted by OciXCrom (Post 2691368)
@Napoleon_be - never heard of knockback? :grrr:

It's been years since i properly played a ZP or ZM server, never heard of it no :oops:

Erra 06-05-2021 23:45

Re: Basic Knife Skills
 
of course it's great, but versatile if new capabilities are added
sample: https://www.amxx-bg.info/forum/viewtopic.php?f=96&t=3428

ALonsoVIP4141 06-14-2021 06:46

Re: Basic Knife Skills
 
Quote:

Originally Posted by OciXCrom (Post 2691368)
@RBE sLayeR - I should probably add ZP support directly in the main plugin. That would be the best way of handling it.

Knockback plugin - https://amxx-bg.info/viewtopic.php?f=110&t=9012

Format:

Code:
KNOCKBACK = <power> <velocity>

Example:

Code:
KNOCKBACK = 1000 500

@Napoleon_be - never heard of knockback? :grrr:




How iadd extra knife for example iwant to add Barlog IX
with its properties ???

OciXCrom 06-14-2021 07:32

Re: Basic Knife Skills
 
By learning how to make plugins and using a plugin's API.


All times are GMT -4. The time now is 07:47.

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