AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=109)
-   -   [CS:GO] - ∾ KNIVES | FALCHION | NO CRASH | All Mods Supported | 100% Translatable (https://forums.alliedmods.net/showthread.php?t=263668)

Dr. Api 05-30-2015 13:02

[CS:GO] - ∾ KNIVES | FALCHION | NO CRASH | All Mods Supported | 100% Translatable
 
3 Attachment(s)
I - Description

THIS PLUGIN IS STABLE FOR ZOMBIE MOD AND WEAPONS PAINTS
I made this plugin for my community Zombie4Ever.eu and was allowed to share it.
Give you a knife and save your choice by Team.
This plugin allow you to choose the commands with the translation file "translations/drapi/drapi_knives.phrases.txt".
What's means?

1 - Menu General

Example for popup the menu:
PHP Code:

"fr"            "couteau, couteaux, knives, knifes, knife"
"en"            "knives, knifes, knife" 

You can type in chat !knives, /knives or knive... For me as French I can type !couteau, /couteau or couteau...
This, will show you a menu too choose your Team.
http://img15.hostingpics.net/pics/343138menu.jpg

2 - Menu CT

Example for popup the CT menu
PHP Code:

"fr"            "ctcouteau, ctcouteaux, ctknives, ctknifes, ctknife"
"en"            "ctknives, ctknifes, ctknife" 

etc.. note you dont" need in the transaltion file to write ! or /.
This, will show you a menu too choose the knife for CT Team.
http://img15.hostingpics.net/pics/87559443ct.jpg

3 - Chat
The trigger chat command works for giving knives directly too.
Example for giving Bayonet
PHP Code:

"fr"            "bayonet, bayo, baļonnette"
"en"            "bayonet, bayo" 

You can type !bayo, /bayo or bayo.... For me as French I can type !baļonnette, /baļonnette or baļonnette...
This, will give you the Bayonet Knife and save your choice for the actual Team.
http://img15.hostingpics.net/pics/977137tchat.jpg
http://img15.hostingpics.net/pics/68041926fr.jpg

II - Cvars

Knives are select by their "m_iItemDefinitionIndex"
drapi_knives_ct_default "512" - "Default knife for CT
drapi_knives_t_default "512" - "Default knife for T

500 = Bayonet
505 = Flip
506 = Gut
507 = Karambit
508 = M9 Bayonet
509 = Huntsman
512 = Falchion
515 = Butterfly

drapi_knives_storage_mode "2" - 0=Disable / 1=Cookie / 2=SQL
Choose how to store the clients preferences. Choosing SQL will save/get clients preferences for all yours servers if you are using the same database.

drapi_knives_access_mode "0" - 0=All / 1=VIP / 2=ADMIN

drapi_knives_give_mode "1" - 0=Don't give the knife / 1=Give the knife
Usefull for some MG map or others who strip you the weapons. Will not give the knife but will save the preference.

"drapi_knives_check_knife_mode" "1" - Check the knife before giving away. SUCCESS if knife doesn't have a name.

III - Notes

This plugin use Geolanguage.
How to know if your server is using Geolanguage?
Type in game !language or see in your "/csgo/addons/sourcemod/plugins" if a plugin named Geolanguage.smx is there.

IV - Mysql

Now supporting Mysql.
After installing the plugin, type in console : sm_create_knives_tables to create the Tables.
Don"t forget to edit "/csgo/addons/sourcemod/configs/databases.cfg"
PHP Code:

    "knives"

    
{

        
"driver"                "mysql"

        "host"                   "127.0.0.1"

        "database"             "knives"

        "user"                    "xxx"

        "pass"                    "xxx"

    


V - Mods

ZOMBIE RELOADED : choose drapi_knives_zr.smx
With normal version when you get infected you will get the CT knife cause the infection is too fast to detect the right Team.

Zombie Reloaded: OK
Zombie Riot: OK
1Vs1: OK
Weapons paints: OK

Working on a plugins weapons paints + statrak kill: HERE
Version BETA, Everything works well, need to store the kill stat for each weapons(including rifles, pumps, pistols, etc....) on database/cookie also the paintkit id too.
I cannot release this here cause weapons paints was trashed form this forum, it will be the same if I post. PM me/add me on Steam for more informations.

VI - Bugs

When you type only ! or / the menu will popup. I will fix soon: FIXED

VII - To Do

Use Mysql instead of Cookie: FIXED

VIII - Flags

If you don't use like us this following for vip or admin you can change it in the code.
PHP Code:

/***********************************************************/
/******************** CHECK IF IS A VIP ********************/
/***********************************************************/
stock bool IsVip(int client)
{
    if(
GetUserFlagBits(client) & ADMFLAG_CUSTOM1 
    
|| GetUserFlagBits(client) & ADMFLAG_CUSTOM2 
    
|| GetUserFlagBits(client) & ADMFLAG_CUSTOM3 
    
|| GetUserFlagBits(client) & ADMFLAG_CUSTOM4 
    
|| GetUserFlagBits(client) & ADMFLAG_CUSTOM5 
    
|| GetUserFlagBits(client) & ADMFLAG_CUSTOM6)
    {
        return 
true;
    }
    return 
false;
}

/***********************************************************/
/****************** CHECK IF IS AN ADMIN *******************/
/***********************************************************/
stock bool IsAdminEx(int client)
{
    if(
GetUserFlagBits(client) & ADMFLAG_CHANGEMAP 
    
/*|| GetUserFlagBits(client) & ADMFLAG_RESERVATION*/
    
|| GetUserFlagBits(client) & ADMFLAG_GENERIC
    
|| GetUserFlagBits(client) & ADMFLAG_KICK
    
|| GetUserFlagBits(client) & ADMFLAG_BAN
    
|| GetUserFlagBits(client) & ADMFLAG_UNBAN
    
|| GetUserFlagBits(client) & ADMFLAG_SLAY
    
|| GetUserFlagBits(client) & ADMFLAG_CHANGEMAP
    
|| GetUserFlagBits(client) & ADMFLAG_CONVARS
    
|| GetUserFlagBits(client) & ADMFLAG_CONFIG
    
|| GetUserFlagBits(client) & ADMFLAG_CHAT
    
|| GetUserFlagBits(client) & ADMFLAG_VOTE
    
|| GetUserFlagBits(client) & ADMFLAG_PASSWORD
    
|| GetUserFlagBits(client) & ADMFLAG_RCON
    
|| GetUserFlagBits(client) & ADMFLAG_CHEATS
    
|| GetUserFlagBits(client) & ADMFLAG_ROOT)
    {
        return 
true;
    }
    return 
false;


IX - Changelogs

Quote:

V1.3.6
- Set correctly the check function for the chat trigger.

V1.3.5
- Detect before giving away the knife if the player have one. Usefull for some maps who strip the knife.
-Added one translation sentence.

V1.3.4
-Detect knife who belong to the map and have a name. "drapi_knives_check_knife_mode"
Usually entites with a "targetname" means they have some attachements.
-Added one translation sentence.

V1.3.3
-cvar "drapi_knives_give_mode" will block the give away in any circumstances.

V1.3.2
-Added two translations sentences.

V1.3.1
-Added cvar "drapi_knives_give_mode"
-Added one translation sentence.

V1.3.0
-Fix problem with taser who use the same slot as knife. Thanks Neuro Toxin
-Added access for VIP/ADMIN "drapi_knives_access_mode".
-Fix trigger chat.

V1.2.0
-Fix problem with takeover bot.
-Added some forwards for future modules.

V1.1.1
Change "knifes" to "knives"
Thx to Pan32 to remember this.
V1.1.0
Mysql support.
Zombie Reloaded support.
X - Credits

Neuro Toxin
For the solution with the taser using the same slot as knife.
Quote:

Originally Posted by Neuro Toxin (Post 2304578)
You need to loop all weapons in the knife slot and remove any tasers. Check for item definition 31 which is a taser. Once you equip the new knife. Give the player a taser if you removed one :)

I logged a report like 2 years ago asking for valve to fix this. They then made the taser droppable as a fix for some reason and didn't actually fix the bug.

PS: Post your error logs to quiclky fix the problem if you have.

XI - Donate

If you like my work.

https://www.paypalobjects.com/en_US/...onateCC_LG.gif

Addicted. 05-30-2015 13:28

Re: [CS:GO] - KNIVES | FALCHION | NO CRASH | 100% Translatable
 
Cool plugin, i'll check it out.

This one works perfect for me though, https://forums.alliedmods.net/showthread.php?t=243254

Dr. Api 05-30-2015 13:34

Re: [CS:GO] - KNIVES | FALCHION | NO CRASH | 100% Translatable
 
Quote:

Originally Posted by oaaron99 (Post 2302784)
Cool plugin, i'll check it out.

This one works perfect for me though, https://forums.alliedmods.net/showthread.php?t=243254

I knew this plugin too but it making crash Zombie Server. So I made my own for my community and zombie mod servers.

Lannister 05-30-2015 14:05

Re: [CS:GO] - KNIVES | FALCHION | NO CRASH | 100% Translatable
 
Works perfect, thanks alot!

Dr. Api 05-30-2015 14:08

Re: [CS:GO] - KNIVES | FALCHION | NO CRASH | 100% Translatable
 
Quote:

Originally Posted by Lannister (Post 2302793)
Works perfect, thanks alot!

You're welcome, please report any bugs :)

Addicted. 05-30-2015 15:30

Re: [CS:GO] - KNIVES | FALCHION | NO CRASH | 100% Translatable
 
Quote:

Originally Posted by Dr. Api (Post 2302787)
I knew this plugin too but it making crash Zombie Server. So I made my own for my community and zombie mod servers.

Oh I didn't know that. Well you have a nice plugin! Keep it up.

DopeBoyMagic 05-30-2015 15:56

Re: [CS:GO] - KNIVES | FALCHION | NO CRASH | 100% Translatable
 
Hi,

i tried to install the plug in on my server. It didnt crash it like the other one so thats good :P

Problem is i am starting with a Falchion Knife but when i try to open the menu etc nothing happens.

What did i do wrong?

Dr. Api 05-30-2015 16:04

Re: [CS:GO] - KNIVES | FALCHION | NO CRASH | 100% Translatable
 
Quote:

Originally Posted by DopeBoyMagic (Post 2302837)
Hi,

i tried to install the plug in on my server. It didnt crash it like the other one so thats good :P

Problem is i am starting with a Falchion Knife but when i try to open the menu etc nothing happens.

What did i do wrong?

How did you do to open the menu ? Type knife, !knife or /knife in chat.
Translation file is needed too.

DopeBoyMagic 05-30-2015 16:23

Re: [CS:GO] - KNIVES | FALCHION | NO CRASH | 100% Translatable
 
Quote:

Originally Posted by Dr. Api (Post 2302840)
How did you do to open the menu ? Type knife, !knife or /knife in chat.
Translation file is needed too.

yeah the menu doesnt work

translation file is in.

Geomod is in. .smx is in.

I dont understand whats going on

The translation file is in

/csgo/csgo/addons/sourcemod/translations

This is correct right?

Error:

Quote:

22:32:54: [SM] Plugin encountered error 4: Invalid parameter or parameter type
L 05/30/2015 - 22:32:54: [SM] Native "Format" reported: Language phrase "Knife Menu Command" not found
L 05/30/2015 - 22:32:54: [SM] Displaying call stack trace for plugin "drapi_knifes.smx":
L 05/30/2015 - 22:32:54: [SM] [0] Line 293, drapi_knifes.sp::Event_Say()
L 05/30/2015 - 22:32:56: [SM] Plugin encountered error 4: Invalid parameter or parameter type
L 05/30/2015 - 22:32:56: [SM] Native "Format" reported: Language phrase "Knife Menu Command" not found
L 05/30/2015 - 22:32:56: [SM] Displaying call stack trace for plugin "drapi_knifes.smx":
L 05/30/2015 - 22:32:56: [SM] [0] Line 293, drapi_knifes.sp::Event_Say()
L 05/30/2015 - 22:32:59: [SM] Plugin encountered error 4: Invalid parameter or parameter type
L 05/30/2015 - 22:32:59: [SM] Native "Format" reported: Language phrase "Knife Menu Command" not found
L 05/30/2015 - 22:32:59: [SM] Displaying call stack trace for plugin "drapi_knifes.smx":
L 05/30/2015 - 22:32:59: [SM] [0] Line 293, drapi_knifes.sp::Event_Say()
this happens when i type !knife


Alright i guess the problem is that i am using it with the KZ Mod right?

Its not made for it? ;__;. I assume its cause the KZ Timer Menu overrides any other menu? I think i heard something about this before. That must be the issue.

Any way to get this work for KZ?

Franc1sco 05-30-2015 16:45

Re: [CS:GO] - KNIVES | FALCHION | NO CRASH | 100% Translatable
 
This plugin seems very similar to the plugin that I sold to zombie4ever owner


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

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