Скриптер
Проверенный
Пользователь
- Сообщения
- 3,582
- Реакции
- 1,570
- Помог
- 137 раз(а)
Уже предлагали.Request: Добавить возможность вызывать хуки аля ExecuteHam(B) как у Hamsandwich
Не совсем так, но сделал очень много.почти в одного сделал rehlds
Тут скорее как я понял архитектурное решение. Если нужен вызов хука всегда есть натив. И в этом есть огромный бонус, так как каждый натив имеет строгий набор аргументов, и при компиляции будет отображена ошибка, если будет передано что-то не то. С ExecuteHam легко можно положить серв передав просто не тот аргумент. Плюс ко всему VSCode и другие редакторы умеют в автокомплит если установить расширения к ним.ну да, зачем тогда вообще реапи делали.
public FreezeHerkesSpec(){
for (new i = 1; i <= MaxClients; i++){
if(is_user_connected(i)){
if(is_user_alive(i)){
user_kill(i)
}
rg_set_user_team(i,TEAM_SPECTATOR)
}
}
client_print_color(0,print_team_grey,"%s Adminlerin oyunculari tasimasi icin herkes SPEC takimina atildi.",SayTag );
client_print_color(0,print_team_blue,"%s Adminlerin oyunculari tasimasi icin herkes SPEC takimina atildi.",SayTag );
client_print_color(0,print_team_red,"%s Adminlerin oyunculari tasimasi icin herkes SPEC takimina atildi.",SayTag );
}
L 05/31/2020 - 21:45:59: [ReAPI] rg_set_user_team: player 10 is not connected
L 05/31/2020 - 21:45:59: [AMXX] Run time error 10 (plugin "csd_macbotu.amxx") (native "rg_set_user_team") - debug not enabled!
L 05/31/2020 - 21:45:59: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
[/HIDE]#include <amxmodx>
#include <reapi>
new cvar_kebp, cvar_nkpv;
new i_oynanilantekrar;
public plugin_init()
{
register_plugin("DuzenliPara","1.1","Yek'-ta");
RegisterHookChain(RG_CSGameRules_RestartRound, "fwdRoundStart", false);
bind_pcvar_num(create_cvar("kaceldebirpara","5", .description = "Kac Elde Bir Para Verilecegi"), cvar_kebp);
bind_pcvar_num(create_cvar("nekadarparaverilecek","5000", .description = "Ne Kadar Para Verilecegi"), cvar_nkpv);
}
public fwdRoundStart()
{
if(get_member_game(m_bCompleteReset))
{
i_oynanilantekrar=-5;
}
i_oynanilantekrar++;
if(cvar_kebp <= i_oynanilantekrar)
{
client_print_color(0,print_team_grey,"^1Oyundaki oyunculara^4 %i $ ^1verildi", cvar_nkpv)
for (new i = 1; i <= MaxClients; i++){
if(is_user_connected(i)){
rg_add_account(i, cvar_nkpv, AS_ADD);
}
}
i_oynanilantekrar = 1;
}
//server_print("OynanilanEl %i",i_oynanilantekrar)
}
L 05/31/2020 - 21:19:23: [ReAPI] rg_add_account: player 14 is not connected
L 05/31/2020 - 21:19:23: [AMXX] Displaying debug trace (plugin "DüzenliPara.amxx", version "1.1")
L 05/31/2020 - 21:19:23: [AMXX] Run time error 10: native error (native "rg_add_account")
L 05/31/2020 - 21:19:23: [AMXX] [0] DüzenliPara.sma::fwdRoundStart (line 27)
L 05/31/2020 - 21:24:28: [ReAPI] rg_add_account: player 8 is not connected
L 05/31/2020 - 21:24:28: [AMXX] Displaying debug trace (plugin "DüzenliPara.amxx", version "1.1")
L 05/31/2020 - 21:24:28: [AMXX] Run time error 10: native error (native "rg_add_account")
L 05/31/2020 - 21:24:28: [AMXX] [0] DüzenliPara.sma::fwdRoundStart (line 27)
L 05/31/2020 - 21:25:09: [ReAPI] rg_add_account: player 8 is not connected
L 05/31/2020 - 21:25:09: [AMXX] Displaying debug trace (plugin "DüzenliPara.amxx", version "1.1")
L 05/31/2020 - 21:25:09: [AMXX] Run time error 10: native error (native "rg_add_account")
L 05/31/2020 - 21:25:09: [AMXX] [0] DüzenliPara.sma::fwdRoundStart (line 27)
L 05/31/2020 - 21:26:27: [ReAPI] rg_add_account: player 26 is not connected
L 05/31/2020 - 21:26:27: [AMXX] Displaying debug trace (plugin "DüzenliPara.amxx", version "1.1")
L 05/31/2020 - 21:26:27: [AMXX] Run time error 10: native error (native "rg_add_account")
L 05/31/2020 - 21:26:27: [AMXX] [0] DüzenliPara.sma::fwdRoundStart (line 27)
[/HIDE]CSD Mod X Core 1.10.0.12 (http://www.csduragi.com)
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 12 2020 02:59:10
Built from: https://github.com/alliedmodders/amxmodx/commit/3ec1165
Build ID: 12:3ec1165
Core mode: JIT+ASM32
Metamod-r v1.3.0.1+m, API (5:13)
Metamod-r build: 22:32:55 Mar 10 2020
[ 1] SQLite 1.10.0.12 AMX Mod X Dev Team running
[ 2] Fun 1.10.0.12 AMX Mod X Dev Team running
[ 3] Engine 1.10.0.12 AMX Mod X Dev Team running
[ 4] FakeMeta 1.10.0.12 AMX Mod X Dev Team running
[ 5] nVault 1.10.0.12 AMX Mod X Dev Team running
[ 6] CStrike 1.10.0.12 AMX Mod X Dev Team running
[ 7] CSX 1.10.0.12 AMX Mod X Dev Team running
[ 8] Ham Sandwich 1.10.0.12 AMX Mod X Dev Team running
[ 9] ReAPI 5.12.0.192 Asmodai & s1lent running
[10] ReAimDetector 0.1.7 ReHLDS Team running
10 modules, 10 correct