Edit: done.
PHP Code:
#include <csgoitems>
public Plugin myinfo =
{
name = "Test Plugin",
author = "SM9",
version = "0.1",
url = "http://www.fragdeluxe.com"
};
public void OnPluginStart()
{
if (GetEngineVersion() != Engine_CSGO) {
SetFailState("This plugin is for CSGO only.");
}
}
stock int GetActiveDefaultClipAmmo(int iClient)
{
int iDefIndex = CSGOItems_GetActiveWeaponDefIndex(iClient);
return CSGOItems_GetWeaponClipAmmoByDefIndex(iDefIndex);
}
stock bool RefillActiveWeapon(int iClient)
{
int iWeapon = CSGOItems_GetActiveWeaponIndex(iClient);
return CSGOItems_RefillClipAmmo(iWeapon); // true on success.
}