Плъгин който като напишеш команда да дава 250000 хп
-
tom1k
Извън линия - Потребител
- Мнения: 202
- Регистриран на: 29 Сеп 2020, 23:50
- Местоположение: Добрич
- Се отблагодари: 16 пъти
- Получена благодарност: 8 пъти
Плъгин който като напишеш команда да дава 250000 хп
Трябва ми плъгин който като напишеш в чата /freexp и да ти дава 250 000 хп, и ако може да има някакво цветно съобщение и вече аз да си го променя.
Ползвам плъгина за xp на Exolent : https://forums.alliedmods.net/showthread.php?p=997635
Ползвам плъгина за xp на Exolent : https://forums.alliedmods.net/showthread.php?p=997635
iG-Blockmaker # HNS 100aa
45.144.155.175:27018
45.144.155.175:27018
-
illusion
Извън линия - Developer
- Мнения: 1809
- Регистриран на: 27 Ное 2016, 17:47
- Местоположение: CraftVision
- Се отблагодари: 151 пъти
- Получена благодарност: 370 пъти
- Обратна връзка:
Плъгин който като напишеш команда да дава 250000 хп
Код за потвърждение: Избери целия код
#include <amxmodx>
#include <cromchat>
#define PLUGIN "Give XP - Command"
#define VERSION "1.0"
#define AUTHOR "AMXXBG Team - Invius"
#define XPAMOUNT 250000
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /freexp", "cmdfreexp")
register_clcmd("say_team /freexp", "cmdfreexp")
CC_SetPrefix("&x01[&x04Free&x03XP&x01]")
}
public cmdfreexp(id) {
hnsxp_add_user_xp(id, XPAMOUNT)
CC_SendMessage(id, "Uspeshno vzehte bezplatno &x03%i &x04XP&x01.", XPAMOUNT)
}
/*
* Returns a players XP points
*
* @param client - The player index to get points of
*
* @return The XP points of client
*
*/
native hnsxp_get_user_xp(client);
/*
* Sets <xp> points to client
*
* @param client - The player index to set points to
* @param xp - The amount of XP points to set to client
*
* @return The XP points of client
*
*/
native hnsxp_set_user_xp(client, xp);
/*
* Adds <xp> points to client
*
* @param client - The player index to add points to
* @param xp - The amount of XP points to add to client
*
* @return The XP points of client
*
*/
stock hnsxp_add_user_xp(client, xp)
{
return hnsxp_set_user_xp(client, hnsxp_get_user_xp(client) + xp);
}
/*
* Subtracts <xp> points from client
*
* @param client - The player index to subtract points from
* @param xp - The amount of XP points to subtract from client
*
* @return The XP points of client
*
*/
stock hnsxp_sub_user_xp(client, xp)
{
return hnsxp_set_user_xp(client, hnsxp_get_user_xp(client) - xp);
}
-
tom1k
Извън линия - Потребител
- Мнения: 202
- Регистриран на: 29 Сеп 2020, 23:50
- Местоположение: Добрич
- Се отблагодари: 16 пъти
- Получена благодарност: 8 пъти
Плъгин който като напишеш команда да дава 250000 хп
Invius написа: ↑23 Апр 2021, 23:03Тествай, нямам идея дали ще работи.Код за потвърждение: Избери целия код
#include <amxmodx> #include <cromchat> #define PLUGIN "Give XP - Command" #define VERSION "1.0" #define AUTHOR "AMXXBG Team - Invius" #define XPAMOUNT 250000 public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say /freexp", "cmdfreexp") register_clcmd("say_team /freexp", "cmdfreexp") CC_SetPrefix("&x01[&x04Free&x03XP&x01]") } public cmdfreexp(id) { hnsxp_add_user_xp(id, XPAMOUNT) CC_SendMessage(id, "Uspeshno vzehte bezplatno &x03%i &x04XP&x01.", XPAMOUNT) } /* * Returns a players XP points * * @param client - The player index to get points of * * @return The XP points of client * */ native hnsxp_get_user_xp(client); /* * Sets <xp> points to client * * @param client - The player index to set points to * @param xp - The amount of XP points to set to client * * @return The XP points of client * */ native hnsxp_set_user_xp(client, xp); /* * Adds <xp> points to client * * @param client - The player index to add points to * @param xp - The amount of XP points to add to client * * @return The XP points of client * */ stock hnsxp_add_user_xp(client, xp) { return hnsxp_set_user_xp(client, hnsxp_get_user_xp(client) + xp); } /* * Subtracts <xp> points from client * * @param client - The player index to subtract points from * @param xp - The amount of XP points to subtract from client * * @return The XP points of client * */ stock hnsxp_sub_user_xp(client, xp) { return hnsxp_set_user_xp(client, hnsxp_get_user_xp(client) - xp); }
Извинявай, забравих да спомена по нагоре, ако може да има проверка и само по 1път на ник, смисъл такъв да не се спами и да бъгне нещо. Само на 1 ник 250 000, вече ако искат да си сменят никовете и пак 250 000.И ако може пак да има съобщение че не може повече от 1 път на един ник.
Работи си
Последно промяна от tom1k на 23 Апр 2021, 23:12, променено общо 3 пъти.
iG-Blockmaker # HNS 100aa
45.144.155.175:27018
45.144.155.175:27018
-
illusion
Извън линия - Developer
- Мнения: 1809
- Регистриран на: 27 Ное 2016, 17:47
- Местоположение: CraftVision
- Се отблагодари: 151 пъти
- Получена благодарност: 370 пъти
- Обратна връзка:
Плъгин който като напишеш команда да дава 250000 хп
Пробвай плъгина дали ще работи само, да знам дали да добавям каквито и да са проверки.
-
tom1k
Извън линия - Потребител
- Мнения: 202
- Регистриран на: 29 Сеп 2020, 23:50
- Местоположение: Добрич
- Се отблагодари: 16 пъти
- Получена благодарност: 8 пъти
Плъгин който като напишеш команда да дава 250000 хп
Работи!
iG-Blockmaker # HNS 100aa
45.144.155.175:27018
45.144.155.175:27018
-
illusion
Извън линия - Developer
- Мнения: 1809
- Регистриран на: 27 Ное 2016, 17:47
- Местоположение: CraftVision
- Се отблагодари: 151 пъти
- Получена благодарност: 370 пъти
- Обратна връзка:
Плъгин който като напишеш команда да дава 250000 хп
Код за потвърждение: Избери целия код
#include <amxmodx>
#include <cromchat>
#include <fvault>
#define PLUGIN "Give XP - Command"
#define VERSION "1.0"
#define AUTHOR "AMXXBG Team - Invius/Huehue"
new const g_szVault[] = "FreeXp_VaultNames"
new bool:g_bUsedCommand[MAX_PLAYERS + 1], g_szUserName[MAX_PLAYERS + 1][MAX_NAME_LENGTH]
new g_pCvarXPAmount
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /freexp", "cmdfreexp")
register_clcmd("say_team /freexp", "cmdfreexp")
register_clcmd("say /clearfreexp", "cmd_clear_freexp")
register_clcmd("say_team /clearfreexp", "cmd_clear_freexp")
g_pCvarXPAmount = register_cvar("hnsxp_free_xp", "250000")
CC_SetPrefix("&x01[&x04Free&x03XP&x01]")
}
public cmdfreexp(id)
{
if (g_bUsedCommand[id])
{
CC_SendMessage(id, "Vie veche ste vzeli bezplatno XP")
}
else
{
g_bUsedCommand[id] = true
hnsxp_add_user_xp(id, get_pcvar_num(g_pCvarXPAmount))
CC_SendMessage(id, "Uspeshno vzehte bezplatno &x03%i &x04XP&x01.", get_pcvar_num(g_pCvarXPAmount))
}
return PLUGIN_HANDLED
}
public cmd_clear_freexp(id)
{
if (get_user_flags(id) & ADMIN_RCON)
{
fvault_clear(g_szVault)
CC_SendMessage(id, "Uspeshno izchisti cqlata informaciq za free xp.")
static iPlayers[MAX_PLAYERS], iNum, iPlayerId
get_players(iPlayers, iNum, "c")
for (--iNum; iNum >= 0; iNum--)
{
iPlayerId = iPlayers[iNum]
get_user_name(iPlayerId, g_szUserName[iPlayerId], charsmax(g_szUserName[]))
Load_Data(g_szUserName[iPlayerId], iPlayerId)
}
}
return PLUGIN_HANDLED
}
public client_putinserver(id)
{
get_user_name(id, g_szUserName[id], charsmax(g_szUserName[]))
set_task(0.1, "Load_Data", id, g_szUserName[id], sizeof(g_szUserName[]))
}
public client_disconnected(id)
{
Save_Data(id, g_szUserName[id])
}
public client_infochanged(id)
{
if (!is_user_connected(id))
return PLUGIN_HANDLED
static szNames[2][MAX_NAME_LENGTH]
get_user_name(id, szNames[0], charsmax(szNames[]))
get_user_info(id, "name", szNames[1], charsmax(szNames[]))
if (!equali(szNames[1], szNames[0]))
{
Save_Data(id, szNames[0])
set_task(0.1, "Load_Data", id, szNames[1], sizeof(szNames[]))
g_szUserName[id] = szNames[1]
return PLUGIN_HANDLED
}
return PLUGIN_HANDLED
}
public Load_Data(szName[], id)
{
if(!is_user_connected(id))
return
new szData[64]
if(fvault_get_data(g_szVault, szName, szData, charsmax(szData)))
{
g_bUsedCommand[id] = true
}
else
{
g_bUsedCommand[id] = false
}
}
public Save_Data(id, szName[])
{
new szData[64]
formatex(szData, charsmax(szData), "Free XP e vzet")
fvault_set_data(g_szVault, szName, szData)
}
/*
* Returns a players XP points
*
* @param client - The player index to get points of
*
* @return The XP points of client
*
*/
native hnsxp_get_user_xp(client);
/*
* Sets <xp> points to client
*
* @param client - The player index to set points to
* @param xp - The amount of XP points to set to client
*
* @return The XP points of client
*
*/
native hnsxp_set_user_xp(client, xp);
/*
* Adds <xp> points to client
*
* @param client - The player index to add points to
* @param xp - The amount of XP points to add to client
*
* @return The XP points of client
*
*/
stock hnsxp_add_user_xp(client, xp)
{
return hnsxp_set_user_xp(client, hnsxp_get_user_xp(client) + xp);
}
/*
* Subtracts <xp> points from client
*
* @param client - The player index to subtract points from
* @param xp - The amount of XP points to subtract from client
*
* @return The XP points of client
*
*/
stock hnsxp_sub_user_xp(client, xp)
{
return hnsxp_set_user_xp(client, hnsxp_get_user_xp(client) - xp);
}
-
tom1k
Извън линия - Потребител
- Мнения: 202
- Регистриран на: 29 Сеп 2020, 23:50
- Местоположение: Добрич
- Се отблагодари: 16 пъти
- Получена благодарност: 8 пъти
Плъгин който като напишеш команда да дава 250000 хп
Invius написа: ↑25 Апр 2021, 15:52Добавени са някои нови неща, може да погледнеш. Благодарности на HuehueКод за потвърждение: Избери целия код
#include <amxmodx> #include <cromchat> #include <fvault> #define PLUGIN "Give XP - Command" #define VERSION "1.0" #define AUTHOR "AMXXBG Team - Invius/Huehue" new const g_szVault[] = "FreeXp_VaultNames" new bool:g_bUsedCommand[MAX_PLAYERS + 1], g_szUserName[MAX_PLAYERS + 1][MAX_NAME_LENGTH] new g_pCvarXPAmount public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say /freexp", "cmdfreexp") register_clcmd("say_team /freexp", "cmdfreexp") register_clcmd("say /clearfreexp", "cmd_clear_freexp") register_clcmd("say_team /clearfreexp", "cmd_clear_freexp") g_pCvarXPAmount = register_cvar("hnsxp_free_xp", "250000") CC_SetPrefix("&x01[&x04Free&x03XP&x01]") } public cmdfreexp(id) { if (g_bUsedCommand[id]) { CC_SendMessage(id, "Vie veche ste vzeli bezplatno XP") } else { g_bUsedCommand[id] = true hnsxp_add_user_xp(id, get_pcvar_num(g_pCvarXPAmount)) CC_SendMessage(id, "Uspeshno vzehte bezplatno &x03%i &x04XP&x01.", get_pcvar_num(g_pCvarXPAmount)) } return PLUGIN_HANDLED } public cmd_clear_freexp(id) { if (get_user_flags(id) & ADMIN_RCON) { fvault_clear(g_szVault) CC_SendMessage(id, "Uspeshno izchisti cqlata informaciq za free xp.") static iPlayers[MAX_PLAYERS], iNum, iPlayerId get_players(iPlayers, iNum, "c") for (--iNum; iNum >= 0; iNum--) { iPlayerId = iPlayers[iNum] get_user_name(iPlayerId, g_szUserName[iPlayerId], charsmax(g_szUserName[])) Load_Data(g_szUserName[iPlayerId], iPlayerId) } } return PLUGIN_HANDLED } public client_putinserver(id) { get_user_name(id, g_szUserName[id], charsmax(g_szUserName[])) set_task(0.1, "Load_Data", id, g_szUserName[id], sizeof(g_szUserName[])) } public client_disconnected(id) { Save_Data(id, g_szUserName[id]) } public client_infochanged(id) { if (!is_user_connected(id)) return PLUGIN_HANDLED static szNames[2][MAX_NAME_LENGTH] get_user_name(id, szNames[0], charsmax(szNames[])) get_user_info(id, "name", szNames[1], charsmax(szNames[])) if (!equali(szNames[1], szNames[0])) { Save_Data(id, szNames[0]) set_task(0.1, "Load_Data", id, szNames[1], sizeof(szNames[])) g_szUserName[id] = szNames[1] return PLUGIN_HANDLED } return PLUGIN_HANDLED } public Load_Data(szName[], id) { if(!is_user_connected(id)) return new szData[64] if(fvault_get_data(g_szVault, szName, szData, charsmax(szData))) { g_bUsedCommand[id] = true } else { g_bUsedCommand[id] = false } } public Save_Data(id, szName[]) { new szData[64] formatex(szData, charsmax(szData), "Free XP e vzet") fvault_set_data(g_szVault, szName, szData) } /* * Returns a players XP points * * @param client - The player index to get points of * * @return The XP points of client * */ native hnsxp_get_user_xp(client); /* * Sets <xp> points to client * * @param client - The player index to set points to * @param xp - The amount of XP points to set to client * * @return The XP points of client * */ native hnsxp_set_user_xp(client, xp); /* * Adds <xp> points to client * * @param client - The player index to add points to * @param xp - The amount of XP points to add to client * * @return The XP points of client * */ stock hnsxp_add_user_xp(client, xp) { return hnsxp_set_user_xp(client, hnsxp_get_user_xp(client) + xp); } /* * Subtracts <xp> points from client * * @param client - The player index to subtract points from * @param xp - The amount of XP points to subtract from client * * @return The XP points of client * */ stock hnsxp_sub_user_xp(client, xp) { return hnsxp_set_user_xp(client, hnsxp_get_user_xp(client) - xp); }
iG-Blockmaker # HNS 100aa
45.144.155.175:27018
45.144.155.175:27018
-
zolfeca
Извън линия - Администратор
- Мнения: 417
- Регистриран на: 10 Окт 2016, 23:48
- Се отблагодари: 24 пъти
- Получена благодарност: 92 пъти
Плъгин който като напишеш команда да дава 250000 хп
Добави
Код за потвърждение: Избери целия код
#if !defined MAX_PLAYERS
const MAX_PLAYERS = 32
#endif
-
Huehue
Извън линия - Модератор
- Мнения: 352
- Регистриран на: 16 Яну 2017, 23:42
- Местоположение: София
- Се отблагодари: 7 пъти
- Получена благодарност: 171 пъти
- Обратна връзка:
Плъгин който като напишеш команда да дава 250000 хп
Силно препоръчвам да преминете на по нова версия на AMXX.
Код за потвърждение: Избери целия код
#include <amxmodx>
#include <cromchat>
#include <fvault>
#define PLUGIN "Give XP - Command"
#define VERSION "1.0"
#define AUTHOR "AMXXBG Team - Invius"
#if !defined MAX_PLAYERS
#define MAX_PLAYERS 32
#endif
#if !defined MAX_NAME_LENGTH
#define MAX_NAME_LENGTH 32
#endif
new const g_szVault[] = "FreeXp_VaultNames"
new bool:g_bUsedCommand[MAX_PLAYERS + 1], g_szUserName[MAX_PLAYERS + 1][MAX_NAME_LENGTH]
new g_pCvarXPAmount
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /freexp", "cmdfreexp")
register_clcmd("say_team /freexp", "cmdfreexp")
register_clcmd("say /clearfreexp", "cmd_clear_freexp")
register_clcmd("say_team /clearfreexp", "cmd_clear_freexp")
g_pCvarXPAmount = register_cvar("hnsxp_free_xp", "250000")
CC_SetPrefix("&x01[&x04Free&x03XP&x01]")
}
public cmdfreexp(id)
{
if (g_bUsedCommand[id])
{
CC_SendMessage(id, "Vie veche ste vzeli bezplatno XP")
}
else
{
g_bUsedCommand[id] = true
hnsxp_add_user_xp(id, get_pcvar_num(g_pCvarXPAmount))
CC_SendMessage(id, "Uspeshno vzehte bezplatno &x03%i &x04XP&x01.", get_pcvar_num(g_pCvarXPAmount))
}
return PLUGIN_HANDLED
}
public cmd_clear_freexp(id)
{
if (get_user_flags(id) & ADMIN_RCON)
{
fvault_clear(g_szVault)
CC_SendMessage(id, "Uspeshno izchisti cqlata informaciq za free xp.")
static iPlayers[MAX_PLAYERS], iNum, iPlayerId
get_players(iPlayers, iNum, "c")
for (--iNum; iNum >= 0; iNum--)
{
iPlayerId = iPlayers[iNum]
get_user_name(iPlayerId, g_szUserName[iPlayerId], charsmax(g_szUserName[]))
Load_Data(g_szUserName[iPlayerId], iPlayerId)
}
}
return PLUGIN_HANDLED
}
public client_putinserver(id)
{
get_user_name(id, g_szUserName[id], charsmax(g_szUserName[]))
set_task(0.1, "Load_Data", id, g_szUserName[id], sizeof(g_szUserName[]))
}
public client_disconnected(id)
{
Save_Data(id, g_szUserName[id])
}
public client_infochanged(id)
{
if (!is_user_connected(id))
return PLUGIN_HANDLED
static szNames[2][MAX_NAME_LENGTH]
get_user_name(id, szNames[0], charsmax(szNames[]))
get_user_info(id, "name", szNames[1], charsmax(szNames[]))
if (!equali(szNames[1], szNames[0]))
{
Save_Data(id, szNames[0])
set_task(0.1, "Load_Data", id, szNames[1], sizeof(szNames[]))
g_szUserName[id] = szNames[1]
return PLUGIN_HANDLED
}
return PLUGIN_HANDLED
}
public Load_Data(szName[], id)
{
if(!is_user_connected(id))
return
new szData[64]
if(fvault_get_data(g_szVault, szName, szData, charsmax(szData)))
{
g_bUsedCommand[id] = true
}
else
{
g_bUsedCommand[id] = false
}
}
public Save_Data(id, szName[])
{
new szData[64]
formatex(szData, charsmax(szData), "Free XP e vzet")
fvault_set_data(g_szVault, szName, szData)
}
/*
* Returns a players XP points
*
* @param client - The player index to get points of
*
* @return The XP points of client
*
*/
native hnsxp_get_user_xp(client);
/*
* Sets <xp> points to client
*
* @param client - The player index to set points to
* @param xp - The amount of XP points to set to client
*
* @return The XP points of client
*
*/
native hnsxp_set_user_xp(client, xp);
/*
* Adds <xp> points to client
*
* @param client - The player index to add points to
* @param xp - The amount of XP points to add to client
*
* @return The XP points of client
*
*/
stock hnsxp_add_user_xp(client, xp)
{
return hnsxp_set_user_xp(client, hnsxp_get_user_xp(client) + xp);
}
/*
* Subtracts <xp> points from client
*
* @param client - The player index to subtract points from
* @param xp - The amount of XP points to subtract from client
*
* @return The XP points of client
*
*/
stock hnsxp_sub_user_xp(client, xp)
{
return hnsxp_set_user_xp(client, hnsxp_get_user_xp(client) - xp);
}
LOYAL TO THE OATH OF OMERTА̀
Зад монитора мъжкари, това не го разбирам..
На живо сте мишкари, това го гарантирам!
Седиш на 30 метра от мен като препариран!
Ако има нещо брат, номерът ми е блокиран..
My GitHub Profile
GitHub
My AMXX Includes Collection
AMXX Include Libraries
My Steam Profile (from SteamDB)
Зад монитора мъжкари, това не го разбирам..
На живо сте мишкари, това го гарантирам!
Седиш на 30 метра от мен като препариран!
Ако има нещо брат, номерът ми е блокиран..
My GitHub Profile
GitHub
My AMXX Includes Collection
AMXX Include Libraries
My Steam Profile (from SteamDB)
- Value: 4179€
- Games owned: 1855
- Games played: 754 (40%)
- Hours on record: 4,994.9h
-
tom1k
Извън линия - Потребител
- Мнения: 202
- Регистриран на: 29 Сеп 2020, 23:50
- Местоположение: Добрич
- Се отблагодари: 16 пъти
- Получена благодарност: 8 пъти
Плъгин който като напишеш команда да дава 250000 хп
Работи идеално, благодаря ви! Може да локвате
iG-Blockmaker # HNS 100aa
45.144.155.175:27018
45.144.155.175:27018
-
- Подобни теми
- Отговори
- Преглеждания
- Последно мнение
-
- 2 Отговори
- 1420 Преглеждания
-
Последно мнение от impossible
-
- 2 Отговори
- 1785 Преглеждания
-
Последно мнение от impossible
-
- 4 Отговори
- 2019 Преглеждания
-
Последно мнение от impossible
-
- 2 Отговори
- 1500 Преглеждания
-
Последно мнение от devilchy
-
- 0 Отговори
- 1234 Преглеждания
-
Последно мнение от tom1k
-
- 4 Отговори
- 1870 Преглеждания
-
Последно мнение от tom1k
-
- 4 Отговори
- 2100 Преглеждания
-
Последно мнение от OciXCrom
Кой е на линия
Потребители разглеждащи този форум: 0 регистрирани и 22 госта