Custom ItemInfo and duplicate weapons

Сообщения
29
Реакции
4
Помог
1 раз(а)
Ошибка
None.
ОС
Linux
Amx Mod X
AMX Mod X 1.8.3-dev+5154 (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: Mar 11 2018 07:25:29
Built from: https://github.com/alliedmodders/amxmodx/commit/2559fcf0
Build ID: 5154:2559fcf0
Core mode: JIT+ASM32
Билд
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
Exe build: 09:10:05 Jul 7 2017 (7561)
ReGamedll
ReGameDLL version: 5.7.0.312-dev
Build date: 07:53:34 May 31 2018
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/26db32e
Версия Metamod
Metamod v1.21-am  2013-03-15 (5:13)
by Will Day <[email protected]>
http://www.metamod.org/
compiled: Mar 15 2013, 15:20:21 (msc optimized)
Список метамодулей
[ 1] AMX Mod X        RUN   -    amxmodx_mm_i386.  v1.8.3-d  ini   Start ANY  
[ 2] Ham Sandwich RUN - hamsandwich_amxx v1.8.3-d pl1 ANY ANY
[ 3] CSX RUN - csx_amxx_i386.so v1.8.3-d pl1 ANY ANY
[ 4] Engine RUN - engine_amxx_i386 v1.8.3-d pl1 ANY ANY
[ 5] FakeMeta RUN - fakemeta_amxx_i3 v1.8.3-d pl1 ANY ANY
[ 6] ReAPI RUN - reapi_amxx_i386. v5.6.0.1 pl1 ANY Never
Список плагинов
[  1] Admin Base              1.8.3-dev+  AMXX Dev Team     admin.amxx       running  
[ 2] Admin Commands 1.8.3-dev+ AMXX Dev Team admincmd.amxx running
[ 3] Admin Help 1.8.3-dev+ AMXX Dev Team adminhelp.amxx running
[ 4] Slots Reservation 1.8.3-dev+ AMXX Dev Team adminslots.amxx running
[ 5] Multi-Lingual System 1.8.3-dev+ AMXX Dev Team multilingual.am running
[ 6] Menus Front-End 1.8.3-dev+ AMXX Dev Team menufront.amxx running
[ 7] Commands Menu 1.8.3-dev+ AMXX Dev Team cmdmenu.amxx running
[ 8] Players Menu 1.8.3-dev+ AMXX Dev Team plmenu.amxx running
[ 9] Maps Menu 1.8.3-dev+ AMXX Dev Team mapsmenu.amxx running
[ 10] Plugin Menu 1.8.3-dev+ AMXX Dev Team pluginmenu.amxx running
[ 11] Admin Chat 1.8.3-dev+ AMXX Dev Team adminchat.amxx running
[ 12] Anti Flood 1.8.3-dev+ AMXX Dev Team antiflood.amxx running
[ 13] Scrolling Message 1.8.3-dev+ AMXX Dev Team scrollmsg.amxx running
[ 14] Info. Messages 1.8.3-dev+ AMXX Dev Team imessage.amxx running
[ 15] Admin Votes 1.8.3-dev+ AMXX Dev Team adminvote.amxx running
[ 16] NextMap 1.8.3-dev+ AMXX Dev Team nextmap.amxx running
[ 17] Nextmap Chooser 1.8.3-dev+ AMXX Dev Team mapchooser.amxx running
[ 18] TimeLeft 1.8.3-dev+ AMXX Dev Team timeleft.amxx running
[ 19] Pause Plugins 1.8.3-dev+ AMXX Dev Team pausecfg.amxx running
[ 20] Stats Configuration 1.8.3-dev+ AMXX Dev Team statscfg.amxx running
[ 21] StatsX 1.8.3-dev+ AMXX Dev Team statsx.amxx running
[ 22] ItemInfo_test 1.0 Crazy iteminfo_test running
Автор плагина
Crazy
Версия плагина
1.0
Исходный код
#include <amxmodx>
#include <reapi>

const WEAPON_RPG = WEAPON_SHIELDGUN + 1;

#define RPG_WEIGHT 20
#define ROCKET_MAX_CARRY 5
#define RPG_MAX_CLIP 1

public plugin_init()
{
register_plugin("ItemInfo test", "1.0", "Crazy");

register_clcmd("say /p228", "cmdP228");
}

public cmdP228(this)
{
new pevWeapon = rg_give_custom_item(this, "weapon_p228");

rg_set_iteminfo(pevWeapon, ItemInfo_pszName, "weapon_rpg");
rg_set_iteminfo(pevWeapon, ItemInfo_pszAmmo1, "rockets");
rg_set_iteminfo(pevWeapon, ItemInfo_iMaxAmmo1, ROCKET_MAX_CARRY);
rg_set_iteminfo(pevWeapon, ItemInfo_pszAmmo2, "");
rg_set_iteminfo(pevWeapon, ItemInfo_iMaxAmmo2, -1);
rg_set_iteminfo(pevWeapon, ItemInfo_iMaxClip, RPG_MAX_CLIP);
rg_set_iteminfo(pevWeapon, ItemInfo_iSlot, 3);
rg_set_iteminfo(pevWeapon, ItemInfo_iPosition, 0);
rg_set_iteminfo(pevWeapon, ItemInfo_iFlags, 0);
rg_set_iteminfo(pevWeapon, ItemInfo_iId, WEAPON_RPG);
rg_set_iteminfo(pevWeapon, ItemInfo_pszName, RPG_WEIGHT);
set_member(pevWeapon, m_iId, WEAPON_RPG);
}
Hello, I want to know what's the risk of changing ItemInfo and if I can have 2 equals weapons (two p228, e.g). I'm doing like Half-Life 1 source code so I'm not sure if that's right and if will work.
 

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу