- Ошибка
-
Добавляет не верное количество денег и не вычитает деньги у того кто их отдал
- ОС
- Windows
- Amx Mod X
-
AMX Mod X 1.9.0.5235 (http://www.amxmodx.org)
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Dec 18 2018 01:20:16
Built from: https://github.com/alliedmodders/amxmodx/commit/6c53524d
Build ID: 5235:6c53524d
Core mode: JIT+ASM32
- Билд
-
Protocol version 48
Exe version 1.1.2.7 (cstrike)
ReHLDS version: 3.4.0.668-dev
Build date: 09:47:42 Sep 29 2018 (1631)
Build from: https://github.com/dreamstalker/rehlds/commit/89be216
- ReGamedll
-
ReGameDLL version: 5.7.0.319-dev
Build date: 10:52:38 Dec 23 2018
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/9d89a34
- Версия Metamod
-
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 15:47:38 Aug 24 2018
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/0cf2f70
- Список метамодулей
-
Currently loaded plugins:
description stat pend file vers src load unload
[ 1] AMX Mod X RUN - amxmodx_mm.dll v1.9.0.5235 ini Start ANY
[ 2] SQLite RUN - sqlite_amxx.dll v1.9.0.5235 pl1 ANY ANY
[ 3] Ham Sandwich RUN - hamsandwich_amxx.dll v1.9.0.5235 pl1 ANY ANY
[ 4] CSX RUN - csx_amxx.dll v1.9.0.5235 pl1 ANY ANY
[ 5] ReAPI RUN - reapi_amxx.dll v5.8.0.165-dev pl1 ANY Never
[ 6] Engine RUN - engine_amxx.dll v1.9.0.5235 pl1 ANY ANY
6 plugins, 6 running
- Список плагинов
-
Currently loaded plugins:
name version author file status
[ 1] Admin Base 1.9.0.5235 AMXX Dev Team admin.amxx running
[ 2] Admin Commands 1.9.0.5235 AMXX Dev Team admincmd.amxx running
[ 3] Admin Help 1.9.0.5235 AMXX Dev Team adminhelp.amxx running
[ 4] Slots Reservation 1.9.0.5235 AMXX Dev Team adminslots.amxx running
[ 5] Multi-Lingual System 1.9.0.5235 AMXX Dev Team multilingual.am running
[ 6] Menus Front-End 1.9.0.5235 AMXX Dev Team menufront.amxx running
[ 7] Commands Menu 1.9.0.5235 AMXX Dev Team cmdmenu.amxx running
[ 8] Players Menu 1.9.0.5235 AMXX Dev Team plmenu.amxx running
[ 9] Maps Menu 1.9.0.5235 AMXX Dev Team mapsmenu.amxx running
[ 10] Plugin Menu 1.9.0.5235 AMXX Dev Team pluginmenu.amxx running
[ 11] Admin Chat 1.9.0.5235 AMXX Dev Team adminchat.amxx running
[ 12] Anti Flood 1.9.0.5235 AMXX Dev Team antiflood.amxx running
[ 13] Scrolling Message 1.9.0.5235 AMXX Dev Team scrollmsg.amxx running
[ 14] Info. Messages 1.9.0.5235 AMXX Dev Team imessage.amxx running
[ 15] Admin Votes 1.9.0.5235 AMXX Dev Team adminvote.amxx running
[ 16] NextMap 1.9.0.5235 AMXX Dev Team nextmap.amxx running
[ 17] Nextmap Chooser 1.9.0.5235 AMXX Dev Team mapchooser.amxx running
[ 18] TimeLeft 1.9.0.5235 AMXX Dev Team timeleft.amxx running
[ 19] Pause Plugins 1.9.0.5235 AMXX Dev Team pausecfg.amxx running
[ 20] Stats Configuration 1.9.0.5235 AMXX Dev Team statscfg.amxx running
[ 21] StatsX 1.9.0.5235 AMXX Dev Team statsx.amxx running
[ 22] Public Core 0.1 Skiptik CorePublic.amxx debug
[ 23] Money 1.0 Skiptik TransferMoney.a debug
[ 24] unknown unknown unknown CustomAk47.amxx debug
[ 25] unknown unknown unknown CustomM4a1.amxx debug
[ 26] unknown unknown unknown CustomAwp.amxx debug
[ 27] unknown unknown unknown CustomDeagle.am debug
[ 28] unknown unknown unknown CustomKnifeSpee debug
[ 29] unknown unknown unknown CustomKnifeGrav debug
[ 30] unknown unknown unknown CustomKnifeUltr debug
[ 31] unknown unknown unknown CustomKnifeGold debug
[ 32] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
[ 33] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 34] AES: Informer 0.5.9 [REA serfreeman1337/s aes_informer.am running
[ 35] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
[ 36] AES: Bonus System 0.5.9 Vega serfreeman1337/s aes_bonus_syste running
[ 37] AES: Bonus CSTRIKE 0.5.9 [REA serfreeman1337/s aes_bonus_cstri running
37 plugins, 37 running
- Автор плагина
- -
- Версия плагина
- -
- Исходный код
-
#include <amxmodx>
#include <reapi>
#define PLUGIN "Money"
public plugin_init()
{
register_plugin(PLUGIN, "1.0", "")
register_clcmd("say /donate", "transfer_menu")
register_clcmd("transfer", "transfer_money")
}
public transfer_menu(id)
{
new Players[32]
new Count, i, Player
get_players(Players, Count, "ch")
if (Count <= 1)
{
client_print_color(id, print_team_default, "^1[^4Сервер^1] Кому ты хочешь передать деньги? - Нет игроков")
return PLUGIN_HANDLED
}
new Name[32], Info[10], szMenu[512]
formatex(szMenu, charsmax(szMenu), "\yПодарить деньги^n\dВаши деньги: \r$%d", get_member(id, m_iAccount));
new iMenu = menu_create(szMenu, "Handle_PlayersMenu")
for(i = 0; i < Count; i++)
{
Player = Players[i]
if(Player == id){
continue
}
get_user_name(Player, Name, charsmax(Name))
num_to_str(Player, Info, charsmax(Info))
formatex(szMenu, charsmax(szMenu), "%s", Name)
menu_additem(iMenu, szMenu, Info, 0)
}
menu_setprop(iMenu, MPROP_BACKNAME, "Назад")
menu_setprop(iMenu, MPROP_NEXTNAME, "Дальше")
menu_setprop(iMenu, MPROP_EXITNAME, "Закрыть")
menu_display(id, iMenu, 0)
return PLUGIN_CONTINUE
}
public Handle_PlayersMenu(id, iMenu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(iMenu)
return PLUGIN_HANDLED
}
new sData[6], sName[64], iAccess, iCallback
menu_item_getinfo(iMenu, item, iAccess, sData, charsmax(sData), sName, charsmax(sName), iCallback)
new Player = str_to_num(sData)
client_cmd(id, "messagemode ^"transfer %i^"", Player)
return PLUGIN_CONTINUE
}
public transfer_money(id)
{
new param[6], Names[2][32]
read_argv(2, param, charsmax(param))
for (new x; x < strlen(param); x++)
{
if(!isdigit(param[x]))
{
client_print_color(id, print_team_default, "^1[^4Сервер^1] Вы должны ввести число!")
transfer_menu(id)
return PLUGIN_HANDLED
}
}
new amount = str_to_num(param)
new money = get_member(id, m_iAccount)
if (money < amount)
{
client_print_color(id, print_team_default, "^1[^4Сервер^1] У вас нет столько денег!")
transfer_menu(id)
return PLUGIN_HANDLED
}
read_argv(1, param, charsmax(param))
new player = str_to_num(param)
new player_money = get_member(player, m_iAccount)
if( amount < 100 )
{
client_print_color(id, print_team_default, "^1[^4Сервер^1] Минимальная сумма перевода - ^3$100")
transfer_menu(id)
return PLUGIN_HANDLED
}
rg_add_account(id, money - amount, AS_SET)
rg_add_account(player, player_money + amount, AS_SET)
get_user_name(id, Names[0], charsmax(Names))
get_user_name(player, Names[1], charsmax(Names))
client_print_color(id, print_team_default,"^1[^4Сервер^1] Игрок ^3%s ^1подарил ^4$%i^1 игроку ^3%s", Names[0], amount, Names[1])
return PLUGIN_HANDLED
}
Не корректно работает перевод денег игроку
В этой теме было размещено решение! Перейти к решению.