Скопируйте скомпилированный .amxx в /amxmodx/plugins/
Пропишите .amxx в /amxmodx/configs/plugins.ini
Перезапустите карту
Настройки
Образец выпадение подарка после 5 секунд от начало раунда
Код:
#include<amxmodx>#include<amxmisc>#include<prezenty>#define PLUGIN "Lista prezentow"#define VERSION "1.0"#define AUTHOR "R3X"publicplugin_init(){register_plugin(PLUGIN, VERSION, AUTHOR)register_gift("Prezent#1","Prezent_Numer1");register_gift("Prezent#2","Prezent_Numer2");//Na poczatk rundyregister_event("HLTV","eventRoundInit","a","1=0","2=0");}publiceventRoundInit(){gifts_clear_map();set_task(5.0,"taskSpawnGift",2368);}publictaskSpawnGift(){gift_spawn();}publicPrezent_Numer1(id){client_print(id, print_chat,"Podniosles prezent nr 1");}publicPrezent_Numer2(id){client_print(id, print_chat,"Podniosles prezent nr 2");}
/**
* * Add a new gift possible to hit in the package
*
* @ * @param szName name displayed after mouse over
* @param szFunction function executed after collecting a gift
* @param chance number from 1 to 10
*/
native Gift:register_gift( Const szName [],const szFunction [], chance =5);/**
* Create a gift on the map
* @param gift Award Number or GIFT_RANDOM if random
* @param Float:fOrigin [3] point on the map where the package is to be created,
* you may not specify, then a random location will be selected
*/
native gift_spawn(gift: gift = gift_random,float:...);/**
* Cleaning the map with gifts
*/
native gifts_clear_map();
На данном сайте используются файлы cookie, чтобы персонализировать контент и сохранить Ваш вход в систему, если Вы зарегистрируетесь.
Продолжая использовать этот сайт, Вы соглашаетесь на использование наших файлов cookie.