OciXCrom's Custom Shop + API

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

OciXCrom's Custom Shop + API

Мнение от atmax » 15 Май 2020, 17:36

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

#include <amxmodx>
#include <customshop>
#include <hamsandwich>

#define PLUGIN_VERSION "0.1a"

additem ITEM_RESPAWN
new bool:g_bRespawn[33]

public plugin_init()
{
    register_plugin("CSHOP: Respawn", PLUGIN_VERSION, "aTmAx")
    register_event("HLTV", "LogEvent_RoundStart", "a", "1=0", "2=0")
}

public plugin_precache()
    ITEM_RESPAWN = cshop_register_item("respawn", "Respawn", 12000, 1)

public cshopItemBought(id, iItem)
{
	if(iItem == ITEM_RESPAWN)
		g_bRespawn[id] = true
	if(!is_user_alive(id))
	{
		ExecuteHamB(Ham_CS_RoundRespawn, id)
	}
	else
	{
		client_print(id, print_chat, "This item is availible only for dead players!")
		return PLUGIN_HANDLED
	}
	return PLUGIN_HANDLED
}
    
public cshopItemRemoved(id, iItem)
{
    if(iItem == ITEM_RESPAWN)
        g_bRespawn[id] = false
}
You did your best, now only if we could somehow change the custom shop so that live and dead players can use it would be great or OciXCrom if you can help for that please?
Only OcixCrom can do this but im not sure if he is going to do it
Rest in peace my friend I always will remember you! 🖤👊

Аватар
OciXCrom
Извън линия
Администратор
Администратор
Мнения: 7206
Регистриран на: 06 Окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 117 пъти
Получена благодарност: 1295 пъти
Обратна връзка:

OciXCrom's Custom Shop + API

Мнение от OciXCrom » 15 Май 2020, 20:51

Changing that is easy, just a few lines in the code need to removed, but this will create additional problems because the other items aren't designed to handle the situation.

Аватар
Vuckoooo
Извън линия
Foreigner
Foreigner
Мнения: 12
Регистриран на: 15 Май 2020, 05:45
Се отблагодари: 2 пъти

OciXCrom's Custom Shop + API

Мнение от Vuckoooo » 16 Май 2020, 03:59

So could that somehow be sorted out for me?

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

OciXCrom's Custom Shop + API

Мнение от atmax » 16 Май 2020, 09:21

Maybe if you restrict that command for alive players with another plugin..
Eddit:

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

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "@amxx-bg.info/forum ShopRestriction"
#define VERSION "0.1a"
#define AUTHOR "aTmAx"

public plugin_init() 
{
	register_clcmd("say /shop", "alive_blocked")
}

public alive_blocked(id)
{
	new szName[32]
	get_user_name(id, szName, charsmax(szName))
	if(is_user_alive(id))
	{
		client_print(id, print_chat, "%s you can not use this command while you are alive!", szName)
		return PLUGIN_HANDLED
	}
	return PLUGIN_HANDLED;
} 
Restricted command is: /shop, you can change it from this line: register_clcmd("say /shop", "alive_blocked")
Rest in peace my friend I always will remember you! 🖤👊

Аватар
OciXCrom
Извън линия
Администратор
Администратор
Мнения: 7206
Регистриран на: 06 Окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 117 пъти
Получена благодарност: 1295 пъти
Обратна връзка:

OciXCrom's Custom Shop + API

Мнение от OciXCrom » 16 Май 2020, 14:19

What kind of a solution is that? It will block all other items.
Individual items need to be blocked when alive, not the entire shop.

Аватар
Vuckoooo
Извън линия
Foreigner
Foreigner
Мнения: 12
Регистриран на: 15 Май 2020, 05:45
Се отблагодари: 2 пъти

OciXCrom's Custom Shop + API

Мнение от Vuckoooo » 18 Май 2020, 02:14

It's all okay, but it doesn't work, it doesn't work for the dead. It doesn't work at all, it just puts you in spec and that's it, but I wanted to respawn to CT if you are dead.. And it is all.. If you can guys help me please

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

OciXCrom's Custom Shop + API

Мнение от atmax » 18 Май 2020, 09:49

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

#include <amxmodx>
#include <customshop>
#include <hamsandwich>

#define PLUGIN_VERSION "0.1a"

additem ITEM_RESPAWN
new bool:g_bRespawn[33]

public plugin_init()
{
    register_plugin("CSHOP: Respawn", PLUGIN_VERSION, "aTmAx")
    register_event("HLTV", "LogEvent_RoundStart", "a", "1=0", "2=0")
}

public plugin_precache()
    ITEM_RESPAWN = cshop_register_item("respawn", "Respawn", 12000, 1)

public cshopItemBought(id, iItem)
{
	if(iItem == ITEM_RESPAWN)
		g_bRespawn[id] = true
	if(is_user_alive(id))
	{
		client_print(id, print_chat, "This item is availible only for dead players!")
		return PLUGIN_HANDLED
	}
	else
	{
		ExecuteHamB(Ham_Spawn, id)
	}
	return PLUGIN_HANDLED
}
    
public cshopItemRemoved(id, iItem)
{
    if(iItem == ITEM_RESPAWN)
        g_bRespawn[id] = false
}
This respawn should work!
Rest in peace my friend I always will remember you! 🖤👊

Аватар
Vuckoooo
Извън линия
Foreigner
Foreigner
Мнения: 12
Регистриран на: 15 Май 2020, 05:45
Се отблагодари: 2 пъти

OciXCrom's Custom Shop + API

Мнение от Vuckoooo » 18 Май 2020, 12:10

I have problem and server send me msg "[CustomShop] Dead clients can't use the Shop".
I understand that you made a nice plugin, but how does it work for me. What do I need to do to make it work for me?

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

OciXCrom's Custom Shop + API

Мнение от atmax » 18 Май 2020, 12:25

Don't use this plugin @amxx-bg.info/forum ShopRestriction
Ocixcrom already told you everything..
Individual items need to be blocked when alive, not the entire shop.
I already blocked respawn and switch team for alive players..
Rest in peace my friend I always will remember you! 🖤👊

Аватар
Vuckoooo
Извън линия
Foreigner
Foreigner
Мнения: 12
Регистриран на: 15 Май 2020, 05:45
Се отблагодари: 2 пъти

OciXCrom's Custom Shop + API

Мнение от Vuckoooo » 18 Май 2020, 12:40

Okay then which plugin should I use to make it work for me?

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

Обратно към “Одобрени плъгини”

Кой е на линия

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