AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   Knife-Skins v2.2. (https://forums.alliedmods.net/showthread.php?t=231230)

ShLuMieL 12-10-2013 09:37

Knife-Skins v2.2.
 
2 Attachment(s)
Knife-Skins
v2.2
by Asafmazon.

Information about the plugin:

Plugin of knives skins (recommended at surf maps).
This plugin is very nice with a lot of variety of beautiful skins.
In this plugin there is a system that includes the damage that the knife can do, as You level up and upgrade your knife, your knife damage will be higher.
It is important to note that the knives of this plugin operates solely on v_ model for reducing and non load the plugin.


How to use the plugin:

To use this plugin write the command /knife in the chat to open a menu with a lots of skins of knives.
The plugin allows a level system, each level You will get a new knife and you will put it by using the command /knife.


Console Commands:

Code:

knife_skins "1/0" // default "1" - Command for admins to turn off / turn on the plugin.
knife_givexp [Name] [XP] - Command for give XP to some player.
knife_takexp [Name] [XP] - Command for take XP to some player.

Chat Commands:

Code:

/knife - Open the knife menu.
/level - Open menu of the players level status.
/xp, /lvl - print on the chat how much XP you got and how much you need to the next level, and what is your currect level.

How to install:

1. First need to download the plugin.
2. Enter directory cstrike / addons / amxmodx / plugins.
3. Knife-Skins.amxx assign the file inside the folder.
4. Copy the file name and open the file: cstrike / addons / amxmodx / confings.ini.
5. Open the file: plugins.ini and put the file name as below and save.
6. Open directory "Knife-Skins Models" and extract it.
7. Copy the models folder and paste it in your cstrike folder.
8. Do Ristart to the server and then you got the "Knife-Skins" plugin.
9. Enjoy! ..


Includes:
Code:

#include <amxmodx>
#include <amxmisc>
#include <engine> 
#include <vault>
#include <hamsandwich>
#include <fvault>

Versions:
Code:

v1.0
 - Initial Public Release -
 
v1.1
- Added New Commands -

v1.2
- Reduction lines at "fw_TakeDamage" - (Thank's to Strick3n).

v1.3
- Deleted unnecessary lines -

v1.4
- Changed command's  -

v1.5
- Added New AutoMessage's  -

v1.6
- Reduction lines at "Knife_Handler, SetKnife"  -

v1.7
- Added that player can see how much other player need for next level "  -
- Maked "Knife Skins Menu" more necessary  -

v1.8
- Bugs Fixed  -

v1.9
- Maked "KnifeSkinsMenu_Handler" more necessary (Thank's to Angryx)  -

v2.0
- Bugs Fixed  -

v2.1
- Maked "SetKnife" more necessary  -
- Bugs Fixed  -
- Reduction lines  -

v2.2
- Bugs Fixed  -


Credits:


Asafmazon. - Creater of this plugin.
CreePs - The level system inside the plugin.
XpaR - The man that thought on this plugin.


Servers with this plugin:
http://www.game-monitor.com/search.p...&type=variable

Photos:
http://imageshack.com/a/img541/2339/89mp.jpg

http://imageshack.com/a/img541/3057/zg9g.jpg

It is important to remember if you ain't put the models in cstrike folder the plugin will not work.

Downloads:

YamiKaitou 12-10-2013 09:41

Re: Knife Levels v1.0.
 
AMXX file removed, do not upload it again.

Are you Asafmazon?

ShLuMieL 12-10-2013 09:46

Re: Knife Levels v1.0.
 
Yes.

PoLiCe 12-10-2013 11:49

Re: Knife Levels v1.0.
 
Great Idea, XP System is nice.
Gj ! :D

Kia 12-10-2013 12:22

Re: Knife Levels v1.0.
 
PHP Code:

if ( is_valid_playerattacker ) && get_user_weapon(attacker) == CSW_KNIFE && knife_model[attacker] == )
    {
        
SetHamParamFloat(4damage )
    }
    if ( 
is_valid_playerattacker ) && get_user_weapon(attacker) == CSW_KNIFE && knife_model[attacker] == )
    {
        
SetHamParamFloat(4damage )
    }
    if ( 
is_valid_playerattacker ) && get_user_weapon(attacker) == CSW_KNIFE && knife_model[attacker] == )
    {
        
SetHamParamFloat(4damage )
    }
    if ( 
is_valid_playerattacker ) && get_user_weapon(attacker) == CSW_KNIFE && knife_model[attacker] == )
    {
        
SetHamParamFloat(4damage )
    }
    if ( 
is_valid_playerattacker ) && get_user_weapon(attacker) == CSW_KNIFE && knife_model[attacker] == )
    {
        
SetHamParamFloat(4damage )
    }
    if ( 
is_valid_playerattacker ) && get_user_weapon(attacker) == CSW_KNIFE && knife_model[attacker] == )
    {
        
SetHamParamFloat(4damage )
    }
    if ( 
is_valid_playerattacker ) && get_user_weapon(attacker) == CSW_KNIFE && knife_model[attacker] == )
    {
        
SetHamParamFloat(4damage )
    }
    if ( 
is_valid_playerattacker ) && get_user_weapon(attacker) == CSW_KNIFE && knife_model[attacker] == )
    {
        
SetHamParamFloat(4damage 8)
    }
    if ( 
is_valid_playerattacker ) && get_user_weapon(attacker) == CSW_KNIFE && knife_model[attacker] == )
    {
        
SetHamParamFloat(4damage )
    }
    if ( 
is_valid_playerattacker ) && get_user_weapon(attacker) == CSW_KNIFE && knife_model[attacker] == 10 )
    {
        
SetHamParamFloat(4damage 10 )
    }
    if ( 
is_valid_playerattacker ) && get_user_weapon(attacker) == CSW_KNIFE && knife_model[attacker] == 11 )
    {
        
SetHamParamFloat(4damage 11 )
    }
    if ( 
is_valid_playerattacker ) && get_user_weapon(attacker) == CSW_KNIFE && knife_model[attacker] == 12 )
    {
        
SetHamParamFloat(4damage 12 )
    }
    if ( 
is_valid_playerattacker ) && get_user_weapon(attacker) == CSW_KNIFE && knife_model[attacker] == 13 )
    {
        
SetHamParamFloat(4damage 13 )
    } 

This be can made better, and you know that.

PHP Code:

if(iLevel[id]==0)
    {
        new 
menu menu_createszItem"Knife_Handler" );
        
menu_additem(menu"\wNormal Knife [\yUNLOCKED\w]""");               // Normal Knife
        
menu_additem(menu"\d???? ????? [\rLEVEL 1 REQUIRE\d]""");     // Alien Knife
        
menu_additem(menu"\d?????? ?????? [\rLEVEL 2 REQUIRE\d]""");     // Ellium Dagger
        
menu_additem(menu"\d???? ?????? [\rLEVEL 3 REQUIRE\d]""");     // Dark Dagger
        
menu_additem(menu"\d??????????? ????? [\rLEVEL 4 REQUIRE\d]""");     // Transparent Knife
        
menu_additem(menu"\d??????? ?????? [\rLEVEL 5 REQUIRE\d]""");     // Genuine Dagger
        
menu_additem(menu"\d???? ????? [\rLEVEL 6 REQUIRE\d]""");     // Hunt Blade
        
menu_additem(menu"\d?????? ????? [\rLEVEL 7 REQUIRE\d]""");     // Shadow Blade
        
menu_additem(menu"\d??????????? ??? [\rLEVEL 8 REQUIRE\d]""");     // Slaughterer Axe
        
menu_additem(menu"\d?????? ?????? [\rLEVEL 9 REQUIRE\d]""");     // Golden Katana
        
menu_additem(menu"\d???????? ????? [\rLEVEL 10 REQUIRE\d]""");     // Assasin's Blade
        
menu_additem(menu"\d?????????? [\rLEVEL 11 REQUIRE\d]""");        // Lightsaber
        
menu_additem(menu"\d?????? ????????? ????? [\rLEVEL 12 REQUIRE\d]"""); // Bloody Wolverine Claws
        
menu_additem(menu"\d?????? ??? [\rLEVEL 13 REQUIRE\d]""");     // Proton Axe
        
        
menu_setpropmenuMPROP_EXITMEXIT_ALL );
        
menu_displayidmenu);
    } 

This one too, check for the Level and decide then what string to display, saves much code.

PHP Code:

case 0:{
            
SetKnife(id 0)
            
ColorChat(id,"The knife you chose is: ^4Normal Knife^1.");
        }
        case 
1:{
            
SetKnife(id 1)
            
ColorChat(id,"The knife you chose is: ^4Alien Knife^1.");
        }
        case 
2:{
            
SetKnife(id 2)
            
ColorChat(id,"The knife you chose is: ^4Ellium Dagger^1.");
        }
        case 
3:{
            
SetKnife(id 3)
            
ColorChat(id,"The knife you chose is: ^4Dark Dagger^1.");
        }
        case 
4:{
            
SetKnife(id 4)
            
ColorChat(id,"The knife you chose is: ^4Transparent Knife^1.");
        }
        case 
5:{
            
SetKnife(id 5)
            
ColorChat(id,"The knife you chose is: ^4Genuine Dagger^1.");
        }
        case 
6:{
            
SetKnife(id 6)
            
ColorChat(id,"The knife you chose is: ^4Hunt Blade^1.");
        }
        case 
7:{
            
SetKnife(id 7)
            
ColorChat(id,"The knife you chose is: ^4Shadow Blade^1.");
        }
        case 
8:{
            
SetKnife(id 8)
            
ColorChat(id,"The knife you chose is: ^4Slaughterer Axe^1.");
        }
        case 
9:{
            
SetKnife(id 9)
            
ColorChat(id,"The knife you chose is: ^4Golden Katana^1.");
        }
        case 
10:{
            
SetKnife(id 10)
            
ColorChat(id,"The knife you chose is: ^4Assasin's Blade^1.");
        }
        case 
11:{
            
SetKnife(id 11)
            
ColorChat(id,"The knife you chose is: ^4Lightsaber^1.");
        }
        case 
12:{
            
SetKnife(id 12)
            
ColorChat(id,"The knife you chose is: ^4Bloody Wolverine Claws^1.");
        }
        case 
13:{
            
SetKnife(id 13)
            
ColorChat(id,"The knife you chose is: ^4Proton Axe^1.");
        } 

Same for here.

You have much redundant code in your plugin, review your code and update it.

ironskillz1 12-10-2013 12:53

Re: Knife Levels v1.0.
 
Yeah like Kia said it need realy much optimizez
But good idé anyway :)

bat 12-10-2013 13:04

Re: Knife Levels v1.0.
 
Quote:

Originally Posted by Kia (Post 2070673)
PHP Code:

if ( is_valid_playerattacker ) && get_user_weapon(attacker) == CSW_KNIFE && knife_model[attacker] == )
    {
        
SetHamParamFloat(4damage )
    }
    if ( 
is_valid_playerattacker ) && get_user_weapon(attacker) == CSW_KNIFE && knife_model[attacker] == )
    {
        
SetHamParamFloat(4damage )
    }
    if ( 
is_valid_playerattacker ) && get_user_weapon(attacker) == CSW_KNIFE && knife_model[attacker] == )
    {
        
SetHamParamFloat(4damage )
    }
    if ( 
is_valid_playerattacker ) && get_user_weapon(attacker) == CSW_KNIFE && knife_model[attacker] == )
    {
        
SetHamParamFloat(4damage )
    }
    if ( 
is_valid_playerattacker ) && get_user_weapon(attacker) == CSW_KNIFE && knife_model[attacker] == )
    {
        
SetHamParamFloat(4damage )
    }
    if ( 
is_valid_playerattacker ) && get_user_weapon(attacker) == CSW_KNIFE && knife_model[attacker] == )
    {
        
SetHamParamFloat(4damage )
    }
    if ( 
is_valid_playerattacker ) && get_user_weapon(attacker) == CSW_KNIFE && knife_model[attacker] == )
    {
        
SetHamParamFloat(4damage )
    }
    if ( 
is_valid_playerattacker ) && get_user_weapon(attacker) == CSW_KNIFE && knife_model[attacker] == )
    {
        
SetHamParamFloat(4damage 8)
    }
    if ( 
is_valid_playerattacker ) && get_user_weapon(attacker) == CSW_KNIFE && knife_model[attacker] == )
    {
        
SetHamParamFloat(4damage )
    }
    if ( 
is_valid_playerattacker ) && get_user_weapon(attacker) == CSW_KNIFE && knife_model[attacker] == 10 )
    {
        
SetHamParamFloat(4damage 10 )
    }
    if ( 
is_valid_playerattacker ) && get_user_weapon(attacker) == CSW_KNIFE && knife_model[attacker] == 11 )
    {
        
SetHamParamFloat(4damage 11 )
    }
    if ( 
is_valid_playerattacker ) && get_user_weapon(attacker) == CSW_KNIFE && knife_model[attacker] == 12 )
    {
        
SetHamParamFloat(4damage 12 )
    }
    if ( 
is_valid_playerattacker ) && get_user_weapon(attacker) == CSW_KNIFE && knife_model[attacker] == 13 )
    {
        
SetHamParamFloat(4damage 13 )
    } 

This be can made better, and you know that.

PHP Code:

if(iLevel[id]==0)
    {
        new 
menu menu_createszItem"Knife_Handler" );
        
menu_additem(menu"\wNormal Knife [\yUNLOCKED\w]""");               // Normal Knife
        
menu_additem(menu"\d???? ????? [\rLEVEL 1 REQUIRE\d]""");     // Alien Knife
        
menu_additem(menu"\d?????? ?????? [\rLEVEL 2 REQUIRE\d]""");     // Ellium Dagger
        
menu_additem(menu"\d???? ?????? [\rLEVEL 3 REQUIRE\d]""");     // Dark Dagger
        
menu_additem(menu"\d??????????? ????? [\rLEVEL 4 REQUIRE\d]""");     // Transparent Knife
        
menu_additem(menu"\d??????? ?????? [\rLEVEL 5 REQUIRE\d]""");     // Genuine Dagger
        
menu_additem(menu"\d???? ????? [\rLEVEL 6 REQUIRE\d]""");     // Hunt Blade
        
menu_additem(menu"\d?????? ????? [\rLEVEL 7 REQUIRE\d]""");     // Shadow Blade
        
menu_additem(menu"\d??????????? ??? [\rLEVEL 8 REQUIRE\d]""");     // Slaughterer Axe
        
menu_additem(menu"\d?????? ?????? [\rLEVEL 9 REQUIRE\d]""");     // Golden Katana
        
menu_additem(menu"\d???????? ????? [\rLEVEL 10 REQUIRE\d]""");     // Assasin's Blade
        
menu_additem(menu"\d?????????? [\rLEVEL 11 REQUIRE\d]""");        // Lightsaber
        
menu_additem(menu"\d?????? ????????? ????? [\rLEVEL 12 REQUIRE\d]"""); // Bloody Wolverine Claws
        
menu_additem(menu"\d?????? ??? [\rLEVEL 13 REQUIRE\d]""");     // Proton Axe
        
        
menu_setpropmenuMPROP_EXITMEXIT_ALL );
        
menu_displayidmenu);
    } 

This one too, check for the Level and decide then what string to display, saves much code.

PHP Code:

case 0:{
            
SetKnife(id 0)
            
ColorChat(id,"The knife you chose is: ^4Normal Knife^1.");
        }
        case 
1:{
            
SetKnife(id 1)
            
ColorChat(id,"The knife you chose is: ^4Alien Knife^1.");
        }
        case 
2:{
            
SetKnife(id 2)
            
ColorChat(id,"The knife you chose is: ^4Ellium Dagger^1.");
        }
        case 
3:{
            
SetKnife(id 3)
            
ColorChat(id,"The knife you chose is: ^4Dark Dagger^1.");
        }
        case 
4:{
            
SetKnife(id 4)
            
ColorChat(id,"The knife you chose is: ^4Transparent Knife^1.");
        }
        case 
5:{
            
SetKnife(id 5)
            
ColorChat(id,"The knife you chose is: ^4Genuine Dagger^1.");
        }
        case 
6:{
            
SetKnife(id 6)
            
ColorChat(id,"The knife you chose is: ^4Hunt Blade^1.");
        }
        case 
7:{
            
SetKnife(id 7)
            
ColorChat(id,"The knife you chose is: ^4Shadow Blade^1.");
        }
        case 
8:{
            
SetKnife(id 8)
            
ColorChat(id,"The knife you chose is: ^4Slaughterer Axe^1.");
        }
        case 
9:{
            
SetKnife(id 9)
            
ColorChat(id,"The knife you chose is: ^4Golden Katana^1.");
        }
        case 
10:{
            
SetKnife(id 10)
            
ColorChat(id,"The knife you chose is: ^4Assasin's Blade^1.");
        }
        case 
11:{
            
SetKnife(id 11)
            
ColorChat(id,"The knife you chose is: ^4Lightsaber^1.");
        }
        case 
12:{
            
SetKnife(id 12)
            
ColorChat(id,"The knife you chose is: ^4Bloody Wolverine Claws^1.");
        }
        case 
13:{
            
SetKnife(id 13)
            
ColorChat(id,"The knife you chose is: ^4Proton Axe^1.");
        } 

Same for here.

You have much redundant code in your plugin, review your code and update it.

++

Fuck For Fun 12-10-2013 13:17

Re: Knife Levels v1.0.
 
Thank, nice idea.

Think add to any knife - Level
Powers
:
slag
hp+

PoLiCe 12-10-2013 13:35

Re: Knife Levels v1.0.
 
Quote:

Originally Posted by Fuck For Fun (Post 2070679)
Thank, nice idea.

Think add to any knife - Level
Powers
:
slag
hp+

Also Gravity+ would be cool, SuperJump/Speed Depoly if possible & Fast Stab / Slash..:up:
And add a chat command that shows how many kills until next level .. / how many players i've killed & top15 Knifers.

Jhob94 12-10-2013 16:06

Re: Knife Levels v1.0.
 
They are correct... You have many things to work on.
Well i willnt fix all for you, but i did fixed takedamage so you maybe can take a look and do it for another stuff. Really many lines that arent necessary at all.
PHP Code:

public fw_TakeDamage(victiminflictorattackerFloat:damage)
{
    if(
get_pcvar_num(knife_on))
    {
        if(
is_valid_player(attacker) && get_user_weapon(attacker) == CSW_KNIFE && knife_model[attacker])
        {
            
SetHamParamFloat(4damage knife_model[attacker])
            return 
PLUGIN_HANDLED;    
        }
    }




All times are GMT -4. The time now is 10:32.

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