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
10/64
188ms
/ Библиотеки / fmt.inc

fmt.inc

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

.inc 1009 B 38 реда 04.04.2026
Pawn / AMX Mod X
#if defined _fmt_included
	#endinput
#endif

#define _fmt_included

#if !defined MAX_FMT_LENGTH
	const MAX_FMT_LENGTH = 256

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

	stock fmt(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
	}
#endif
РЕКЛАМИРАЙ ПРИ НАС!
AMXX-BG.INFO
КАК ДА ИЗПОЛЗВАМ
Добави в началото на .sma файла:
#include <fmt>
1. Изтегли
Свали файла от бутона по-горе
2. Копирай
Постави в scripting/include/
3. Включи
Добави #include директивата
4. Компилирай
Използвай amxxpc или scripting/compile.exe
PrivateServ.NET