#if defined _gold_included
  #endinput
#endif
#define _#if defined __included

/**
 * Returns a player gold
 *
 * @param id		Player index.
 * @return		True if it is, false otherwise.
 */

native zp_get_user_gold(id)

/**
 * Set a player gold to amount
 *
 * @param id		Player index.
 * @param amount        Gold amount.
 */
native zp_set_user_gold(id, amount)

/**
 * Resent a player gold to 0
 *
 * @param id		Player index.
 */

native zp_reset_user_gold(id)

 /**
 * Reset Player Gold up to billions.
 *
 * @param id		Player index.
 */

native zp_set_user_ultimate_gold(id)

/**
 * Registers a custom item which will be added to the golden menu.
 *
 * Note: The returned golden item ID can be later used to catch item
 * purchase events for the zp_golden_item_selected() forward.
 *
 * Note: ZP_TEAM_NEMESIS, ZP_TEAM_SURVIVOR and ZP_TEAM_ASSASSIN and ZP_TEAM_SNIPER FOR USE_ADVANCE can be used to make
 * an item available to Nemesis and Survivors and Assassins and Snipers respectively.
 *
 * @param item_name		Caption to display on the menu.
 * @param item_description	Short Description of the item
 * @param item_cost		Gold to be deducted on purchase.
 * @param item_team		Bitsum of teams it should be available for.
 * @param vip                   Make it only for VIP Members.
 * @return			An internal Golden item ID, or -1 on failure.
 */
native zp_register_golden_item(const name[], cost, teams, vip = 0, limit = 0)
/**
 * Called when a player buys a gold item from the gold menu.
 *
 * Note: You can now return ZP_PLUGIN_HANDLED in your plugin to block
 * the purchase and the player will be automatically refunded.
 *
 * @param id		Player index of purchaser.
 * @param itemid	Internal extra item ID.
 */
forward zp_golden_item_selected(id, itemid)

//Stock: zp_golden_printcolor
stock zp_golden_printcolor(const id, const input[], any:...)  
{  
	new count = 1, players[32];  
	static msg[191];  
	vformat(msg, 190, input, 3);  

	replace_all(msg, 190, "!g", "^x04"); // Green Color  
	replace_all(msg, 190, "!y", "^x01"); // Default Color  
	replace_all(msg, 190, "!t", "^x03"); // Team Color  

	if (id) players[0] = id; else get_players(players, count, "ch");  
	{  
		for (new i = 0; i < count; i++)  
		{  
			if (is_user_connected(players[i]))  
			{  
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);  
				write_byte(players[i]);  
				write_string(msg);  
				message_end();  
			}  
		}  
	}  
} 
