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?