Raised This Month: $32 Target: $400
 8% 

Master Key v0.7


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   General Purpose       
eat1k
Senior Member
Join Date: Apr 2018
Old 11-30-2018 , 17:33   Master Key v0.7
Reply With Quote #1

Author: w0w (me).

Current version: 0.7

Changelog:
Spoiler


Requirements:
  • AMX Mod X 1.8.3 or higher.
  • ReAPI module.

Multilingual support:
  • English (EN): me.
  • German (DE): Godofwar
  • Russian (RU): me.
  • Spanish (ES): me.
  • Turkish (TR): Snake.

The plugin provides the ability to buy a master key to open a door/cell (func_door, func_door_*) .
Example of use: open the main cell in the JailBreak mode.

Commands: say/say_team /masterkey, .masterkey

The config file is created automatically in "amxmodx/configs/plugins" where you can set settings which you want.

Spoiler


The plugin has some natives:
  • mk_has_user_item(id): returns true if a player has a master key, false otherwise.
  • mk_give_user_item(id): gives to a player a master key. Returns true on success, false otherwise.
  • mk_num_bought(): returns the number of master keys bought or -1 if the CVar master_key_purchase_mode is 0.
Use #include <master_key> to use natives from that plugin.

Official topic of the resource in:
Attached Files
File Type: sma Get Plugin or Get Source (master_key.sma - 701 views - 12.0 KB)
File Type: zip master_key_0.7.zip (6.7 KB, 124 views)

Last edited by eat1k; 12-31-2018 at 12:26. Reason: Updated to 0.7
eat1k is offline
eat1k
Senior Member
Join Date: Apr 2018
Old 11-30-2018 , 18:30   Re: Master Key v0.5
Reply With Quote #2

Updated to 0.6. Added natives:
  • mk_has_user_masterkey: returns true if a player has a master key, false otherwise.
  • mk_give_user_masterkey: gives to a player a master key. Returns true on success, false otherwise.
  • mk_masterkeys_num_bought: returns the number of master keys bought or -1 if the CVar master_key_purchase_mode is 0.
Use #include <master_key> to use natives from that plugin.
eat1k is offline
Snake.
Senior Member
Join Date: Jul 2017
Old 11-30-2018 , 18:40   Re: Master Key v0.5
Reply With Quote #3

Code:
[tr]
JB_MK_BOUGHT = ^4[MK] ^4Bir usta anahtari ^1aldin. Hucreye bakarak '^4E^1' bas
JB_MK_ERROR_DEAD = ^4[MK] ^1Oluyken ^4usta anahtari ^1alamazsin
JB_MK_ERROR_ACCESS = ^4[MK] ^3Usta anahtari ^1alma iznin yok
JB_MK_ERROR_BOUGHT = ^4[MK] ^1Zaten ^4bir usta anahtari ^1aldin
JB_MK_ERROR_LIMIT = ^4[MK] ^1Birileri zaten bu raundda ^4bir usta anahtari ^1almis
JB_MK_ERROR_ROUND_LIMIT = ^4[MK] ^1Butun ^4usta anahtarlari ^1satildi
JB_MK_ERROR_MONEY = ^4[MK] ^3Bir usta anahtari ^1alman icin yeterli paran yok. Fiyat: ^4%d$
JB_MK_ERROR_TEAM = ^4[MK] ^1Sadece mahkumlar ^4usta anahtari ^1alabilir
JB_MK_ERROR_INVALID = ^4[MK] ^1Sadece ana hucreyi acabilirsin
Snake. is offline
Send a message via Skype™ to Snake.
eat1k
Senior Member
Join Date: Apr 2018
Old 11-30-2018 , 19:04   Re: Master Key v0.6
Reply With Quote #4

Quote:
Originally Posted by Snake. View Post
Code:
[tr]
JB_MK_BOUGHT = ^4[MK] ^4Bir usta anahtari ^1aldin. Hucreye bakarak '^4E^1' bas
JB_MK_ERROR_DEAD = ^4[MK] ^1Oluyken ^4usta anahtari ^1alamazsin
JB_MK_ERROR_ACCESS = ^4[MK] ^3Usta anahtari ^1alma iznin yok
JB_MK_ERROR_BOUGHT = ^4[MK] ^1Zaten ^4bir usta anahtari ^1aldin
JB_MK_ERROR_LIMIT = ^4[MK] ^1Birileri zaten bu raundda ^4bir usta anahtari ^1almis
JB_MK_ERROR_ROUND_LIMIT = ^4[MK] ^1Butun ^4usta anahtarlari ^1satildi
JB_MK_ERROR_MONEY = ^4[MK] ^3Bir usta anahtari ^1alman icin yeterli paran yok. Fiyat: ^4%d$
JB_MK_ERROR_TEAM = ^4[MK] ^1Sadece mahkumlar ^4usta anahtari ^1alabilir
JB_MK_ERROR_INVALID = ^4[MK] ^1Sadece ana hucreyi acabilirsin
Thank you! Updated the archive.
eat1k is offline
Godofwar
AlliedModders Donor
Join Date: Dec 2015
Location: Germany
Old 12-01-2018 , 08:24   Re: Master Key v0.6
Reply With Quote #5

German Language:

Code:
[de]
JB_MK_BOUGHT = ^4[MK] ^1Du hast einen ^4Hauptschluessel ^1gekauft. Nutze '^4E^1' um in die Zelle zu schauen
JB_MK_ERROR_DEAD = ^4[MK] ^1Du kannst keinen ^4Hauptschluessel ^1kaufen, weil du tot bist
JB_MK_ERROR_ACCESS = ^4[MK] ^1Du hast keinen Zugang um einen ^4Hauptschluessel ^1zu kaufen
JB_MK_ERROR_BOUGHT = ^4[MK] ^1Du hast bereits einen ^4Hauptschluessel ^1gekauft
JB_MK_ERROR_LIMIT = ^4[MK] ^1Irgendjemand hat bereits einen ^4Hauptschluessel ^1in dieser Runde gekauft
JB_MK_ERROR_ROUND_LIMIT = ^4[MK] ^1Alle ^4Hauptschluessel ^1wurden verkauft
JB_MK_ERROR_MONEY = ^4[MK] ^1Du hast nicht genuegend Geld um einen ^4Hauptschluessel ^1zu kaufen. ^4Preis: ^3%d$
JB_MK_ERROR_TEAM = ^4[MK] ^1Nur Gefangene koennen einen ^4Hauptschluessel ^1kaufen
JB_MK_ERROR_INVALID = ^4[MK] ^1Du kannst nur die Hauptzelle oeffnen.

Last edited by Godofwar; 12-01-2018 at 18:07.
Godofwar is offline
eat1k
Senior Member
Join Date: Apr 2018
Old 12-01-2018 , 09:01   Re: Master Key v0.6
Reply With Quote #6

Quote:
Originally Posted by Godofwar View Post
German Language:

Code:
[de]
JB_MK_BOUGHT = ^4[MK] ^1Du hast einen ^4Hautschluessel ^1gekauft. Nutze '^4E^1' um in die Zelle zu schauen
JB_MK_ERROR_DEAD = ^4[MK] ^1Du kannst keinen ^4Hauptschluessel ^1kaufen, weil du tot bist
JB_MK_ERROR_ACCESS = ^4[MK] ^1Du hast keinen Zugang um einen ^4Hauptschluessel ^1zu kaufen
JB_MK_ERROR_BOUGHT = ^4[MK] ^1Du hast bereits einen ^4Hauptschluessel ^1gekauft
JB_MK_ERROR_LIMIT = ^4[MK] ^1Irgendjemand hat bereits einen ^4Hauptschluessel ^1in dieser Runde gekauft
JB_MK_ERROR_ROUND_LIMIT = ^4[MK] ^1Alle ^4Hauptschluessel ^1wurden verkauft
JB_MK_ERROR_MONEY = ^4[MK] ^1Du hast nicht genuegend Geld um einen ^4Hauptschluessel ^1zu kaufen. ^4Preis: ^3%d$
JB_MK_ERROR_TEAM = ^4[MK] ^1Nur Gefangene koennen einen ^4Hauptschluessel ^1kaufen
JB_MK_ERROR_INVALID = ^4[MK] ^1Du kannst nur die Hauptzelle oeffnen.
Thank you! Updated the archive.
eat1k is offline
Godofwar
AlliedModders Donor
Join Date: Dec 2015
Location: Germany
Old 12-01-2018 , 18:08   Re: Master Key v0.6
Reply With Quote #7

Pls edit , forgot one Key.

from JB_MK_BOUGHT = ^4[MK] ^1Du hast einen ^4Hautschluessel ^1gekauft. Nutze '^4E^1' um in die Zelle zu schauen

to:
JB_MK_BOUGHT = ^4[MK] ^1Du hast einen ^4Hauptschluessel ^1gekauft. Nutze '^4E^1' um in die Zelle zu schauen

Godofwar is offline
eat1k
Senior Member
Join Date: Apr 2018
Old 12-01-2018 , 18:22   Re: Master Key v0.6
Reply With Quote #8

Quote:
Originally Posted by Godofwar View Post
Pls edit , forgot one Key.

from JB_MK_BOUGHT = ^4[MK] ^1Du hast einen ^4Hautschluessel ^1gekauft. Nutze '^4E^1' um in die Zelle zu schauen

to:
JB_MK_BOUGHT = ^4[MK] ^1Du hast einen ^4Hauptschluessel ^1gekauft. Nutze '^4E^1' um in die Zelle zu schauen

Thank you! Updated the archive.
__________________
eat1k is offline
eat1k
Senior Member
Join Date: Apr 2018
Old 12-18-2018 , 13:40   Re: Master Key v0.7
Reply With Quote #9

Updated to 0.7.
  • CVars' description moved to the multilang file (there is no translation of Turkish and German languages).
  • Added CVar master_key_only_api (0/1) if you want to use the plugin only because of natives (if you don't want to allow buying).
  • Changed the names of natives (see master_key.inc).
  • Changed the method to check that player is not moving.
__________________
eat1k is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:44.


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