Не ми дава да компилирам

Въпроси и проблеми свързани с AMXModX.
Аватар
KARASKO
Извън линия
Потребител
Потребител
Мнения: 51
Регистриран на: 03 Яну 2021, 23:55
Се отблагодари: 1 път
Получена благодарност: 4 пъти

Не ми дава да компилирам

Мнение от KARASKO » 04 Апр 2021, 21:48

Имам всички необходими .inc файлове с 1.8.2 версия съм. Ето и снимка.
https://ibb.co/QfZ7911

Код за потвърждение: Избери целия код

#include <amxmodx>
#include <amxmisc>
#include <zombieplague>
#include <dhudmessage>

#define PLUGIN "Get Ammo Packs"
#define VERSION "1.0"
#define AUTHOR "X3"

new bool:lotto[33]
public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_clcmd("say /lotto", "freeap")
}

public freeap(id)
{
	new ap = zp_get_user_ammo_packs(id)
	
	if(lotto[id])
	{
		client_print_color(id, "!y[!gZP!y] !tYou have used your Chance!y. !tTry again next Map!y.")
	}
	else
	{
	new irandom = random_num(0,100)
	new szName[32]
	get_user_name(id, szName, charsmax(szName))
	
	switch(irandom)
	{
		case 0 .. 10:
		{
			client_print_color(id, "!y[!gZP!y] !tBad Luck!y. !tYou win Nothing!y. !tTry Next Map!y.")
		}
		case 11 .. 20:
		{
			client_print_color(id, "!y[!gZP!y] You got !gone !yon the lotto and won !g20 AmmoPacks!")
			zp_set_user_ammo_packs(id, ap + 20)
		}
		case 21 .. 30:
		{
			client_print_color(id, "!y[!gZP!y] You got !gtwo !yon the lotto and won !g75 AmmoPacks!")
			zp_set_user_ammo_packs(id, ap + 75)
		}
		case 31 .. 40:
		{
			client_print_color(id, "!y[!gZP!y] You got !gthree !yon the lotto and won !g100 AmmoPacks!")
			zp_set_user_ammo_packs(id, ap + 100)
		}
		case 41 .. 50:
		{
			client_print_color(id, "!y[!gZP!y] You got !gfour !yon the lotto and won !g135 AmmoPacks!")
			zp_set_user_ammo_packs(id, ap + 135)
		}
		case 51 .. 60:
		{
			client_print_color(id, "!y[!gZP!y] You got !gfive !yon the lotto and won !g200 AmmoPacks!")
			zp_set_user_ammo_packs(id, ap + 200)
		}
		case 61 .. 70:
		{
			client_print_color(id, "!y[!gZP!y] You got !gSIX !yon the lotto and won !g250 AmmoPacks!")
			client_print_color(0, "!y[!gZP!y] !g%s has got SIX on lotto and he won !g250 AP! !tTry Your luck say /lotto",szName)
			set_dhudmessage(255, 145, 0, -1.0, 0.7, 1, 0.0, 5.0, 1.0, 1.0)
			show_dhudmessage(id,"BRAVO! You won SIX^n+250 Ammo packs")
			zp_set_user_ammo_packs(id, ap + 250)

		}
		case 71 .. 80:
		{
			client_print_color(id, "!y[!gZP!y] You got !gSEVEN !yon the lotto and won !g500 AmmoPacks!")
			client_print_color(0, "!y[!gZP!y] !g%s has got SEVEN on lotto and he won !g500 AP! !tTry Your luck say /lotto",szName)
			set_dhudmessage(255, 145, 0, -1.0, 0.7, 1, 0.0, 5.0, 1.0, 1.0)
			show_dhudmessage(id,"BRAVO! You won SEVEN^n+500 Ammo packs")
			zp_set_user_ammo_packs(id, ap + 500)
		}
		case 81 .. 90:
		{
			client_print_color(id, "!y[!gZP!y] You got !gEIGHT !yon the lotto and won !g650 AmmoPacks!")
			client_print_color(0, "!y[!gZP!y] !g%s has got EIGHT on lotto and he won !g500 AP! !tTry Your luck say /lotto",szName)
			set_dhudmessage(255, 145, 0, -1.0, 0.7, 1, 0.0, 5.0, 1.0, 1.0)
			show_dhudmessage(id,"BRAVO! You won EIGHT^n+650 Ammo packs")
			zp_set_user_ammo_packs(id, ap + 650)
		}
		case 91 .. 100:
		{
			client_print_color(id, "!y[!gZP!y] You got !gNINE !yon the lotto and won !g750 AmmoPacks!")
			client_print_color(0, "!y[!gZP!y] !g%s has got NINE on lotto and he won !g750 AP! !tTry Your luck say /lotto",szName)
			set_dhudmessage(255, 145, 0, -1.0, 0.7, 1, 0.0, 5.0, 1.0, 1.0)
			show_dhudmessage(id,"BRAVO! You won NINE^n+750 Ammo packs")
			zp_set_user_ammo_packs(id, ap + 750)
		}
	}
	lotto[id] = true
}
}

stock client_print_color(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();  
			}
		}
	}
}

Аватар
Lethality
Извън линия
VHE Mapper
VHE Mapper
Мнения: 211
Регистриран на: 06 Яну 2020, 15:41
Местоположение: Германия
Се отблагодари: 34 пъти
Получена благодарност: 50 пъти
Обратна връзка:

Не ми дава да компилирам

Мнение от Lethality » 05 Апр 2021, 02:52

Код за потвърждение: Избери целия код

#include <amxmodx>
#include <amxmisc>
#include <zombieplague>
#define CC_COLORS_TYPE CC_COLORS_SHORT
#include <cromchat>

#if AMXX_VERSION_NUM < 183
    #include <dhudmessage>
#endif

#define PLUGIN "Get Ammo Packs"
#define VERSION "1.0"
#define AUTHOR "X3"

new bool:lotto[33]
public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_clcmd("say /lotto", "freeap")
}

public freeap(id)
{
	new ap = zp_get_user_ammo_packs(id)
	
	if(lotto[id])
	{
		CC_SendMessage(id, "!n[!gZP!n] !tYou have used your Chance!n. !tTry again next Map!n.")
	}
	else
	{
	new irandom = random_num(0,100)
	new szName[32]
	get_user_name(id, szName, charsmax(szName))
	
	switch(irandom)
	{
		case 0 .. 10:
		{
			CC_SendMessage(id, "!n[!gZP!n] !tBad Luck!n. !tYou win Nothing!n. !tTry Next Map!n.")
		}
		case 11 .. 20:
		{
			CC_SendMessage(id, "!n[!gZP!n] You got !gone !non the lotto and won !g20 AmmoPacks!")
			zp_set_user_ammo_packs(id, ap + 20)
		}
		case 21 .. 30:
		{
			CC_SendMessage(id, "!n[!gZP!n] You got !gtwo !non the lotto and won !g75 AmmoPacks!")
			zp_set_user_ammo_packs(id, ap + 75)
		}
		case 31 .. 40:
		{
			CC_SendMessage(id, "!n[!gZP!n] You got !gthree !non the lotto and won !g100 AmmoPacks!")
			zp_set_user_ammo_packs(id, ap + 100)
		}
		case 41 .. 50:
		{
			CC_SendMessage(id, "!n[!gZP!n] You got !gfour !non the lotto and won !g135 AmmoPacks!")
			zp_set_user_ammo_packs(id, ap + 135)
		}
		case 51 .. 60:
		{
			CC_SendMessage(id, "!n[!gZP!n] You got !gfive !non the lotto and won !g200 AmmoPacks!")
			zp_set_user_ammo_packs(id, ap + 200)
		}
		case 61 .. 70:
		{
			CC_SendMessage(id, "!n[!gZP!n] You got !gSIX !non the lotto and won !g250 AmmoPacks!")
			CC_SendMessage(0, "!n[!gZP!n] !g%s has got SIX on lotto and he won !g250 AP! !tTry Your luck say /lotto", szName)
			set_dhudmessage(255, 145, 0, -1.0, 0.7, 1, 0.0, 5.0, 1.0, 1.0)
			show_dhudmessage(id,"BRAVO! You won SIX^n+250 Ammo packs")
			zp_set_user_ammo_packs(id, ap + 250)

		}
		case 71 .. 80:
		{
			CC_SendMessage(id, "!n[!gZP!n] You got !gSEVEN !non the lotto and won !g500 AmmoPacks!")
			CC_SendMessage(0, "!n[!gZP!n] !g%s has got SEVEN on lotto and he won !g500 AP! !tTry Your luck say /lotto", szName)
			set_dhudmessage(255, 145, 0, -1.0, 0.7, 1, 0.0, 5.0, 1.0, 1.0)
			show_dhudmessage(id,"BRAVO! You won SEVEN^n+500 Ammo packs")
			zp_set_user_ammo_packs(id, ap + 500)
		}
		case 81 .. 90:
		{
			CC_SendMessage(id, "!n[!gZP!n] You got !gEIGHT !non the lotto and won !g650 AmmoPacks!")
			CC_SendMessage(0, "!n[!gZP!n] !g%s has got EIGHT on lotto and he won !g500 AP! !tTry Your luck say /lotto", szName)
			set_dhudmessage(255, 145, 0, -1.0, 0.7, 1, 0.0, 5.0, 1.0, 1.0)
			show_dhudmessage(id,"BRAVO! You won EIGHT^n+650 Ammo packs")
			zp_set_user_ammo_packs(id, ap + 650)
		}
		case 91 .. 100:
		{
			CC_SendMessage(id, "!n[!gZP!n] You got !gNINE !non the lotto and won !g750 AmmoPacks!")
			CC_SendMessage(0, "!n[!gZP!n] !g%s has got NINE on lotto and he won !g750 AP! !tTry Your luck say /lotto", szName)
			set_dhudmessage(255, 145, 0, -1.0, 0.7, 1, 0.0, 5.0, 1.0, 1.0)
			show_dhudmessage(id,"BRAVO! You won NINE^n+750 Ammo packs")
			zp_set_user_ammo_packs(id, ap + 750)
		}
	}
	lotto[id] = true
}
}
сложи -->cromchat.inc<-- библиотеката в паката amxmodx/scripting/include и компилирай

Най-добре би било да update-неш версията на AmxModX на 1.10

Аватар
KARASKO
Извън линия
Потребител
Потребител
Мнения: 51
Регистриран на: 03 Яну 2021, 23:55
Се отблагодари: 1 път
Получена благодарност: 4 пъти

Не ми дава да компилирам

Мнение от KARASKO » 05 Апр 2021, 13:39

Имам го и този файл, пак не става...

Аватар
atmax
Извън линия
Потребител
Потребител
Мнения: 492
Регистриран на: 22 Мар 2018, 15:06
Се отблагодари: 37 пъти
Получена благодарност: 43 пъти

Не ми дава да компилирам

Мнение от atmax » 05 Апр 2021, 13:51

Най-добре би било да update-неш версията на AmxModX на 1.10
Казаха ти какво да направиш.
Rest in peace my friend I always will remember you! 🖤👊

Аватар
impossible
Извън линия
Потребител
Потребител
Мнения: 488
Регистриран на: 15 Юни 2019, 12:41
Се отблагодари: 23 пъти
Получена благодарност: 47 пъти

Не ми дава да компилирам

Мнение от impossible » 05 Апр 2021, 14:05

Да бяхте му казали и от къде може да си я ъпдеитне :д

https://www.amxmodx.org/
unknown.png
unknown.png (382.97 KiB) Преглеждано 1396 пъти
unknown.png
unknown.png (382.97 KiB) Преглеждано 1396 пъти

Публикувай отговор
  • Подобни теми
    Отговори
    Преглеждания
     Последно мнение

Обратно към “Поддръжка / Помощ”

Кой е на линия

Потребители разглеждащи този форум: 0 регистрирани и 4 госта