- Ошибка
-
L 12/05/2024 - 17:09:48: -------- Mapchange to de_dust2 --------
L 12/05/2024 - 17:09:48: [AMXX] Plugin ("zp_addon_pets.amxx") is setting itself as failed.
L 12/05/2024 - 17:09:48: [AMXX] Plugin says: [RC] Отсутсвтует:
L 12/05/2024 - 17:09:48: [AMXX] Run time error 1 (plugin "zp_addon_pets.amxx") - forced exit
- ОС
- Linux
- Amx Mod X
-
AMX Mod X 1.9.0.5294 (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 3 2021 15:54:56
Built from: https://github.com/alliedmodders/amxmodx/commit/363871a
Build ID: 5294:363871a
Core mode: JIT+ASM32
- Билд
-
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.13.0.788-dev
Build date: 07:36:33 Jul 12 2023 (3378)
Build from: https://github.com/dreamstalker/rehlds/commit/f955b07
- ReGamedll
-
ReGameDLL version: 5.26.0.668-dev
Build date: 19:02:48 Dec 31 2023
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/d3c0ec8
- Версия Metamod
-
Metamod-r v1.3.0.149, API (5:13)
Metamod-r build: 11:31:17 Apr 23 2024
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/603a257
- Список метамодулей
-
Currently loaded plugins:
description stat pend file vers src load unload
[ 1] Reunion RUN - reunion_mm_i386.so v0.1.92d ini Start Never
[ 2] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5294 ini Start ANY
[ 3] Engine RUN - engine_amxx_i386.so v1.9.0.5294 pl2 ANY ANY
[ 4] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5294 pl2 ANY ANY
[ 5] MySQL RUN - mysql_amxx_i386.so v1.9.0.5294 pl2 ANY ANY
[ 6] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5294 pl2 ANY ANY
[ 7] CSX RUN - csx_amxx_i386.so v1.9.0.5294 pl2 ANY ANY
[ 8] ReAPI RUN - reapi_amxx_i386.so v5.24.0.300-dev pl2 ANY Never
8 plugins, 8 running
- Список плагинов
-
Currently loaded plugins:
name version author file status
[ 1] Slots Reservation 1.9.0.5294 AMXX Dev Team adminslots.amxx running
[ 2] Multi-Lingual System 1.9.0.5294 AMXX Dev Team multilingual.am running
[ 3] Maps Menu 1.9.0.5294 AMXX Dev Team mapsmenu.amxx running
[ 4] Plugin Menu 1.9.0.5294 AMXX Dev Team pluginmenu.amxx running
[ 5] Pause Plugins 1.9.0.5294 AMXX Dev Team pausecfg.amxx running
[ 6] [182] Ultimate Informe 21.03.23 SKAJIbnEJIb ultimate_inform running
[ 7] [182] Skill ELO 22.11.15 SKAJIbnEJIb skill_elo.amxx running
[ 8] [182] Ultimate Models 21.03.23 SKAJIbnEJIb ultimate_models running
[ 9] [182] Stats Configurat 20.06.06 SKAJIbnEJIb & AM statscfg_rbs.am running
[ 10] [182] StatsX RBS 21.03.23 SKAJIbnEJIb & AM statsx_rbs.amxx running
[ 11] [182] Ultimate Weapons 22.11.15 SKAJIbnEJIb ultimate_weapon running
[ 12] unknown unknown unknown zp_addon_pets.a error
[ 13] [182] Ad From Server 20.06.06 SKAJIbnEJIb ad_from_server. running
[ 14] [182] AdminCmd RBS 22.11.15 SKAJIbnEJIb & AM admincmd_rbs.am running
[ 15] [182] AMXBans RBS 20.06.06 SKAJIbnEJIb & La amxbans_rbs.amx running
[ 16] Menus Front-End 20.06.06 SKAJIbnEJIb & AM amxmodmenu_rbs. running
[ 17] [182] Parachute RBS 22.11.15 SKAJIbnEJIb & KR parachute_rbs.a running
[ 18] [182] DemoRecorder RBS 20.06.06 SKAJIbnEJIb demorecorder_rb running
[ 19] [182] High Ping Kicker 20.06.06 SKAJIbnEJIb hpk_rbs.amxx running
[ 20] [182] Army Ranks Ultim 20.06.06 SKAJIbnEJIb army_ranks_ulti running
[ 21] AR Double 14.12.02 SKAJIbnEJIb ar_double.amxx running
[ 22] AR Zombie Mod 14.12.02 SKAJIbnEJIb ar_zombiemod.am running
[ 23] [182] Chat RBS 20.06.06 SKAJIbnEJIb chat_rbs.amxx running
[ 24] [182] CmdMenu RBS 20.06.06 SKAJIbnEJIb & AM cmdmenu_rbs.amx running
[ 25] [182] Damager RBS 20.06.06 SKAJIbnEJIb damager_rbs.amx running
[ 26] [182] ESP RBS 20.06.06 SKAJIbnEJIb & Ko esp_rbs.amxx running
[ 27] [182] Ultimate Gag 17.12.22BE SKAJIbnEJIb ultimate_gag.am running
[ 28] [182] Kill Assist RBS 20.06.06 SKAJIbnEJIb & Di killassist_rbs. running
[ 29] [182] MapChooser RBS 20.08.02 SKAJIbnEJIb & UF mapchooser_rbs. running
[ 30] [182] NextMap 18.09.25 SKAJIbnEJIb & AM nextmap.amxx running
[ 31] [182] TimeLeft 18.09.25 SKAJIbnEJIb & AM timeleft.amxx running
[ 32] [182] MOTD RBS 21.03.23 SKAJIbnEJIb motd_rbs.amxx running
[ 33] [182] AR Pogony 20.06.06 SKAJIbnEJIb ar_pogony.amxx running
[ 34] [182] CsStats ResetSco 20.06.06 SKAJIbnEJIb csstats_resetsc running
[ 35] [182] Stimulation RBS 20.06.06 SKAJIbnEJIb stimulation_rbs running
[ 36] [182] VIP RBS 20.07.20 SKAJIbnEJIb vip_rbs.amxx running
[ 37] Perfect Camera 0.2.5 Nordic Warrior perfect_camera. running
[ 38] [182] BackWeapons RBS 20.06.06 SKAJIbnEJIb & ho backweapons_rbs running
[ 39] [182] VoteBan RBS 20.06.06 SKAJIbnEJIb voteban_rbs.amx running
[ 40] [182] CsStats MySQL 22.11.15 SKAJIbnEJIb csstats_mysql.a running
[ 41] Team Select 1.6.0 F@nt0M teamselect.amxx running
[ 42] Set console Plugin 1.0.0.1 Moxnatiy_aimm.co inp_light.amxx running
[ 43] Set console Plugin 1.0.0.1 Moxnatiy_aimm.co inp_low.amxx running
[ 44] Set console Plugin 1.0.0.1 Moxnatiy_aimm.co inp_max.amxx running
[ 45] Set console Plugin 1.0.0.1 Moxnatiy_aimm.co inp_medium.amxx running
[ 46] [182] Radio RBS 20.06.06 SKAJIbnEJIb radio_rbs.amxx running
( 12) Error: [RC] Отсутсвтует:
46 plugins, 45 running
- Автор плагина
- Нету
- Версия плагина
- Нету
- Исходный код
-
#include <amxmodx>
#include <fakemeta>
#include <sqlx>
#include <reapi>
#define SAVE_PETS // Закоментируйте "//", если вам не нужно сохранение по БД
#define NUM_ITEM_PAGE 7
enum _:FLY_PET_SETTINGS
{
FLY_MODEL,
FLY_LIGHT
};
enum _:DATA_FLY_PET
{
NAME[32],
FILE[64],
BODY,
SKIN,
FLY_LIGHT_MODEL[3],
FLAG
};
new Array:g_aPet[2]; // Файлы
new Array:g_iPetEntity;
new g_aSize[FLY_PET_SETTINGS]; // Настройки
new g_PetUserSett[33][FLY_PET_SETTINGS]; // Настройки питомца
new g_PlayerPageMenu[33], g_SettingsMenu[33]; // Меню
#if defined SAVE_PETS
new g_szPlayerSteam[33][34], g_szQuery[512];
new Handle:g_SqlTuple, Handle:g_SqlConnection;
new g_szSaveSqlUser[32];
new g_szSaveSqlPassword[32];
new g_szSaveSqlHost[32];
new g_szSaveSqlDataBase[32];
new g_szSaveSqlTable[32];
#endif
public plugin_init()
{
register_plugin("[ALL] Back fly costume's", "b1.0", "XxXx#xXxX");
register_clcmd("pets", "Show_PetMenu");
register_menucmd(register_menuid("Show_PetMenu"), 1023, "Handle_PetMenu");
register_menucmd(register_menuid("Show_SettingsPetMenu"), 1023, "Handle_SettingsPetMenu");
register_dictionary("rcpl/zp_all_info.txt");
register_dictionary("rcpl/zp_main_menu.txt");
g_iPetEntity = ArrayCreate();
}
public plugin_precache()
{
new g_iFile[64] = "addons/amxmodx/configs/rcpl/RC_Engine.ini";
new iFile = fopen(g_iFile, "rt");
if(!file_exists(g_iFile))
{
new szError[100];
formatex(szError, charsmax(szError), "[RC] Отсутсвтует: %s", iFile);
set_fail_state(szError);
return;
}
new szBuffer[512], szKey[128], szValue[128], szTemp[4][64], iSection;
new aDataModelPet[DATA_FLY_PET], aDataLightPet[DATA_FLY_PET], szFlag[4];
for(new i; i < FLY_PET_SETTINGS; i++)
g_aPet[i] = ArrayCreate(DATA_FLY_PET);
if(iFile)
{
while(!feof(iFile))
{
fgets(iFile, szBuffer, charsmax(szBuffer));
replace(szBuffer, charsmax(szBuffer), "^n", "");
trim(szBuffer);
if(szBuffer[0] == EOS || szBuffer[0] == '/' && szBuffer[1] == '/' || szBuffer[0] == ';' || szBuffer[0] == '{' || szBuffer[0] == '}' || szBuffer[0] == '#')
continue;
if(szBuffer[0] == '[')
{
iSection++;
continue;
}
parse(szBuffer, szKey, charsmax(szKey), szValue, charsmax(szValue));
trim(szKey), trim(szValue);
#if defined SAVE_PETS
if(equal(szKey, "HOST")) copy(g_szSaveSqlHost, charsmax(g_szSaveSqlHost), szValue);
if(equal(szKey, "USER")) copy(g_szSaveSqlUser, charsmax(g_szSaveSqlUser), szValue);
if(equal(szKey, "PASSWORD")) copy(g_szSaveSqlPassword, charsmax(g_szSaveSqlPassword), szValue);
if(equal(szKey, "DATABASE")) copy(g_szSaveSqlDataBase, charsmax(g_szSaveSqlDataBase), szValue);
if(equal(szKey, "TABLE_PETS")) copy(g_szSaveSqlTable, charsmax(g_szSaveSqlTable), szValue);
#endif
switch(iSection)
{
case 8:
{
if(parse(szBuffer, \
aDataModelPet[NAME], charsmax(aDataModelPet[NAME]), \
aDataModelPet[FILE], charsmax(aDataModelPet[FILE]), \
szTemp[0], charsmax(szTemp[]), \
szTemp[1], charsmax(szTemp[]), \
szFlag, charsmax(szFlag)\
)\
)
{
if(aDataModelPet[FILE])
{
aDataModelPet[FILE] = engfunc(EngFunc_PrecacheModel, aDataModelPet[FILE]);
if(aDataModelPet[BODY]) aDataModelPet[BODY] = str_to_num(szTemp[0]);
if(aDataModelPet[SKIN]) aDataModelPet[SKIN] = str_to_num(szTemp[1]);
}
aDataModelPet[FLAG] = read_flags(szFlag);
ArrayPushArray(g_aPet[0], aDataModelPet);
}
}
case 9:
{
if(parse(szBuffer, \
aDataLightPet[NAME], charsmax(aDataLightPet[NAME]), \
szValue, charsmax(szValue), \
szFlag, charsmax(szFlag)\
)\
)
{
new szValueFile[64];
for(new i; i < 3 && szValue[0] != 0 && strtok(szValue, szValueFile, charsmax(szValueFile), szValue, charsmax(szValue), ','); i++)
{
trim(szValue), trim(szValueFile);
aDataLightPet[FLY_LIGHT_MODEL][i] = str_to_num(szValueFile);
}
aDataLightPet[FLAG] = read_flags(szFlag);
ArrayPushArray(g_aPet[1], aDataLightPet);
}
}
}
}
fclose(iFile);
for(new i; i < FLY_PET_SETTINGS; i++)
g_aSize[i] = ArraySize(g_aPet[i]);
#if defined SAVE_PETS
iPets_SqlLoad();
#endif
}
}
#if defined SAVE_PETS
public client_putinserver(id)
{
new iParams[1]; iParams[0] = id;
get_user_authid(id, g_szPlayerSteam[id], charsmax(g_szPlayerSteam[]));
formatex(g_szQuery, charsmax(g_szQuery), "SELECT * FROM `%s` WHERE (`%s`.`STEAM_ID` = '%s')", g_szSaveSqlTable, g_szSaveSqlTable, g_szPlayerSteam[id]);
SQL_ThreadQuery(g_SqlTuple, "SQL_QueryConnection", g_szQuery, iParams, sizeof iParams);
}
public client_disconnected(id)
{
formatex(g_szQuery, charsmax(g_szQuery), "UPDATE `%s` SET \
`FLY_MODEL` = '%d', `FLY_LIGHT` = '%d';", \
g_szSaveSqlTable, \
g_PetUserSett[id][FLY_MODEL], g_PetUserSett[id][FLY_LIGHT], \
g_szSaveSqlTable, g_szPlayerSteam[id]\
);
SQL_ThreadQuery(g_SqlTuple, "ThreadQueryHandler", g_szQuery);
g_szPlayerSteam[id] = "";
iSet_Model_Fly_Pet(id, false);
}
public iPets_SqlLoad()
{
new iErrorCode, szText[512];
g_SqlTuple = SQL_MakeDbTuple(g_szSaveSqlHost, g_szSaveSqlUser, g_szSaveSqlPassword, g_szSaveSqlDataBase);
g_SqlConnection = SQL_Connect(g_SqlTuple, iErrorCode, szText, charsmax(szText));
new Handle:hQueries;
format(g_szQuery, charsmax(g_szQuery), "CREATE TABLE IF NOT EXISTS `%s` (`STEAM_ID` varchar(34) CHARACTER SET cp1250 COLLATE cp1250_general_ci NOT NULL, \
`FLY_MODEL` INT NOT NULL, `FLY_LIGHT` INT NOT NULL)", g_szSaveSqlTable\
);
hQueries = SQL_PrepareQuery(g_SqlConnection, g_szQuery);
if(!SQL_Execute(hQueries))
{
SQL_QueryError(hQueries, szText, charsmax(szText));
log_amx("%s", szText);
}
SQL_FreeHandle(hQueries);
}
public plugin_end()
{
if(g_SqlTuple)
SQL_FreeHandle(g_SqlTuple);
if(g_SqlConnection)
SQL_FreeHandle(g_SqlConnection);
return 0;
}
public SQL_QueryConnection(iState, Handle:hQuery, const szError[], iErrorCode, const szData[], iDataSize)
{
if(iState == TQUERY_CONNECT_FAILED || iState == TQUERY_QUERY_FAILED)
{
log_amx("[SERVER] MySQL connection failed");
log_amx("[SERVER] ERROR %d | %s", iErrorCode, szError);
if(iDataSize) log_amx("Query state: %d", szData[iState == TQUERY_CONNECT_FAILED ? 0 : 1]);
return PLUGIN_HANDLED;
}
new id = szData[0];
if(SQL_NumResults(hQuery) < 1)
{
if(equal(g_szPlayerSteam[id], "ID_PENDING"))
return PLUGIN_HANDLED;
for(new i; i < FLY_PET_SETTINGS; i++)
g_PetUserSett[id][i] = 0;
format(g_szQuery, charsmax(g_szQuery), "INSERT INTO `%s` (`STEAM_ID`, \
`FLY_MODEL`, `FLY_LIGHT` \
) VALUES ('%s', '0', '0');", g_szSaveSqlTable, g_szPlayerSteam[id]);
SQL_ThreadQuery(g_SqlTuple, "ThreadQueryHandler", g_szQuery);
return PLUGIN_HANDLED;
}
else
{
new const szDataSave[][] = { "FLY_MODEL", "FLY_LIGHT" };
for(new i, iNum; i < FLY_PET_SETTINGS; i++)
{
iNum = SQL_ReadResult(hQuery, SQL_FieldNameToNum(hQuery, szDataSave[i]));
g_PetUserSett[id][i] = (iNum <= g_aSize[i]) ? iNum : 0;
}
}
new aDataModelPlayer[DATA_FLY_PET];
ArrayGetArray(g_aPet[0], g_PetUserSett[id][FLY_MODEL], aDataModelPlayer);
if(aDataModelPlayer[FILE])
iSet_Model_Fly_Pet(id, true);
return PLUGIN_HANDLED;
}
public ThreadQueryHandler(iState, Handle: hQuery, szError[], iErrorCode, iParams[], iParamsSize)
{
if(iState == 0)
return;
log_amx("SQL Error: %d (%s)", iErrorCode, szError);
}
#endif
public Show_PetMenu(id)
{
new szMenu[512], iKeys = (1<<0|1<<1|1<<8|1<<9), iLen, aData[FLY_PET_SETTINGS][DATA_FLY_PET];
for(new i; i < FLY_PET_SETTINGS; i++)
ArrayGetArray(g_aPet[i], g_PetUserSett[id][i], aData[i]);
iLen = formatex(szMenu, charsmax(szMenu), "%L %L^n^n", id, "RC_MENU_PREFIX", id, "RC_SET_PETS");
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L %L^n", id, "RC_PARENTHESES_1", id, "RC_MENU_MODEL", aData[FLY_MODEL][NAME]);
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L %L^n", id, "RC_PARENTHESES_2", id, "RC_MENU_LIGHT", aData[FLY_LIGHT][NAME]);
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n%L %L", id, "RC_PARENTHESES_9", id, "RC_BACK");
formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n%L %L", id, "RC_PARENTHESES_0", id, "RC_EXIT");
return show_menu(id, iKeys, szMenu, -1, "Show_PetMenu");
}
public Handle_PetMenu(id, iKey)
{
switch(iKey)
{
case 8:{
client_cmd(id, "settings")
}
case 9: return PLUGIN_HANDLED;
default:
{
g_SettingsMenu[id] = iKey;
return Clcmd_SettingsPetMenu(id);
}
}
return Show_PetMenu(id);
}
public Clcmd_SettingsPetMenu(id) return Show_SettingsPetMenu(id, g_SettingsMenu[id], g_PlayerPageMenu[id] = 0);
Show_SettingsPetMenu(id, iType, iPos)
{
if(iPos < 0) return Show_PetMenu(id);
new const g_szMenuPetSetting[][] =
{
"RC_MENU_SETTINGS_MODEL",
"RC_MENU_SETTINGS_LIGHT"
};
new iStart = iPos * NUM_ITEM_PAGE, iListSize;
if(g_aSize[iType] <= NUM_ITEM_PAGE) iListSize = g_aSize[iType] - 1;
else iListSize = g_aSize[iType];
if(iStart > iListSize) iStart = iListSize;
iStart = iStart - (iStart % NUM_ITEM_PAGE);
g_PlayerPageMenu[id] = iStart / NUM_ITEM_PAGE;
new iEnd = iStart + NUM_ITEM_PAGE;
if(iEnd > iListSize) iEnd = iListSize + (iPos ? 0 : 1);
new szMenu[512], iLen, iPagesNum = (iListSize / NUM_ITEM_PAGE + ((iListSize % NUM_ITEM_PAGE) ? 1 : 0));
iLen = formatex(szMenu, charsmax(szMenu), "%L^n^n", id, g_szMenuPetSetting[iType], iPos + 1, iPagesNum);
new iKeys = (1<<7|1<<9), b, aData[DATA_FLY_PET];
for(new a = iStart; a < iEnd; a++)
{
ArrayGetArray(g_aPet[iType], a, aData);
if(~get_user_flags(id) & aData[FLAG])
{
++b;
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L %L^n", id, "RC_PARENTHESES_INVALID", id, "RC_MENU_NO_FLAGS", aData[NAME]);
}
else if(g_PetUserSett[id][iType] == a)
{
++b;
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L %s\y*^n", id, "RC_SELECTED", aData[NAME]);
}
else
{
iKeys |= (1<<b);
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L %s^n", id, "RC_PARENTHESES", ++b, aData[NAME]);
}
}
for(new i = b; i < NUM_ITEM_PAGE; i++) iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n");
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n%L %L", id, "RC_PARENTHESES_8", id, "RC_BACK");
if(iEnd < iListSize)
{
iKeys |= (1<<8);
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n%L %L", id, "RC_PARENTHESES_9", id, "RC_NEXT");
}
else iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n%L %L", id, "RC_PARENTHESES_INVALID", id, "RC_NEXT");
formatex(szMenu[iLen], charsmax(szMenu) - iLen,"^n%L %L", id, "RC_PARENTHESES_0", id, "RC_EXIT");
return show_menu(id, iKeys, szMenu, -1, "Show_SettingsPetMenu");
}
public Handle_SettingsPetMenu(id, iKey)
{
switch(iKey)
{
case 7: return Show_SettingsPetMenu(id, g_SettingsMenu[id], --g_PlayerPageMenu[id]);
case 8: return Show_SettingsPetMenu(id, g_SettingsMenu[id], ++g_PlayerPageMenu[id]);
case 9: return PLUGIN_HANDLED;
default:
{
new iCoice = g_PlayerPageMenu[id] * NUM_ITEM_PAGE + iKey;
g_PetUserSett[id][g_SettingsMenu[id]] = iCoice;
iSet_Model_Fly_Pet(id, false);
new aDataModelPlayer[DATA_FLY_PET];
ArrayGetArray(g_aPet[0], g_PetUserSett[id][FLY_MODEL], aDataModelPlayer);
if(aDataModelPlayer[FILE])
iSet_Model_Fly_Pet(id, true);
}
}
return Show_SettingsPetMenu(id, g_SettingsMenu[id], g_PlayerPageMenu[id]);
}
iSet_Model_Fly_Pet(pId, bool:bUsed)
{
switch(bUsed)
{
case true:
{
new iEntity[33];
iEntity[pId] = rg_create_entity("info_target");
if(is_entity(iEntity[pId]))
{
new aDataModelPlayer[DATA_FLY_PET];
ArrayGetArray(g_aPet[0], g_PetUserSett[pId][FLY_MODEL], aDataModelPlayer);
if(aDataModelPlayer[FILE])
set_entvar(iEntity[pId], var_modelindex, aDataModelPlayer[FILE]);
//engfunc(EngFunc_SetModel, iEntity[pId], aDataModelPlayer[FILE]);
set_entvar(iEntity[pId], var_aiment, pId);
set_entvar(iEntity[pId], var_movetype, MOVETYPE_FOLLOW);
if(aDataModelPlayer[BODY]) set_entvar(iEntity[pId], var_body, aDataModelPlayer[BODY]);
if(aDataModelPlayer[SKIN]) set_entvar(iEntity[pId], var_skin, aDataModelPlayer[SKIN]);
new aDataLightPet[DATA_FLY_PET];
ArrayGetArray(g_aPet[1], g_PetUserSett[pId][FLY_LIGHT], aDataLightPet);
if(aDataLightPet[FLY_LIGHT_MODEL][0] != 0 || aDataLightPet[FLY_LIGHT_MODEL][1] != 0 || aDataLightPet[FLY_LIGHT_MODEL][2] != 0)
{
new Float:vecColor[3];
vecColor[0] = float(aDataLightPet[FLY_LIGHT_MODEL][0]);
vecColor[1] = float(aDataLightPet[FLY_LIGHT_MODEL][1]);
vecColor[2] = float(aDataLightPet[FLY_LIGHT_MODEL][2]);
// rg_set_user_rendering(pId, kRenderFxGlowShell, vecColor, kRenderNormal, 0.0);
if(aDataModelPlayer[FILE])
rg_set_user_rendering(iEntity[pId], kRenderFxGlowShell, vecColor, kRenderNormal, 5.0);
}
// set_entvar(iEntity[pId], var_body, str_to_num(aDataCostumes[SUB_MODEL]));
set_entvar(iEntity[pId], var_sequence, 0);
set_entvar(iEntity[pId], var_animtime, get_gametime());
set_entvar(iEntity[pId], var_framerate, 1.0);
set_entvar(iEntity[pId], var_iuser1, pId);
ArrayPushCell(g_iPetEntity, iEntity[pId]);
return 1;
}
return 0;
}
case false:
{
new iEntity;
for(new i = 0; i < ArraySize(g_iPetEntity); i++)
{
iEntity = ArrayGetCell(g_iPetEntity, i);
if(is_entity(iEntity))
{
if(get_entvar(iEntity, var_iuser1) == pId)
{
if(iEntity) rg_remove_entity(iEntity);
ArrayDeleteItem(g_iPetEntity, i);
return 1;
}
}
}
}
}
return 0;
}
stock rg_remove_entity(const id)
{
if(is_entity(id))
{
set_entvar(id, var_flags, get_entvar(id, var_flags) | FL_KILLME);
set_entvar(id, var_nextthink, get_gametime());
}
}
stock rg_set_user_rendering(id, fx = kRenderFxNone, {Float,_}:color[3] = {0.0, 0.0, 0.0}, render = kRenderNormal, Float:amount = 0.0)
{
set_entvar(id, var_renderfx, fx);
set_entvar(id, var_rendercolor, color);
set_entvar(id, var_rendermode, render);
set_entvar(id, var_renderamt, amount);
}
Надеюсь все правельно заполнил