PDA

View Full Version : [ZP] Extended Give Ammo 2.0


[ru]In1ernal Error
09-11-2010, 08:29
[ZP] Extended Give Ammo 2.0
by [ru]In1ernal Error

http://ipicture.ru/uploads/101011/7ubxZI6UaW.jpghttp://ipicture.ru/uploads/101011/biRR2oJS86.jpg

Introduction
This plugins allows you to give ammo packs to a player using "Give Ammo menu" or to give ap to yourself using console command. You can choose in menu whether to add 10, 100 or 1000 ammo packs.

Commands
zp_ammo_e - open ammo packs menu
zp_ammo_e_self <amount> - give ammo to yourself

Changelog

v2.0
- Added ML support
- Added colored chat messages
- A few small optimizations


v1.0
- Initial release
Multilingual
[en] - In1ernal Error (http://cserror.ru)
[ru] - In1ernal Error (http://cserror.ru)
[de] - John301 (http://forums.alliedmods.net/member.php?u=82319)
[kr] - DSASDFGH (https://forums.alliedmods.net/member.php?u=146254)
[ro] - Se7ven (https://forums.alliedmods.net/member.php?u=117168)
[fin] - jonnzus (https://forums.alliedmods.net/member.php?u=92879)
[lt] - Gutted (http://forums.alliedmods.net/member.php?u=161760)

Sorry for bad english

mottzi
09-11-2010, 12:14
maybe u add:

zp_ammo_e_give <name>

[ru]In1ernal Error
09-11-2010, 15:09
maybe u add:

zp_ammo_e_give <name>
:mrgreen:
I've made this plugin because i didn't want to type in console "zp_giveap <name>" or something like that

If u send only player name with zp_ammo_e_give how many ammo packs should be given? U may suggest zp_ammo_e_give <name> <amount>, but then this plugin will be the same as "zp_extraammo", which I didn't liked at all

.`, Mc L1m0n`
09-28-2010, 17:51
awesome!

[ru]In1ernal Error
10-11-2010, 13:28
v2.0
- Added ML support
- Added colored chat messages
- A few small optimizations

ollegicch
10-11-2010, 13:41
5+

nikhilgupta345
10-11-2010, 13:46
Add an english screenshot.

[ru]In1ernal Error
10-11-2010, 23:57
Add an english screenshot.
Added:)

ghostkiller
10-26-2010, 02:47
who can use this plugin...i mean is it like just for admins (if so can access flag be edited), or can all players do this??
cos if everyone can do this then it will in time ruin a server....or ill just have to reset the bank more often

georgik57
10-26-2010, 08:07
nice job

[ru]In1ernal Error
11-04-2010, 10:53
2 ghostkiller, this one is for admins only. Just replace "ADMIN_LEVEL_A" with needed flag.
2 georgik57, thx! :)

Kiryu Zero
11-11-2010, 19:04
and if to do so to the admin could give all the ammo? such as team zp_ammo al!

Welgericht
11-14-2010, 04:50
Kiryu Zero

"zp_setap_all 100" - sets everybody's AP to 100
"zp_addap_all 100" - adds 100 AP to everybody



/*
Choose your ZP version.
*/
#define ZOMBIE_PLAGUE
//#define ZOMBIE_PLAGUE_ADVANCE

/*
Uncomment this, if you have warning 217 (loose indentation)
Uncomment means to delete these 2 symbols "//"
*/
//#define LOOSE_INDENTATION

#include < amxmodx >
#include < amxmisc >

#if defined ZOMBIE_PLAGUE
#include < zombieplague >
#endif

#if defined ZOMBIE_PLAGUE_ADVANCE
#include < zombie_plague_advance >
#endif

#define PLUGIN "New plug-in"
#define VERSION "1.0"
#define AUTHOR "author"

#if defined LOOSE_INDENTATION
#pragma tabsize 0
#endif


public plugin_init ()
{
register_plugin (PLUGIN, VERSION, AUTHOR);
register_clcmd ( "zp_setap_all", "CmdGiveAP", ADMIN_RCON, "- zp_setap_all <amount> : Give Ammo Packs" );
register_clcmd ( "zp_addap_all", "CmdAddAP", ADMIN_RCON, "- zp_addap_all <amount> : Add Ammo Packs" );
}

public CmdGiveAP ( id, level, cid )
{
if ( !cmd_access ( id, level, cid, 3 ) )
{
return PLUGIN_HANDLED;
}

new s_Amount[ 4 ];

read_argv ( 1, s_Amount, charsmax ( s_Amount ) );

zp_set_user_ammo_packs(0, str_to_num(s_Amount))

return PLUGIN_HANDLED;
}

public CmdAddAP ( id, level, cid )
{
if ( !cmd_access ( id, level, cid, 3 ) )
{
return PLUGIN_HANDLED;
}

new s_Amount[ 4 ];

read_argv ( 1, s_Amount, charsmax ( s_Amount ) );

zp_set_user_ammo_packs(0, zp_get_user_ammo_packs(0) + str_to_num(s_Amount))

return PLUGIN_HANDLED;
}

John301
11-14-2010, 10:44
Privet Paschalosto add german lang: [de]
WAS_G = erhalten
CHANGED = Jetzt sind wir an der Verteilung von
AMMO = Ammo packs
AM = Menu Verteilung von Ammo's

[ru]In1ernal Error
12-03-2010, 13:17
2 John301: added! Check up the first post

John301
12-03-2010, 17:50
omg thanks ^^ :up:

verry nice plugin ^^

John301
12-04-2010, 06:33
Ohhh Noooo now i become a Runtime error :(

abdul-rehman
12-04-2010, 08:29
Ohhh Noooo now i become a Runtime error :(

You r a run-time error ??

jc980
12-04-2010, 08:38
You r a run-time error ??

see your trying to make another fight again.

John301
12-04-2010, 11:02
ohh no now its every think ok ...
Cause i did a mistake ... ^^ sorry

Balgaa
07-22-2011, 23:29
this plugin doesnt work with Epmak's bank plugin...

please fix update it.

it immediately crash ZP 4.3 and even patched versions too...

DSASDFGH
07-25-2011, 13:28
nice plugin :D

DSASDFGH
07-25-2011, 13:30
Korean Translate ^^ Don't forgot to save with UTF-8 ^^



[kr]
WAS_G = 님이
CHANGED = 탄약팩 지급:
AMMO = 포인트
AM = 포인트 주기 메뉴

Se7ven
07-27-2011, 05:05
[ro]
WAS_G = a fost dat
CHANGED = Acum iti da
AMMO = ammo packs
AM = Meniul Ammo pentru dat

Here is in Romain :)

[ru]In1ernal Error
08-03-2011, 07:21
2 DSASDFGH, Se7ven: thx! Added!

jonnzus
08-19-2011, 11:29
[fin]
WAS_G = ollaan annettu
CHANGED = nyt se annetaan
AMMO = ammo packs
AM = Anna Ammoja valikko

there is finish translate:P

Balgaa
08-19-2011, 20:39
error any answer for my question?

jonnzus
08-19-2011, 20:58
error any answer for my question?
use another bank? :D

[ru]In1ernal Error
11-20-2011, 03:25
jonnzus, thx! Added fin lang!

Gutted
11-20-2011, 12:49
[lt]
WAS_G = buvo suteikta
CHANGED = Dabar jis duos
AMMO = kreditai
AM = Kreditu Meniu

This is Lithuanian Version, Please add this.

[ru]In1ernal Error
11-21-2011, 07:57
Gutted, thx! Added lt lang!

Sammer123
01-20-2012, 06:47
Nothing Worked For ME !!!
PLZ HELP
What should i do ?? :(

H.RED.ZONE
01-20-2012, 11:12
Nothing Worked For ME !!!
PLZ HELP
What should i do ?? :(

#include <amxmodx>
#include <amxmisc>
#include <zombieplague>

public plugin_init ()
{
register_plugin ( "ZP: Give Ammo", "1.0.0", "Arkshine" );
register_clcmd ( "zp_giveap", "CmdGiveAP", ADMIN_RCON, "- zp_giveap <name> <amount> : Give Ammo Packs" );
register_clcmd ( "amx_giveap", "CmdGiveAP", ADMIN_RCON, "- amx_giveap <name> <amount> : Give Ammo Packs" );
}

public CmdGiveAP ( id, level, cid )
{
if ( !cmd_access ( id, level, cid, 3 ) )
{
return PLUGIN_HANDLED;
}

new s_Name[ 32 ], s_Amount[ 4 ];

read_argv ( 1, s_Name, charsmax ( s_Name ) );
read_argv ( 2, s_Amount, charsmax ( s_Amount ) );

new i_Target = cmd_target ( id, s_Name, 2 );

if ( !i_Target )
{
client_print ( id, print_console, "(!) Player not found" );
return PLUGIN_HANDLED;
}

if(is_user_admin(i_Target))
zp_set_user_ammo_packs ( i_Target, max ( 1, str_to_num ( s_Amount ) ) );

return PLUGIN_HANDLED;
}

I use this

Sammer123
01-21-2012, 03:27
THANKS !!
but where should i put this ?

H.RED.ZONE
01-21-2012, 05:24
THANKS !!
but where should i put this ?

How do you mean where? o.O

Sammer123
01-21-2012, 05:27
#include <amxmodx>
#include <amxmisc>
#include <zombieplague>

public plugin_init ()
{
register_plugin ( "ZP: Give Ammo", "1.0.0", "Arkshine" );
register_clcmd ( "zp_giveap", "CmdGiveAP", ADMIN_RCON, "- zp_giveap <name> <amount> : Give Ammo Packs" );
register_clcmd ( "amx_giveap", "CmdGiveAP", ADMIN_RCON, "- amx_giveap <name> <amount> : Give Ammo Packs" );
}

public CmdGiveAP ( id, level, cid )
{
if ( !cmd_access ( id, level, cid, 3 ) )
{
return PLUGIN_HANDLED;
}

new s_Name[ 32 ], s_Amount[ 4 ];

read_argv ( 1, s_Name, charsmax ( s_Name ) );
read_argv ( 2, s_Amount, charsmax ( s_Amount ) );

new i_Target = cmd_target ( id, s_Name, 2 );

if ( !i_Target )
{
client_print ( id, print_console, "(!) Player not found" );
return PLUGIN_HANDLED;
}

if(is_user_admin(i_Target))
zp_set_user_ammo_packs ( i_Target, max ( 1, str_to_num ( s_Amount ) ) );

return PLUGIN_HANDLED;
}

I use this

where shuld i put this text ^
^

H.RED.ZONE
01-21-2012, 05:28
hmm..inside your amx studio then convert it to amxx file.

gogicaa
01-21-2012, 13:08
hmm..inside your amx studio then convert it to amxx file.

He doesn't even know how to compile plugin ...

Sammer123
01-21-2012, 13:13
should i go to amxx-studio ?
then put this text ?
just ?
and what should i write to have ammo
plz help !
i don't know more of this !

H.RED.ZONE
01-21-2012, 13:29
should i go to amxx-studio ?
then put this text ?
just ?
and what should i write to have ammo
plz help !
i don't know more of this !

You need to learn just search

Sammer123
01-21-2012, 15:25
I tried to put this text on amxx-studio
and saved it to .sma file , put it addons\amxmodx\scripting , named it ammo , then typed on console ( zp_giveap <my name> <100> ) without quotes
but nothing !
HeLp :(

gogicaa
01-21-2012, 15:38
I tried to put this text on amxx-studio
and saved it to .sma file , put it addons\amxmodx\scripting , named it ammo , then typed on console ( zp_giveap <my name> <100> ) without quotes
but nothing !
HeLp :(

Put .sma in your /scripting folder and than just run compile.exe ...
After that go in your /scripting/compiled folder and copy compiled .amxx to plugins folder ... and of course ... open plugins.ini and add plugin name on the bottom of the file ...

Sammer123
01-22-2012, 05:01
i can't find compiled.amxx !

H.RED.ZONE
01-22-2012, 05:59
i can't find compiled.amxx !

https://forums.alliedmods.net/showthread.php?t=130511

Sammer123
01-22-2012, 06:19
i put compiled.amxx on plugins folder
then write on console zp_giveap <my name> <100>
NOTHING !

H.RED.ZONE
01-22-2012, 07:20
i put compiled.amxx on plugins folder
then write on console zp_giveap <my name> <100>
NOTHING !

amx_giveap nick 100

Sammer123
01-22-2012, 07:34
amx_giveap nick 100 does not work !

H.RED.ZONE
01-22-2012, 07:48
-.- it works for me

Sammer123
01-22-2012, 07:49
it doesnt work for me -.-

H.RED.ZONE
01-22-2012, 07:52
That means you didn't put it correctly.

Sammer123
01-22-2012, 07:53
tell me the steps

H.RED.ZONE
01-22-2012, 07:56
1. Compile plugin (get amxx file)
2. Put plugin in plugins file
3. Write name in zp50_ammopacks.ini file (cstrike/addons/amxmodx/config)
4. Restart Server or Change Map.

Sammer123
01-22-2012, 15:05
can you give me Compile.amxx
and zp50_ammopacks.ini
because i can't find it !

Sammer123
01-24-2012, 09:49
H.RED.ZONE
Can you give me these two things ?

H.RED.ZONE
01-24-2012, 10:38
Give you're self ammo packs type "amx_giveap" "nick" "number"
Message is invisible.

Sammer123
01-24-2012, 17:04
thanks but i can't find those tow things :
Compile.amxx and zp50_ammopacks.ini
Can you Help Me BEST Helper ?

H.RED.ZONE
01-24-2012, 18:32
cstrike/addons/amxmodx/configs/plugins-zp50_ammopacks.ini

Inside
; ZP 5.0 / Module Version
; -----------------------


; Engine

zp50_core.amxx


; APIs

amx_settings_api.amxx
cs_player_models_api.amxx
cs_teams_api.amxx
cs_maxspeed_api.amxx
cs_weap_models_api.amxx
cs_weap_restrict_api.amxx
cs_ham_bots_api.amxx


; Classes

zp50_class_zombie.amxx
zp50_class_human.amxx
zp50_class_nemesis.amxx
zp50_class_survivor.amxx

; Zombie Classes

zp50_class_zombie_classic.amxx
;zp50_class_zombie_light.amxx
zp50_class_zombie_fat.amxx
;zp50_class_zombie_leech.amxx
;zp50_class_zombie_rage.amxx

; Human Classes

zp50_class_human_classic.amxx
;zp50_class_human_raptor.amxx


; This must come before game modes for armor protection to work properly
zp50_human_armor.amxx


; Game Modes Manager

zp50_gamemodes.amxx


; Game Modes

zp50_gamemode_infection.amxx
zp50_gamemode_multi.amxx
;zp50_gamemode_swarm.amxx
zp50_gamemode_nemesis.amxx
;zp50_gamemode_survivor.amxx
;zp50_gamemode_plague.amxx
;zp50_gamemode_armageddon.amxx

; Items Manager

zp50_items.amxx
;zp50_items_money.amxx
zp50_items_ammopacks.amxx


; Extra Items

zp50_item_weapons.amxx
zp50_item_nightvision.amxx
zp50_item_antidote.amxx
zp50_item_zombie_madness.amxx
zp50_item_infection_bomb.amxx

; Admin

zp50_admin_commands.amxx
zp50_admin_menu.amxx
zp50_admin_models.amxx


; Buying

zp50_buy_menus.amxx
zp50_buy_zones.amxx


; Rewards

;zp50_rewards_money.amxx
zp50_rewards_ammopacks.amxx
zp50_rewards_frags_hp.amxx


; Deathmatch

zp50_deathmatch.amxx
zp50_random_spawn.amxx
zp50_spawn_protection.amxx


; Zombie/Human Features

zp50_zombie_features.amxx
zp50_zombie_sounds.amxx
zp50_zombie_damage.amxx
zp50_human_ammo.amxx


; Custom Features

zp50_flashlight.amxx
zp50_nightvision.amxx
zp50_leap.amxx
zp50_painshockfree.amxx
zp50_knockback.amxx
zp50_weapon_drop_strip.amxx


; Effects

zp50_effects_infect.amxx
zp50_effects_cure.amxx
zp50_effects_lighting.amxx
zp50_ambience_effects.amxx
;zp50_ambience_sounds.amxx


; Gameplay / Other

zp50_main_menu.amxx
zp50_objective_remover.amxx
zp50_gameplay_fixes.amxx
zp50_team_scoring.amxx
zp50_hud_info.amxx
zp50_serverbrowser_info.amxx
zp50_ammopacks.amxx


; Custom grenades

;zp50_grenade_flashbangs.amxx
zp50_grenade_fire.amxx
zp50_grenade_frost.amxx
zp50_grenade_flare.amxx


; ZP 4.3 Subplugin Compatibility

zp50_zp43_compat.amxx
zp_giveap.amxx ;Write this line to activate plugin

2.Compiler is inside your amxmodx like this
Program files/AMX Mod X/files/base/scripting/here it is

3.I send you tut for that part.

gogicaa
01-25-2012, 19:03
thanks but i can't find those tow things :
Compile.amxx and zp50_ammopacks.ini
Can you Help Me BEST Helper ?

File is not called Compile.amxx i said that you must compile .amxx file !

Sammer123
01-27-2012, 07:20
i made a text, put it .ini
copied the code (UP)
then i went to /scripting click on Compile
when Compile done i rest my server
then type on console (amx_giveap My nick name 100) without quotes
NOTHING ?!
THANKS gogicaa ,H.RED.ZONE

Ant1Lamer
07-23-2012, 11:58
Anyone make players to be of 1 to 7 ammo switch to be with 8 ;)

anantthakor
07-26-2012, 23:01
I want to limit access of this plugin to me only, how ?