THC RPG - MOD

Sergey Grinko

Участник
Сообщения
140
Реакции
10
В configs/thc_rpg/core.txt есть.

А что именно?

Добавлено через 3 часа 27 минут
Вот что нужно сделать чтобы давали опыта (regxp) за убийство и т. д. больше? А то чуть легче было качаться
PHP:
    "exp_max"          "150000"   // required xp stops rising when getting to this point
    "exp_start"        "250"     // initial required xp
    "exp_inc"          "80"     // how much to increment required xp by after leveling up
    "exp_kill"         "15"       // xp for a kill multiplied by levelratio (victim/attacker)
	"max_exp_kill"     "55000"		 // maximum xp players can get for a kill (0 = infinite)
Английский плохо знаю, а гугл транслит только все портит :(
 
Последнее редактирование:

Бугага

Участник
Сообщения
5
Реакции
0
А у меня вот такая проблемма:
Скачал Thc rpg 0.8.6 и все работает!
Но только люди помогите в настройках upgrades: с regen_ammo.
Вообщем патроны регенерируються в обойме , а как сделать чтобы в оружие...
Например: 1 лвл , реген 1 патрон/секунда)
Очень прошу вас помочь :)

Вот настройка упградес, реген патронов:
// upgrade config file
//
"thc_rpg"
{
//
// "disable": disable upgrade
// "teamlock": disable the upgrade for the specified team
// 0 enable the upgrade for all teams
// 2 disable the upgrade for Terrorist team
// 3 disable the upgrade for Counter-Terrorist team
// "maxlevel": the "maxlevel" that a client can purchase
// "cost": the starting "cost" of the upgrade
// "icost": how much the "cost" is incremented by each purchase
//
"regen_ammo"
{
"disable" "0"
"teamlock" "0"
"maxlevel" "25"
"cost" "5"
"icost" "70"
"interval" "1.5" // the interval, in seconds, that a player regenerates ammo
"amount" "1" // amount of ammo to regenerade per interval (multiplied by level)
}
}
 
Последнее редактирование:

Серый™

CS:S Server
Сообщения
2,925
Реакции
1,376
Бугага, эта вестчь там плохо пашет и другие тоже.
 

Бугага

Участник
Сообщения
5
Реакции
0

Monomizer

Держу JDW в бане.
Сообщения
1,947
Возьми кусок кода где реген идёт в патроны и замени в своей сборке и скомпиль...-_-
 

xxxKRESHxxx

Участник
Сообщения
15
Реакции
2
Может кому понадобится, вот regen_ammo.inc на thc rpg 0.8.6 (восстановление патронов в оружие).

/*
* ============================================================================
*
* [THC RPG] Total HardCore RPG
*
* File: regen_ammo.inc
* Type: Upgrade
* Description: Gives you the ability to steadily regain ammo for the active gun until it is fully replenished
* Author: ArsiRC
*
* Copyright (C) 2009-2011 ArsiRC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* ============================================================================
*/

/**
* This module's identifier.
*/
new Module:g_moduleregen_ammo;

new g_regen_ammoUpgradeConfigCache[UpgradeConfigs];

new bool:g_bPlayerIsRegeneratingAmmo[MAXPLAYERS+1];

/**
* Register this module.
*/
regen_ammo_Register()
{
// Define all the module's data as layed out by enum ModuleData in project.inc.
new moduledata[ModuleData];

moduledata[ModuleData_Disabled] = false;
moduledata[ModuleData_Hidden] = false;
strcopy(moduledata[ModuleData_ShortName], MM_DATA_SHORTNAME, "regen_ammo");
strcopy(moduledata[ModuleData_FullName], MM_DATA_FULLNAME, "RegenerateAmmo");
strcopy(moduledata[ModuleData_Description], MM_DATA_DESCRIPTION, "Gives you the ability to steadily regain ammo for the active gun until it is fully replenished");

new Module:dependencies[MM_DATA_DEPENDENCIES];
dependencies[0] = g_moduleCore;
dependencies[1] = INVALID_MODULE;
moduledata[ModuleData_Dependencies] = dependencies;

new Module:interlocks[MM_DATA_INTERLOCKS];
interlocks[0] = INVALID_MODULE;
moduledata[ModuleData_Interlocks] = interlocks;

moduledata[ModuleData_TeamLock] = 0;
moduledata[ModuleData_MaxLevel] = 5;
moduledata[ModuleData_Cost] = 5;
moduledata[ModuleData_iCost] = 10;

// Send this array of data to the module manager.
g_moduleregen_ammo = ModuleMgr_Register(moduledata);

// Now register the events we're going to use.
#if defined EVENT_MANAGER
EventMgr_RegisterEvent(g_moduleregen_ammo, "Event_OnEventsRegister", "regen_ammo_OnEventsRegister");
#endif

// Register config file(s) that this module will use.
#if defined CONFIG_MANAGER
ConfigMgr_Register(g_moduleregen_ammo, "regen_ammo_OnConfigReload", "configs/thc_rpg/regen_ammo.txt");
#endif
}

/**
* Register all events here.
*/
public regen_ammo_OnEventsRegister()
{
// Register all the events needed for this module.
EventMgr_RegisterEvent(g_moduleregen_ammo, "Event_OnMapStart", "regen_ammo_OnMapStart");
#if defined PROJECT_GAME_CSS
EventMgr_RegisterEvent(g_moduleregen_ammo, "Event_WeaponFire", "regen_ammo_WeaponFire");
EventMgr_RegisterEvent(g_moduleregen_ammo, "Event_PlayerSpawn", "regen_ammo_PlayerSpawn");
#endif
}

/**
* All modules and events have been registered by this point. Event priority can be changed here.
*/
public regen_ammo_OnEventsReady()
{
}

#if defined CONFIG_MANAGER
/**
* Called when a registered config file (by this module) is manually reloaded.
*/
public regen_ammo_OnConfigReload(configindex)
{
#if defined LOG_MANAGER
LogMgr_Print(g_moduleregen_ammo, LogType_Normal, "regen_ammoConfigReload", "Reloaded regen_ammo module's config (index %d)", configindex);
#endif

ConfigMgr_CacheKv(g_moduleregen_ammo, CM_CONFIGINDEX_FIRST, "regen_ammoModule_ConfigCache");
}

/**
* Read config values
*/
public KvCache:regen_ammoModule_ConfigCache(Handle:kv, sectionindex, const String:sectionname[])
{
// Read Upgrade config
if(StrEqual(sectionname, "regen_ammo", false))
{
g_regen_ammoUpgradeConfigCache[UpgradeConfig_Disable] = KvGetNum(kv, "disable");
g_regen_ammoUpgradeConfigCache[UpgradeConfig_TeamLock] = KvGetNum(kv, "teamlock");
g_regen_ammoUpgradeConfigCache[UpgradeConfig_MaxLevel] = KvGetNum(kv, "maxlevel");
g_regen_ammoUpgradeConfigCache[UpgradeConfig_Cost] = KvGetNum(kv, "cost");
g_regen_ammoUpgradeConfigCache[UpgradeConfig_iCost] = KvGetNum(kv, "icost");
g_regen_ammoUpgradeConfigCache[UpgradeConfig_Interval] = KvGetFloat(kv, "interval");
g_regen_ammoUpgradeConfigCache[UpgradeConfig_Amount] = KvGetFloat(kv, "amount");

if(g_regen_ammoUpgradeConfigCache[UpgradeConfig_Disable]==1)
ModuleMgr_Disable(g_moduleregen_ammo);

ModuleMgr_WriteCell(g_moduleregen_ammo, ModuleData_TeamLock, g_regen_ammoUpgradeConfigCache[UpgradeConfig_TeamLock]);
ModuleMgr_WriteCell(g_moduleregen_ammo, ModuleData_MaxLevel, g_regen_ammoUpgradeConfigCache[UpgradeConfig_MaxLevel]);
ModuleMgr_WriteCell(g_moduleregen_ammo, ModuleData_Cost, g_regen_ammoUpgradeConfigCache[UpgradeConfig_Cost]);
ModuleMgr_WriteCell(g_moduleregen_ammo, ModuleData_iCost, g_regen_ammoUpgradeConfigCache[UpgradeConfig_iCost]);
}
else
ModuleMgr_Disable(g_moduleregen_ammo);
}
#endif

/**
* The map has started.
*/
public regen_ammo_OnMapStart()
{
#if defined CONFIG_MANAGER
ConfigMgr_CacheKv(g_moduleregen_ammo, CM_CONFIGINDEX_FIRST, "regen_ammoModule_ConfigCache");
#endif
}

/**
* Client has spawned.
*
* @param client The client index.
*
*/
public regen_ammo_PlayerSpawn(client)
{
g_bPlayerIsRegeneratingAmmo[client]=false;
}

/**
* Client has fired a weapon.
*
* @param client The client index.
* @param weapon The weapon classname fired. (No weapon_ prefix)
*/
/*
Weapon: weapon_deagle Offset: 1 Count: 35
Weapon: weapon_ak47 Offset: 2 Count: 90
Weapon: weapon_aug Offset: 2 Count: 90
Weapon: weapon_g3sg1 Offset: 2 Count: 90
Weapon: weapon_scout Offset: 2 Count: 90
Weapon: weapon_sg550 Offset: 3 Count: 90
Weapon: weapon_sg552 Offset: 3 Count: 90
Weapon: weapon_famas Offset: 3 Count: 90
Weapon: weapon_galil Offset: 3 Count: 90
Weapon: weapon_m4a1 Offset: 3 Count: 90
Weapon: weapon_m249 Offset: 4 Count: 200
Weapon: weapon_awp Offset: 5 Count: 30
Weapon: weapon_elite Offset: 6 Count: 120
Weapon: weapon_glock Offset: 6 Count: 120
Weapon: weapon_mp5navy Offset: 6 Count: 120
Weapon: weapon_tmp Offset: 6 Count: 120
Weapon: weapon_xm1014 Offset: 7 Count: 32
Weapon: weapon_m3 Offset: 7 Count: 32
Weapon: weapon_mac10 Offset: 8 Count: 100
Weapon: weapon_ump45 Offset: 8 Count: 100
Weapon: weapon_usp Offset: 8 Count: 100
Weapon: weapon_p228 Offset: 9 Count: 52
Weapon: weapon_p90 Offset: 10 Count: 100
Weapon: weapon_fiveseven Offset: 10 Count: 100
*/
public regen_ammo_WeaponFire(client, const String:weapon[])
{
if(client)
if(GetClientTeam(client)!=g_regen_ammoUpgradeConfigCache[UpgradeConfig_TeamLock])
{
if(GetPlayerUpgradeLevel(client,g_moduleregen_ammo)&&!g_bPlayerIsRegeneratingAmmo[client])
{
g_bPlayerIsRegeneratingAmmo[client]=true;
new max_ammo;
if(StrEqual(weapon, "deagle")||StrEqual(weapon, "xm1014"))
max_ammo=7;
else if(StrEqual(weapon, "m3"))
max_ammo=8;
else if(StrEqual(weapon, "scout")||StrEqual(weapon, "awp"))
max_ammo=10;
else if(StrEqual(weapon, "usp"))
max_ammo=12;
else if(StrEqual(weapon, "p228"))
max_ammo=13;
else if(StrEqual(weapon, "elite"))
max_ammo=15;
else if(StrEqual(weapon, "glock")||StrEqual(weapon, "fiveseven")||StrEqual(weapon, "g3sg1"))
max_ammo=20;
else if(StrEqual(weapon, "ump45")||StrEqual(weapon, "famas"))
max_ammo=25;
else if(StrEqual(weapon, "tmp")||StrEqual(weapon, "sg550")||StrEqual(weapon, "sg552")||StrEqual(weapon, "aug")||StrEqual(weapon, "m4a1")||StrEqual(weapon, "ak47")||StrEqual(weapon, "mp5navy")||StrEqual(weapon, "mac10"))
max_ammo=30;
else if(StrEqual(weapon, "galil"))
max_ammo=35;
else if(StrEqual(weapon, "p90"))
max_ammo=50;
else if(StrEqual(weapon, "m249"))
max_ammo=100;
new Handle:datapack=CreateDataPack();
WritePackCell(datapack, client);
WritePackCell(datapack, max_ammo);
CreateTimer(g_regen_ammoUpgradeConfigCache[UpgradeConfig_Interval],regen_ammo_Loop,datapack,TIMER_REPEAT);
}
}
}

public Action:regen_ammo_Loop(Handle:timer,Handle:datapack)
{
ResetPack(datapack);
new client=ReadPackCell(datapack);
new max_ammo=ReadPackCell(datapack);
if(IsClientInGame(client)&&g_bPlayerIsRegeneratingAmmo[client])
{
new weapon = GetEntDataEnt2(client,g_iActiveWeaponOffset);
if(IsValidEntity(weapon))
{
new amount=GetEntData(weapon,g_iWeaponClipOffset,4)+GetPlayerUpgradeLevel(client,g_moduleregen_ammo);
if(amount>max_ammo)
{
g_bPlayerIsRegeneratingAmmo[client]=false;
amount=max_ammo;
}
SetEntData(weapon,g_iWeaponClipOffset,amount,4,true);
return Plugin_Continue;
}
}
CloseHandle(datapack);
return Plugin_Stop;
}
 
Сообщения
18
Реакции
0
RPG v0.8.6 красные полосы

Всем хай, как убрать эти красные полосы?
376458e1402c.jpg
 

SenatoR

Участник
Сообщения
773
Реакции
344

SenatoR

Участник
Сообщения
773
Реакции
344
Как обнулить статистику одного игрока
thc_rpg_resetplayer <Имя Игрока|SteamID>

как перенести статистику на другой steam id ?
Никак, разве что редактировать бд

У меня в подписи есть модифицированный рпг, посмотри, может понравится :-D
 

Vkz_wTF

Участник
Сообщения
12
Реакции
0
Подскажите, как префикс "[THC RPG]" в командах чата убрать? х)
 
Сверху Снизу