В общем вот такая простыня получилась. Протестил вогнав F35 в зенитку
#Fight with rammers
On Spawn; Set %server_last_used_weapon[%p%]% 0
On Kill; Set %server_last_used_weapon[%p%]% %w%
On Suicide; Weapon Gameplay/Vehicles/F35/F35B,Gameplay/Vehicles/A-10_THUNDERBOLT/A10_THUNDERBOLT,Gameplay/Vehicles/AH1Z/AH1Z,Gameplay/Vehicles/AH6/AH6_Littlebird,Gameplay/Vehicles/M1A2/M1Abrams,Gameplay/Vehicles/LAV25/LAV25,Gameplay/Vehicles/LAV25/LAV_AD,SoldierCollision
Set %server_ram_victim[%ptk%]% %p%; Set %server_ram_time[%ptk%]% %hms%; Set %server_ram_vehicle[%ptk%]% %w%
Set %server_ram_message% "POSSIBLE RAMMING: V1: %server_ram_victim[1]% VH1: %server_ram_vehicle[1]% W1: %server_last_used_weapon[%server_ram_victim[1]%]% V2:%server_ram_victim[2]% VH2:%server_ram_vehicle[2]% W2: %server_last_used_weapon[%server_ram_victim[2]%]%"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% == %server_ram_vehicle[2]%; If %server_ram_vehicle[1]% == "F-35 Stealth Jet";If %server_last_used_weapon[%server_ram_victim[1]%] != 0; If %server_last_used_weapon[%server_ram_victim[1]%]% != %server_ram_vehicle[1]; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[2]% killed %server_ram_victim[1]% with [%server_ram_vehicle[1]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% == %server_ram_vehicle[2]%; If %server_ram_vehicle[1]% == "F-35 Stealth Jet";If %server_last_used_weapon[%server_ram_victim[2]%] != 0; If %server_last_used_weapon[%server_ram_victim[2]%]% != %server_ram_vehicle[1]; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[1]% killed %server_ram_victim[2]% with [%server_ram_vehicle[1]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% == %server_ram_vehicle[2]%; If %server_ram_vehicle[1]% != "F-35 Stealth Jet";If %server_last_used_weapon[%server_ram_victim[1]%] != 0; If %server_last_used_weapon[%server_ram_victim[1]%]% != %server_ram_vehicle[1]; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[2]% killed %server_ram_victim[1]% with [%server_ram_vehicle[1]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% == %server_ram_vehicle[2]%; If %server_ram_vehicle[1]% != "F-35 Stealth Jet";If %server_last_used_weapon[%server_ram_victim[2]%] != 0; If %server_last_used_weapon[%server_ram_victim[2]%]% != %server_ram_vehicle[1]; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[1]% killed %server_ram_victim[2]% with [%server_ram_vehicle[1]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% == %server_ram_vehicle[2]%; If %server_ram_vehicle[1]% == "A-10 Thunderbolt Attack Jet";If %server_last_used_weapon[%server_ram_victim[1]%] != 0; If %server_last_used_weapon[%server_ram_victim[1]%]% != %server_ram_vehicle[1]; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[2]% killed %server_ram_victim[1]% with [%server_ram_vehicle[1]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% == %server_ram_vehicle[2]%; If %server_ram_vehicle[1]% == "A-10 Thunderbolt Attack Jet";If %server_last_used_weapon[%server_ram_victim[2]%] != 0; If %server_last_used_weapon[%server_ram_victim[2]%]% != %server_ram_vehicle[1]; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[1]% killed %server_ram_victim[2]% with [%server_ram_vehicle[1]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% == %server_ram_vehicle[2]%; If %server_ram_vehicle[1]% != "A-10 Thunderbolt Attack Jet";If %server_last_used_weapon[%server_ram_victim[1]%] != 0; If %server_last_used_weapon[%server_ram_victim[1]%]% != %server_ram_vehicle[1]; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[2]% killed %server_ram_victim[1]% with [%server_ram_vehicle[1]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% == %server_ram_vehicle[2]%; If %server_ram_vehicle[1]% != "A-10 Thunderbolt Attack Jet";If %server_last_used_weapon[%server_ram_victim[2]%] != 0; If %server_last_used_weapon[%server_ram_victim[2]%]% != %server_ram_vehicle[1]; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[1]% killed %server_ram_victim[2]% with [%server_ram_vehicle[1]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% != %server_ram_vehicle[2]%; If %server_ram_vehicle[1]% != "Soldier collision"; If %server_ram_vehicle[1]% == "F-35 Stealth Jet"; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[2]% killed %server_ram_victim[1]% with [%server_ram_vehicle[1]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% != %server_ram_vehicle[2]%; If %server_ram_vehicle[1]% != "Soldier collision"; If %server_ram_vehicle[2]% == "F-35 Stealth Jet"; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[1]% killed %server_ram_victim[2]% with [%server_ram_vehicle[2]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% != %server_ram_vehicle[2]%; If %server_ram_vehicle[1]% == "Soldier collision"; If %server_ram_vehicle[2]% == "F-35 Stealth Jet"; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[2]% killed %server_ram_victim[1]% with [%server_ram_vehicle[2]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% != %server_ram_vehicle[2]%; If %server_ram_vehicle[2]% == "Soldier collision"; If %server_ram_vehicle[1]% == "F-35 Stealth Jet"; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[1]% killed %server_ram_victim[2]% with [%server_ram_vehicle[1]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% != %server_ram_vehicle[2]%; If %server_ram_vehicle[1]% != "Soldier collision"; If %server_ram_vehicle[1]% == "A-10 Thunderbolt Attack Jet"; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[2]% killed %server_ram_victim[1]% with [%server_ram_vehicle[1]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% != %server_ram_vehicle[2]%; If %server_ram_vehicle[1]% != "Soldier collision"; If %server_ram_vehicle[2]% == "A-10 Thunderbolt Attack Jet"; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[1]% killed %server_ram_victim[2]% with [%server_ram_vehicle[2]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% != %server_ram_vehicle[2]%; If %server_ram_vehicle[1]% == "Soldier collision"; If %server_ram_vehicle[2]% == "A-10 Thunderbolt Attack Jet"; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[2]% killed %server_ram_victim[1]% with [%server_ram_vehicle[2]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% != %server_ram_vehicle[2]%; If %server_ram_vehicle[2]% == "Soldier collision"; If %server_ram_vehicle[1]% == "A-10 Thunderbolt Attack Jet"; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[1]% killed %server_ram_victim[2]% with [%server_ram_vehicle[1]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; AdminSay %server_ram_message%
If %server_ram_time[1]% == %server_ram_time[2]%; Log %server_ram_message%
If %server_ram_time[1]% == %server_ram_time[2]%; Log POSSIBLE RAMMING: V1: %server_ram_victim[1]% T1: %server_ram_time[1]% VH1: %server_ram_vehicle[1]% W1: %server_last_wpn[%server_ram_victim[1]%]% V2:%server_ram_victim[2]% T2:%server_ram_time[2]% VH2:%server_ram_vehicle[2]% W2: %server_last_wpn[%server_ram_victim[2]%]%
В логе и в чатике получил:
cat 20180925_plugin.log |grep RAMMING
[18:40:06] ProconRulz: RAMMING DETECTED: BlitzKrieg killed Lemur-73 with [F-35 Stealth Jet]
[18:40:06] ProconRulz: POSSIBLE RAMMING: V1: BlitzKrieg T1: 18:40:06 VH1: LAV-25 Anti Air W1: 0 V2:Lemur-73 T2:18:40:06 VH2:F-35 Stealth Jet W2: 0
Второе пока для отладки, чтобы концы с концами потом свести.
Если у кого есть мысли как сделать покрасивее (куча If напрягает), помогите пожалуйста. Знаю, что если расположить If с Soldier collision самым первым, то можно сильно укоротить правило, но смысла особого нет.
#Fight with rammers
On Spawn; Set %server_last_used_weapon[%p%]% 0
On Kill; Set %server_last_used_weapon[%p%]% %w%
On Suicide; Weapon Gameplay/Vehicles/F35/F35B,Gameplay/Vehicles/A-10_THUNDERBOLT/A10_THUNDERBOLT,Gameplay/Vehicles/AH1Z/AH1Z,Gameplay/Vehicles/AH6/AH6_Littlebird,Gameplay/Vehicles/M1A2/M1Abrams,Gameplay/Vehicles/LAV25/LAV25,Gameplay/Vehicles/LAV25/LAV_AD,SoldierCollision
Set %server_ram_victim[%ptk%]% %p%; Set %server_ram_time[%ptk%]% %hms%; Set %server_ram_vehicle[%ptk%]% %w%
Set %server_ram_message% "POSSIBLE RAMMING: V1: %server_ram_victim[1]% VH1: %server_ram_vehicle[1]% W1: %server_last_used_weapon[%server_ram_victim[1]%]% V2:%server_ram_victim[2]% VH2:%server_ram_vehicle[2]% W2: %server_last_used_weapon[%server_ram_victim[2]%]%"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% == %server_ram_vehicle[2]%; If %server_ram_vehicle[1]% == "F-35 Stealth Jet";If %server_last_used_weapon[%server_ram_victim[1]%] != 0; If %server_last_used_weapon[%server_ram_victim[1]%]% != %server_ram_vehicle[1]; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[2]% killed %server_ram_victim[1]% with [%server_ram_vehicle[1]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% == %server_ram_vehicle[2]%; If %server_ram_vehicle[1]% == "F-35 Stealth Jet";If %server_last_used_weapon[%server_ram_victim[2]%] != 0; If %server_last_used_weapon[%server_ram_victim[2]%]% != %server_ram_vehicle[1]; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[1]% killed %server_ram_victim[2]% with [%server_ram_vehicle[1]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% == %server_ram_vehicle[2]%; If %server_ram_vehicle[1]% != "F-35 Stealth Jet";If %server_last_used_weapon[%server_ram_victim[1]%] != 0; If %server_last_used_weapon[%server_ram_victim[1]%]% != %server_ram_vehicle[1]; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[2]% killed %server_ram_victim[1]% with [%server_ram_vehicle[1]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% == %server_ram_vehicle[2]%; If %server_ram_vehicle[1]% != "F-35 Stealth Jet";If %server_last_used_weapon[%server_ram_victim[2]%] != 0; If %server_last_used_weapon[%server_ram_victim[2]%]% != %server_ram_vehicle[1]; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[1]% killed %server_ram_victim[2]% with [%server_ram_vehicle[1]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% == %server_ram_vehicle[2]%; If %server_ram_vehicle[1]% == "A-10 Thunderbolt Attack Jet";If %server_last_used_weapon[%server_ram_victim[1]%] != 0; If %server_last_used_weapon[%server_ram_victim[1]%]% != %server_ram_vehicle[1]; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[2]% killed %server_ram_victim[1]% with [%server_ram_vehicle[1]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% == %server_ram_vehicle[2]%; If %server_ram_vehicle[1]% == "A-10 Thunderbolt Attack Jet";If %server_last_used_weapon[%server_ram_victim[2]%] != 0; If %server_last_used_weapon[%server_ram_victim[2]%]% != %server_ram_vehicle[1]; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[1]% killed %server_ram_victim[2]% with [%server_ram_vehicle[1]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% == %server_ram_vehicle[2]%; If %server_ram_vehicle[1]% != "A-10 Thunderbolt Attack Jet";If %server_last_used_weapon[%server_ram_victim[1]%] != 0; If %server_last_used_weapon[%server_ram_victim[1]%]% != %server_ram_vehicle[1]; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[2]% killed %server_ram_victim[1]% with [%server_ram_vehicle[1]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% == %server_ram_vehicle[2]%; If %server_ram_vehicle[1]% != "A-10 Thunderbolt Attack Jet";If %server_last_used_weapon[%server_ram_victim[2]%] != 0; If %server_last_used_weapon[%server_ram_victim[2]%]% != %server_ram_vehicle[1]; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[1]% killed %server_ram_victim[2]% with [%server_ram_vehicle[1]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% != %server_ram_vehicle[2]%; If %server_ram_vehicle[1]% != "Soldier collision"; If %server_ram_vehicle[1]% == "F-35 Stealth Jet"; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[2]% killed %server_ram_victim[1]% with [%server_ram_vehicle[1]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% != %server_ram_vehicle[2]%; If %server_ram_vehicle[1]% != "Soldier collision"; If %server_ram_vehicle[2]% == "F-35 Stealth Jet"; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[1]% killed %server_ram_victim[2]% with [%server_ram_vehicle[2]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% != %server_ram_vehicle[2]%; If %server_ram_vehicle[1]% == "Soldier collision"; If %server_ram_vehicle[2]% == "F-35 Stealth Jet"; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[2]% killed %server_ram_victim[1]% with [%server_ram_vehicle[2]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% != %server_ram_vehicle[2]%; If %server_ram_vehicle[2]% == "Soldier collision"; If %server_ram_vehicle[1]% == "F-35 Stealth Jet"; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[1]% killed %server_ram_victim[2]% with [%server_ram_vehicle[1]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% != %server_ram_vehicle[2]%; If %server_ram_vehicle[1]% != "Soldier collision"; If %server_ram_vehicle[1]% == "A-10 Thunderbolt Attack Jet"; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[2]% killed %server_ram_victim[1]% with [%server_ram_vehicle[1]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% != %server_ram_vehicle[2]%; If %server_ram_vehicle[1]% != "Soldier collision"; If %server_ram_vehicle[2]% == "A-10 Thunderbolt Attack Jet"; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[1]% killed %server_ram_victim[2]% with [%server_ram_vehicle[2]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% != %server_ram_vehicle[2]%; If %server_ram_vehicle[1]% == "Soldier collision"; If %server_ram_vehicle[2]% == "A-10 Thunderbolt Attack Jet"; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[2]% killed %server_ram_victim[1]% with [%server_ram_vehicle[2]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; If %server_ram_vehicle[1]% != %server_ram_vehicle[2]%; If %server_ram_vehicle[2]% == "Soldier collision"; If %server_ram_vehicle[1]% == "A-10 Thunderbolt Attack Jet"; Set %server_ram_message% "RAMMING DETECTED: %server_ram_victim[1]% killed %server_ram_victim[2]% with [%server_ram_vehicle[1]%]"
If %server_ram_time[1]% == %server_ram_time[2]%; AdminSay %server_ram_message%
If %server_ram_time[1]% == %server_ram_time[2]%; Log %server_ram_message%
If %server_ram_time[1]% == %server_ram_time[2]%; Log POSSIBLE RAMMING: V1: %server_ram_victim[1]% T1: %server_ram_time[1]% VH1: %server_ram_vehicle[1]% W1: %server_last_wpn[%server_ram_victim[1]%]% V2:%server_ram_victim[2]% T2:%server_ram_time[2]% VH2:%server_ram_vehicle[2]% W2: %server_last_wpn[%server_ram_victim[2]%]%
В логе и в чатике получил:
cat 20180925_plugin.log |grep RAMMING
[18:40:06] ProconRulz: RAMMING DETECTED: BlitzKrieg killed Lemur-73 with [F-35 Stealth Jet]
[18:40:06] ProconRulz: POSSIBLE RAMMING: V1: BlitzKrieg T1: 18:40:06 VH1: LAV-25 Anti Air W1: 0 V2:Lemur-73 T2:18:40:06 VH2:F-35 Stealth Jet W2: 0
Второе пока для отладки, чтобы концы с концами потом свести.
Если у кого есть мысли как сделать покрасивее (куча If напрягает), помогите пожалуйста. Знаю, что если расположить If с Soldier collision самым первым, то можно сильно укоротить правило, но смысла особого нет.