What is this plugin?
It gives you an easy chance to make a knife server, without knowing how to script, beacause you can easily edit everything in files and expand the shop with sub-plugins.
My target was create a completly editable, dynamic plugin.
Usage, settings?
1. First of all begin with the language file, you can here set the keywords to set the knife abilities:
Code:
KEY1 -> v_*.mdl -s ( viewmodel, default: v_knife.mdl )[ string ]
KEY2 -> p_*.mdl -s ( weaponmodel, default: p_knife.mdl )[ string ]
KEY3 -> speed ( maxspeed, between 0 and 2000, default: 250 )[ float ]
KEY4 -> gravity ( gravity, over 0, default: 800, like with sv_gravity )[ float ]
KEY5 -> damage ( damage to add to the default, default: 0 )[ float ]
KEY6 -> knockback ( knockback when hit someone, default: 0 )[ float ]
KEY7 -> health ( health to add to the default, default: 0 )[ float ]
KEY8 -> visibly ( visibly, between 0 and 255, default: 255, full visibly )[ int ]
KEY9 -> level ( needed level to use the knife, default: 0 )[ int ]
2. If the previous is done, than you can give the knives in knives.txt in configs folder. You've to use the previously adjusted keywords to give the abilities.
First the name of the knife ( what you will see in the menu ) between square brackets, after the abilites in this form: KEYWORD = VALUE
An example:
In multi-lang file:
Code:
[en]
KEY1 = VMODEL
KEY2 = PMODEL
KEY3 = SPEED
KEY4 = GRAVITY
KEY5 = DAMAGE
KEY6 = KNOCKBACK
KEY7 = HEALTH
KEY8 = VISIBLY
KEY9 = LEVEL
In knives.txt:
Code:
[SUPER KNIFE]
VMODEL = v_hipersuper.mdl
PMODEL = p_hipersuper.mdl
SPEED = 450
GRAVITY = 400
DAMAGE = 10
KNOCKBACK = 150
HEALTH = 40
VISIBLY = 150
LEVEL = 450
+infos:
You needn't give all of the abilities, if you miss out an ability, then prevail the default value.
You needn't write down the fractions, but if you want you can.
3. And the last one: the advancement, what you can set in the levels.txt in the configs folder.
You can set one by one, or give an interval where increases the needed xp with the given value or mix this ways.
Examples:
one by one ( in levels.txt ):
Code:
50 // 50 xp needed to level 1
150 // 150 -||- 2
500 // 500 -||- 3
653 // ...
interval:
Code:
1, 50... 100
51, 100... 200
From lvl 1 to lvl 50 increas the necessary xp with 100. ( from lvl 0 to lvl 1 you need 100 xp, from lvl 1 to lvl 2 200xp ... )
From lvl 51 to lvl 100 increas the necessary xp with 200.
Cvars:
Code:
kill_msgs
0 - noone get info about the kill ( on chat, about who kill you or what get you for the kill )
1 - just the killer
2 - the killer and the victim
kill_xp
over 0 - how many xp get you for the kill
kill_point
over 0 - how many point get you for the kill
hs_xp
over 0 - extra xp for the headshoot
hs_point
over 0 - extra point for the headshoot
Saving:
MYSQL or NVAULT
In the 16th line you can see:
If you want to use SQL saving, you have to remove the two backslash( // ) before the hashtag( # ), and fill out the mysql infos array.
PHP Code:
new const g_sSQL_INFOS[ ][ ] =
{
"127.0.0.1",
"USERNAME",
"PASSWORD",
"DATABASE"
}
Required moduls:
- amxmodx 1.8.3!!!*( tested on 1.8.3.-dev-4976 ++ )
- engine
- hamsandwich
Sub-plugins:
All the natives and forwards are documented in the header file( .inc ).