maloi22

Участник
Сообщения
58
Реакции
25
как поставить реальный от счет времени в шопе?
 

SHAREN

Servers-Info.Ru
Сообщения
232
Реакции
32
Как получить Имя предмета по item_id ?

P.S. @R1KO, выложи shop core на GitHub пожалуйста, там удобнее смотреть код.
 
Последнее редактирование:

R1KO

fuck society
Сообщения
9,457
Реакции
7,786
  • Команда форума
  • #86
Как получить Имя предмета по item_id ?
PHP:
/**
*    Gets the item unique name by its id
*    -
*    @param item_id                Item id to get for
*    @param buffer                Buffer to store the unique name
*    @param maxlength            Max length of the buffer
*    -
*    @return Number of bytes written
*/
native Shop_GetItemById(ItemId:item_id, String:buffer[], maxlength);

P.S. @R1KO, выложи shop core на GitHub пожалуйста, там удобнее смотреть код.
он уже давно там GitHub - R1KO/Shop-Core
 

SHAREN

Servers-Info.Ru
Сообщения
232
Реакции
32
@R1KO,
PHP:
/**
*    Gets the item unique name by its id
*    -
*    @param item_id                Item id to get for
*    @param buffer                Buffer to store the unique name
*    @param maxlength            Max length of the buffer
*    -
*    @return Number of bytes written
*/
native Shop_GetItemById(ItemId:item_id, String:buffer[], maxlength);


он уже давно там GitHub - R1KO/Shop-Core
Не увидел GitHub.

Shop_GetItemById работает, спасибо, но оно дает имя из БД ( "kleiner" ), а мне надо чтобы показывало имя которое в config прописано ("Очки Клейнера").
PHP:
"kleiner"
        {
            "name"    "Очки Клейнера"
            "model"                "models/gmod_tower/klienerglasses.mdl"
            "attachment"        "facemask"
        }
А нету функции чтобы взять значение из "name" ?
 

R1KO

fuck society
Сообщения
9,457
Реакции
7,786
  • Команда форума
  • #88
@SHAREN, как раз это я и добавлял в этой версии:
PHP:
/**
*    Получает имя предмета
*    -
*    @param item_id                Item id to get for
*    @param buffer                Buffer to store the unique name
*    @param maxlength            Max length of the buffer
*    -
*    @return Number of bytes written
*/
native Shop_GetItemNameById(ItemId:item_id, String:buffer[], maxlength);
 

DrizziT

Участник
Сообщения
17
Реакции
0
Как сделать чтобы за убийство забирались/выдавались кредиты ? Это отдельный модуль или как то настроить нужно? Подскажите пожалуйста.
 

pro100it

Участник
Сообщения
48
Реакции
1
Ребят спросить хотел у меня SM версия 1.8.0 5950, можно поставить этот плагин, работать будет? и еще такой вопрос, риск получить бан токена используя этот плагин и дополнения к нему есть?
 

T1MOXA

Участник
Сообщения
567
Реакции
83
Ребят, у меня при компиляции возникают ошибки...
Как из можно исправить?
PHP:
//// shop.sp
//
// shop/db.sp(523) : warning 237: coercing functions to and from primitives is unsupported and will be removed in the future
// shop/db.sp(540) : warning 237: coercing functions to and from primitives is unsupported and will be removed in the future
// shop/db.sp(566) : warning 237: coercing functions to and from primitives is unsupported and will be removed in the future
// shop/item_manager.sp(212) : error 154: cannot assign INVALID_FUNCTION to a non-function type
// shop/item_manager.sp(438) : error 154: cannot assign INVALID_FUNCTION to a non-function type
// shop/item_manager.sp(450) : error 154: cannot assign INVALID_FUNCTION to a non-function type
// shop/item_manager.sp(466) : error 154: cannot assign INVALID_FUNCTION to a non-function type
// shop/item_manager.sp(494) : warning 237: coercing functions to and from primitives is unsupported and will be removed in the future
// shop/item_manager.sp(499) : error 173: 'try' is a newly reserved keyword that may be used in the future; use a different name as an identifier
// shop/item_manager.sp(501) : error 173: 'try' is a newly reserved keyword that may be used in the future; use a different name as an identifier
// shop/item_manager.sp(523) : error 173: 'try' is a newly reserved keyword that may be used in the future; use a different name as an identifier
// shop/item_manager.sp(535) : warning 237: coercing functions to and from primitives is unsupported and will be removed in the future
// shop/item_manager.sp(1095) : warning 234: symbol "IsValidHandle" is marked as deprecated: Do not use this function.
//
//
// shop/item_manager.sp(1137) : error 154: cannot assign INVALID_FUNCTION to a non-function type
// shop/item_manager.sp(1137) : warning 237: coercing functions to and from primitives is unsupported and will be removed in the future
// shop/item_manager.sp(1213) : error 154: cannot assign INVALID_FUNCTION to a non-function type
// shop/item_manager.sp(1218) : error 154: cannot assign INVALID_FUNCTION to a non-function type
// shop/item_manager.sp(1230) : error 154: cannot assign INVALID_FUNCTION to a non-function type
// shop/item_manager.sp(1235) : error 154: cannot assign INVALID_FUNCTION to a non-function type
// shop/item_manager.sp(1288) : error 154: cannot assign INVALID_FUNCTION to a non-function type
// shop/item_manager.sp(1293) : error 154: cannot assign INVALID_FUNCTION to a non-function type
// shop/item_manager.sp(1324) : error 154: cannot assign INVALID_FUNCTION to a non-function type
// shop/item_manager.sp(1324) : warning 237: coercing functions to and from primitives is unsupported and will be removed in the future
// shop/item_manager.sp(1353) : error 154: cannot assign INVALID_FUNCTION to a non-function type
// shop/item_manager.sp(1353) : warning 237: coercing functions to and from primitives is unsupported and will be removed in the future
// shop/item_manager.sp(1354) : error 154: cannot assign INVALID_FUNCTION to a non-function type
// shop/item_manager.sp(1354) : warning 237: coercing functions to and from primitives is unsupported and will be removed in the future
// shop/item_manager.sp(1400) : error 154: cannot assign INVALID_FUNCTION to a non-function type
// shop/item_manager.sp(1400) : warning 237: coercing functions to and from primitives is unsupported and will be removed in the future
// shop/item_manager.sp(1481) : error 154: cannot assign INVALID_FUNCTION to a non-function type
// shop/item_manager.sp(1481) : warning 237: coercing functions to and from primitives is unsupported and will be removed in the future
// shop/item_manager.sp(1682) : error 154: cannot assign INVALID_FUNCTION to a non-function type
// shop/item_manager.sp(1682) : warning 237: coercing functions to and from primitives is unsupported and will be removed in the future
// shop/item_manager.sp(1683) : error 154: cannot assign INVALID_FUNCTION to a non-function type
// shop/item_manager.sp(1683) : warning 237: coercing functions to and from primitives is unsupported and will be removed in the future
// shop/item_manager.sp(1792) : error 154: cannot assign INVALID_FUNCTION to a non-function type
// shop/item_manager.sp(1792) : warning 237: coercing functions to and from primitives is unsupported and will be removed in the future
// shop/item_manager.sp(1857) : error 154: cannot assign INVALID_FUNCTION to a non-function type
// shop/item_manager.sp(1872) : error 154: cannot assign INVALID_FUNCTION to a non-function type
// shop/item_manager.sp(1872) : warning 237: coercing functions to and from primitives is unsupported and will be removed in the future
// shop/item_manager.sp(1907) : error 154: cannot assign INVALID_FUNCTION to a non-function type
// shop/item_manager.sp(1907) : warning 237: coercing functions to and from primitives is unsupported and will be removed in the future
// shop/item_manager.sp(1942) : error 154: cannot assign INVALID_FUNCTION to a non-function type
//
// Compilation aborted.
// 26 Errors.
//
// Compilation Time: 0,58 sec
// ----------------------------------------

Перечитав тему понял что нужно компилить на старом см, на 1.6 все нормально...
Может стоит переписать плагин под новый синтаксис?
--- Добавлено позже ---
Кстати, может кто сталкивался...
Не всегда работает меню "Функции", и как я понял это сопровождается следующими ошибками:
PHP:
L 11/28/2016 - 16:25:54: [SM] Exception reported: Plugin handle 550055 is invalid (error 1)
L 11/28/2016 - 16:25:54: [SM] Blaming: shop/shop.smx
L 11/28/2016 - 16:25:54: [SM] Call stack trace:
L 11/28/2016 - 16:25:54: [SM]   [0] Call_StartFunction
L 11/28/2016 - 16:25:54: [SM]   [1] Line 210, shop/functions.sp::Functions_ShowMenu
L 11/28/2016 - 16:25:54: [SM]   [2] Line 501, F:\cloud\git\addons\sourcemod\scripting\shop.sp::MainMenu_Handler
 
Последнее редактирование:

R1KO

fuck society
Сообщения
9,457
Реакции
7,786
  • Команда форума
  • #93
Может стоит переписать плагин под новый синтаксис?
Хочешь - переписывай. Лично я не вижу в этом смысла.
Не всегда работает меню "Функции", и как я понял это сопровождается следующими ошибками:
Потому что загружаешь/выгружаешь/перезагружаешь модули добавляющие пункт в Функции
 

AsJ

Участник
Сообщения
16
Реакции
0
Здравствуйте, после одной из обновлений ксго места крепления шапок у обычных ксго моделей изменились, а у моделей скаченных с интернета осталась такой же как и при старых версиях, в итоге получается что если сделать чтобы у обычных ксго моделей нормально отображалось, то у тех с камтум моделями будут криво отображаться и наоборот. Кто знает как решить эту проблему ? Мб есть какой то плагин который вернет старые angles к моделям ксго или что то в этом роде ?
 

YajSava

Участник
Сообщения
41
Реакции
0
Помню был модуль для шопа, примеры в чате писались, и их нужно было решать, а за это давали кредиты. Так вот, хотел бы я поставить его на сервер, но его нету, может ли кто нибуть скинуть ссылочку?
 

Allen

love society
Сообщения
352
Реакции
274
Помню был модуль для шопа, примеры в чате писались, и их нужно было решать, а за это давали кредиты. Так вот, хотел бы я поставить его на сервер, но его нету, может ли кто нибуть скинуть ссылочку?
Math Credits

Где настроить, чтобы плагин выдавал кредиты игроку за киллы и так далее, а то не выдает нихера :flood:

Money Distributor
 
Сверху Снизу