AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   MEDIC NPC (DOCTOR NPC) (https://forums.alliedmods.net/showthread.php?t=124379)

yura097 04-16-2010 03:39

MEDIC NPC (DOCTOR NPC)
 
3 Attachment(s)
Medic NPC
by Mr. Smit


Description:

Medic NPC it's some man, at whoom you can recover!

You can creat this NPC on your server, and it will be saved!

When you come to medic, he will ask you "Do you want recover?"


I got this idea today on my knife server:

I have surf server. On this server I have NPC Man whoom give to other players surf boards.
On my knife server my friend ask me : "It will be cool, if on your knife server some man can give you health!"

I have remembered about two plugins CS Surf Boards and Call Medic and connected them!

It is real cool! You can come to Medic and ask help!

Commands:

amx_createnpc
- Type in console to create the Medic NPC.

Cvars:

medic_enabled <0/1> (Default: 1)
<1> Enable this plugin
<0> Disable this plugin


medic_maxhp <1-X> (Default: 100)
Maximum Health on your server.

medic_health <1-X> (Default: 25)
How many health you get if you ask help from medic?

medic_costs <1-16000> (Default: 1500)
How many costs medic help?

medic_shout <0/1> (Default: 1)
Shouts "medic" with sound?

medic_message <0/1> (Default: 1)
Write a message "[Medic] Somebody has asked me" to all players?

medic_cooldown <1-X> (Default: 30)
How long is the cooldowntime for ask Medic's help again?
If you set medic_cooldown to 0, cooldowntime is disabled.

REQUIRES:

AMX Mod X version 1.8.1 or higher

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

How To Use:
  1. Get all files for plugin at the bottom of this post.
  2. Place the amx_medic-npc.amxx file in your server's addons/amxmodx/plugins folder.
  3. Open the plugins.ini from your server's addons/amxmodx/configs folder.
  4. Add amx_medic-npc.amxx
  5. Save and close the file.
  6. Place medic-mod.txt from the bottom of this post in your server's addons/amxmodx/data/lang folder.
  7. Add folder npcsaved in your server's addons/amxmodx/configs/ folder. If you will not do this. Medic NPC will not save!
  8. Add other files to your server (model, sound)
  9. Change the map or restart your server.
How change medic tag:

  1. Open file amx_medic-npc.sma
  2. Find string #define TAG "[Medic]"
  3. Change "[Medic]" to tag which you want see on your server. For example to "[Doctor]". You must get #define TAG "[Doctor]"
Other:

It isn't my code of plugin. I was only connected two plugins CS Surf Boards by hlstriker and Call Medic by Grinf4ce!

Translations:

I created languages file !


English
by Mr. Smit
Russian by Mr. Smit (UTF-8 Without Bom)

Please, If you can translate, post it here!

Screenshot:

medic-npc.jpg

Current Version: 1.0 :)

If you will find bug or my error please post about it here! :oops:
If you will post this plugin to other forums and sites please write this page link to them.... :nono:

Sorry for my bad English :wink:


Languages:

DE (German) by
master4life

Code:

[de]
MED_TAG = [Arzt]
MED_HAVENOT_MONEY = %s Du hast nicht genug Geld! um medizin zu kaufen!
MED_SOMEBODY_ASK = %s Jemand benötigt meine Hilfe!
MED_HPNORMAL = %s Sie wurden schon geheilt!
MED_DISABLED = %s Tut mir leid, ich bin besetzt.
MED_WAIT = %s Ich habe dir schon geholfen! Warte %i Sekunden!
MED_MENU =  Willkommen %s! ^n^n Willst du eine behandlung?^n^n1: Ja  -  2: Nein
MED_DONTWANT =  %s Willst du nicht meine hilfe? Wie Sie wollen!
MED_ERRORRESTART = Der ^"%s^" CVAR wurde geändert. Die Map muss vor dem Einsetzen der NPC neugestartet werden.
MED_SAVED = Der Arzt ist erstellt und gespeichert!



BG (Bulgarian) by
papyrus_kn

Code:

[bg]
MED_HAVENOT_MONEY = %s Vie nyamate dostatuchno pari! Lekarstvoto e plateno.
MED_SOMEBODY_ASK = %s Nyakoy poiska moyata pomosht.
MED_HPNORMAL = %s Veche ste zdrav!
MED_DISABLED = %s Az sum zaet. Sujalyavam!
MED_WAIT = %s Veche Vi pomognah! Izchakayte %i sekundi!
MED_MENU =  Zdraveyte %s! ^n^n Iskate li da se izlekuvate?^n^n1: Da  -  2: Ne
MED_DONTWANT =  %s Ne iskate da polzvate moyata pomosht? Vie si reshavate!
MED_ERRORRESTART = Cvar-ut ^"%s^" beshe promenen. Kartata tryabva da se restartira predi da slojite NPC-to. //%s - cvar name here
MED_SAVED = Medikut e suzdaden i zapazen!


grimvh2 04-16-2010 05:32

Re: MEDIC NPC (DOCTOR NPC)
 
Not a bad idea, but : Dont put a poll in ur plugin its annoying.

Add a cvar for the time that is needed to heal
Add a cvar for the health of the medic so you can kill him

I see you telling that they need to put a file in there config, you can create that urself in plugin_cfg() using if(!file_exists(yourfiledir)) then create it if it doesn't exists.

yura097 04-16-2010 05:47

Re: MEDIC NPC (DOCTOR NPC)
 
Quote:

Originally Posted by grimvh2 (Post 1151727)
Add a cvar for the health of the medic so you can kill him

So..

In code
Code:

    // Set damage and hp
    set_pev(g_npc, pev_takedamage, 0.0);

If change to

Code:

    // Set damage and hp
    set_pev(g_npc, pev_takedamage, 500.0);

Yes, You can kill medic npc for one hit. If you kill him it willn't "come" to next rounds.

So, I don't know pawn , only c# :)

I can't write this code (add check for medic live or / not, give him normal health)....

yura097 04-16-2010 05:49

Re: MEDIC NPC (DOCTOR NPC)
 
Quote:

Originally Posted by grimvh2 (Post 1151727)
Add a cvar for the time that is needed to heal

So, If you come to medic , and ask help, you must wait for repiar (3 hp in 1 second, for example)?

xPaw 04-16-2010 06:12

Re: MEDIC NPC (DOCTOR NPC)
 
Whenwe did this on jail server (more advanced, removed later), i knew someone will do it later. this happened xD

yura097 04-16-2010 06:59

Re: MEDIC NPC (DOCTOR NPC)
 
Pawn scripting - it's difficult? So can I do which want grimvh2?

Arkshine 04-16-2010 07:01

Re: MEDIC NPC (DOCTOR NPC)
 
If you are not able to support this plugin, you should not post it. You should start to read the rules, then learning the pawn.

yura097 04-16-2010 07:11

Re: MEDIC NPC (DOCTOR NPC)
 
Emm, I'm only post it here. Some man how exolent, xpaw and other can complete this plugin.

master4life 04-16-2010 07:17

Re: MEDIC NPC (DOCTOR NPC)
 
German Translate

Code:

[de]
MED_TAG = [Arzt]
MED_HAVENOT_MONEY = %s Du hast nicht genug Geld! um medizin zu kaufen!
MED_SOMEBODY_ASK = %s Jemand benötigt meine Hilfe!
MED_HPNORMAL = %s Sie wurden schon geheilt!
MED_DISABLED = %s Tut mir leid, ich bin besetzt.
MED_WAIT = %s Ich habe dir schon geholfen! Warte %i Sekunden!
MED_MENU =  Willkommen %s! ^n^n Willst du eine behandlung?^n^n1: Ja  -  2: Nein
MED_DONTWANT =  %s Willst du nicht meine hilfe? Wie Sie wollen!
MED_ERRORRESTART = Der ^"%s^" CVAR wurde geändert. Die Map muss vor dem Einsetzen der NPC neugestartet werden.
MED_SAVED = Der Arzt ist erstellt und gespeichert!


Code:

[en]
MED_TAG = [Медик]

:arrow:
Code:

[en]
MED_TAG = [Medic]


kanatzu 04-16-2010 08:52

Re: MEDIC NPC (DOCTOR NPC)
 
It's good for RPG/Jail. Else then that, i don't like it very much.

NPCs belongs to HL :)


All times are GMT -4. The time now is 22:30.

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