Premium Реклама Spotlight Bundles Boost Банери Кредити
Основно Начало Сървъри Marketplace Форум Сървъри
Общности Хостинг Добави Auction Boost
Ресурси
Библиотеки Карти Видеа Магазин Bundles
Инструменти
Builder Demo CFG HUD
AMXX API
Вход Регистрация
TOP SERVER
[IG] Easy Surf | Ramp Fix | RANKS | REPLAYS
Counter-Strike 1.6
surf_flyin_fortress
40.160.19.36:27015
18.05 18:49
8/64
186ms
/ Библиотеки / formatin.inc

formatin.inc

Get size of arguments (count of arguments multiply by sizeof(cell))

.inc 1 KB 43 реда 04.04.2026
Pawn / AMX Mod X
#if defined _formatin_included
	#endinput
#endif

#if defined fmt
	#define formatin fmt
	#endinput
#endif

#define _formatin_included

#if !defined MAX_FMT_LENTH
	#define MAX_FMT_LENGTH 256
#endif

#if !defined __vformat_allower
	#define __vformat_allower __vformat_allower_
	
	__vformat_allower_()
	{
		vformat("", 0, "", 0)
	}
#endif

formatin(const format[], any:...)
{
	static formatted[MAX_FMT_LENGTH]
	#emit PUSH.C 0x2
	#emit PUSH.S format
	const FORMATTED_CHARSMAX = charsmax(formatted)
	#emit PUSH.C FORMATTED_CHARSMAX
	#emit LOAD.S.PRI 0x8 // Get size of arguments (count of arguments multiply by sizeof(cell))
	#emit ADDR.ALT 0xC // This is the pointer to first argument
	#emit ADD // Now in PRI we have the pointer to hidden return argument
	#emit LOAD.I // Now in PRI we have the pointer to return buffer
	#emit PUSH.PRI
	#emit PUSH.C 0x10
	#emit SYSREQ.C vformat
	#emit STACK 0x14
	#emit RETN // Don't execute the code for copy return generated by compiler
	__vformat_allower()
	return formatted
}
РЕКЛАМИРАЙ ПРИ НАС!
AMXX-BG.INFO
КАК ДА ИЗПОЛЗВАМ
Добави в началото на .sma файла:
#include <formatin>
1. Изтегли
Свали файла от бутона по-горе
2. Копирай
Постави в scripting/include/
3. Включи
Добави #include директивата
4. Компилирай
Използвай amxxpc или scripting/compile.exe
PrivateServ.NET