Raised This Month: $12 Target: $400
 3% 

Help about showing current ammo packs


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Ali0mer
Senior Member
Join Date: Jan 2016
Location: Iraq
Old 05-11-2019 , 11:08   Help about showing current ammo packs
Reply With Quote #1

hey guys, finally i decided to learn pawn language
anyway i need your help to do something

First im trying to make a plugin for zombie plague that shows the current ammo packs

look here what i did in this code
Code:
/* Plugin generated by AMXX-Studio */

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

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

new g_ammopacks [33]

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_clcmd("say /mypacks", "mypackshow")
}

public mypackshow(iPlayer)
{
	if (is_user_connected(iPlayer))
{
		client_print(iPlayer, print_chat, "Your Ammo Packs is : %d", g_ammopacks)
	}
}
It returns 0 which its true right?

Can you tell me how to show the current ammo packs? just a example code so i could learn

Thank you

EDIT:
I think i solved it
By doing this
Code:
/* Plugin generated by AMXX-Studio */

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

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_clcmd("say /mypacks", "mypackshow")
}

public mypackshow(iPlayer)
{
	new Ammo
	
	if (is_user_connected(iPlayer))
		{
			Ammo = zp_get_user_ammo_packs(iPlayer)
			
			client_print(iPlayer, print_chat, "Your Ammo Is : %d", Ammo)
		}
	}
So thats right?

Last edited by Ali0mer; 05-11-2019 at 11:28.
Ali0mer is offline
Send a message via Skype™ to Ali0mer
 


Thread Tools
Display Modes

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 10:25.


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