Raised This Month: $32 Target: $400
 8% 

At the request of [Without Reapi]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MayroN
Senior Member
Join Date: Aug 2017
Location: Kyiv
Old 06-06-2020 , 07:50   At the request of [Without Reapi]
Reply With Quote #1

I was asked to help remove the Include Reapi from 2 Codes, so that everything would work.
I started and stuck with some areas

Where there are sticks (//) - closed the lines under Reapi, and right at the top / bottom the correct line in my opinion

Motd_model
Error in this line
PHP Code:
if( menuType != VGUI_Menu_Team 
Killer_Effect
Errors in these lines (for killing, with a grenade, and FOV)
PHP Code:
if(get_user_name(iVictimm_bHeadshotKilled))
else if(
get_user_name(iVictimm_bKilledByGrenade))
if(
get_user_name(numaram_iFOV) == 90)
else if(
get_user_name(idm_iFOV) != 90
Kindly gentlemen

motd_model
PHP Code:
#include <amxmodx>
#include <fakemeta> 
//#include < reapi >

enum
{
    
MOTD_STATE_BEGIN,
    
MOTD_STATE_INTRO,
    
MOTD_STATE_END
};

new 
g_iMotdState33 ];
//new g_iMotdState[ MAX_PLAYERS + 1 ];

new const MOTD_MODEL[ ]   =  "models/multimod/multimod_model.mdl";

public 
plugin_precache( )
{
    
precache_modelMOTD_MODEL );
}

public 
plugin_init( )
{
      
register_message(get_user_msgid("ShowMenu"), "hook_HandleMenuChooseTeam");
      
register_message(get_user_msgid("VGUIMenu"), "hook_ShowVGUIMenu");

    
//RegisterHookChain( RG_ShowVGUIMenu, "hook_ShowVGUIMenu", .post = true );
    //RegisterHookChain( RG_HandleMenu_ChooseTeam, "hook_HandleMenuChooseTeam", .post = true );
}

//public client_disconnected( id )
public client_disconnectid )
{
    
func_StopShowingMotdid );
    
    
g_iMotdStateid ] = MOTD_STATE_BEGIN;
}

public 
hook_ShowVGUIMenu( const idVGUIMenumenuType, const bitsSlots, const szOldMenu[ ] )
{
    if( 
menuType != VGUI_Menu_Team )
    {
        return 
PLUGIN_CONTINUE;
       
//return HC_CONTINUE;
    
}
    
    
func_StartShowingMotdid );

    return 
PLUGIN_CONTINUE;
    
//return HC_CONTINUE;
}

public 
hook_HandleMenuChooseTeam( const id, const MenuChooseTeamslot )
{
    
func_StopShowingMotdid );
}

func_StartShowingMotd( const id )
{
    if( 
g_iMotdStateid ] == MOTD_STATE_BEGIN )
    {
        
g_iMotdStateid ] = MOTD_STATE_INTRO;
        
        
set_pevidpev_viewmodelMOTD_MODEL );
        
//set_entvar( id, var_viewmodel, MOTD_MODEL );
    
}
}

func_StopShowingMotd( const id )
{
    if( 
g_iMotdStateid ] == MOTD_STATE_INTRO )
    {
        
g_iMotdStateid ] = MOTD_STATE_END;
        
        
set_pevidpev_viewmodel"" );
        
//set_entvar( id, var_viewmodel, "" );
    
}

Killer_Effect
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <ColorChat>
//#include <reapi>


#define PLUGIN "Killer_Effect"
#define VERSION "3.2"
#define AUTHOR "Yek'-ta"

#define SHOWTIME 1.5  //it should be float

#define HUD_HIDE_FLASH (1<<1)
#define HUD_HIDE_CROSS (1<<6)
#define HUD_DRAW_CROSS (1<<7)

#define CSW_SHIELD  2
new isitON[33]
new 
kills[33]


new 
boolPlayerOnOff[33]
//new bool: PlayerOnOff[MAX_PLAYERS]


enum _:MESSAGES {
    
g_iMsg_WeaponList,
    
g_iMsg_ScreenFade,
    
g_iMsg_CurWeapon,
    
g_iMsg_SetFOV,
    
g_iMsg_HideWeapon,
    
g_iMsg_Crosshair
}
new 
g_Messages[MESSAGES];
new 
g_Messages_Name[MESSAGES][] = {
    
"WeaponList",
    
"ScreenFade",
    
"CurWeapon",
    
"SetFOV",
    
"HideWeapon",
    
"Crosshair"
}

public 
plugin_init(){

    
register_plugin(PLUGINVERSIONAUTHOR)
    for(new 
isizeof g_Messagesi++){
        
g_Messages[i] = get_user_msgid(g_Messages_Name[i]);
    }

    
RegisterHam(Ham_Spawn"player""CBasePlayer_Spawn"true);
    
RegisterHam(Ham_Killed"player""CBasePlayer_Killed"true);
    
//RegisterHookChain(RG_CBasePlayer_Spawn, "CBasePlayer_Spawn",true);
    //RegisterHookChain(RG_CBasePlayer_Killed, "CBasePlayer_Killed", true);

    
register_event("CurWeapon","comboHudGoster","be""1=1")
    
register_clcmd("say /combosprite""comboonoff");
}
public 
comboonoff(id){
    
PlayerOnOff[id] = !PlayerOnOff[id]
    
ColorChat(idRED"^1Combo Sprite is ^3%s"PlayerOnOff[id] ? "ON" "OFF")
    
//client_print_color(id, id, "^1Combo Sprite is ^3%s", PlayerOnOff[id] ? "ON" : "OFF")
}
public 
plugin_precache(){
    
precache_model("sprites/yek_combo/alarm_kill.spr")
    
precache_model("sprites/yek_combo/alarm_2kill.spr")
    
precache_model("sprites/yek_combo/alarm_3kill.spr")
    
precache_model("sprites/yek_combo/alarm_4kill.spr")
    
precache_model("sprites/yek_combo/alarm_5kill.spr")
    
precache_model("sprites/yek_combo/alarm_6kill.spr")
    
precache_model("sprites/yek_combo/alarm_7kill.spr")
    
precache_model("sprites/yek_combo/alarm_8kill.spr")
    
precache_model("sprites/yek_combo/alarm_knife.spr")
    
precache_model("sprites/yek_combo/alarm_combo.spr")
    
precache_model("sprites/yek_combo/alarm_grenade.spr")
    
precache_model("sprites/yek_combo/alarm_headshot.spr")
    
precache_generic("sprites/yek_combo/alarm_kill.txt")
    
precache_generic("sprites/yek_combo/alarm_2kill.txt")
    
precache_generic("sprites/yek_combo/alarm_3kill.txt")
    
precache_generic("sprites/yek_combo/alarm_4kill.txt")
    
precache_generic("sprites/yek_combo/alarm_5kill.txt")
    
precache_generic("sprites/yek_combo/alarm_6kill.txt")
    
precache_generic("sprites/yek_combo/alarm_7kill.txt")
    
precache_generic("sprites/yek_combo/alarm_8kill.txt")
    
precache_generic("sprites/yek_combo/alarm_knife.txt")
    
precache_generic("sprites/yek_combo/alarm_combo.txt")
    
precache_generic("sprites/yek_combo/alarm_grenade.txt")
    
precache_generic("sprites/yek_combo/alarm_headshot.txt")
}
public 
client_putinserver(id){
    
PlayerOnOff[id] = true;
    
kills[id] = 0;
}
public 
CBasePlayer_Killed(iVictimiKiller)
{
    if(!
is_user_connected(iKiller) || iVictim == iKiller)
        return 
PLUGIN_CONTINUE;
        
//return HC_CONTINUE;

    
kills[iVictim] = 0
    kills
[iKiller] += 1;

    if(!
PlayerOnOff[iKiller])
        return 
PLUGIN_CONTINUE;
        
//return HC_CONTINUE;

    
remove_task(1997+iKiller);

    if(
get_user_name(iVictimm_bHeadshotKilled))
    
//if(get_member(iVictim, m_bHeadshotKilled))

        
isitON[iKiller] = -1;

    else if(
get_user_name(iVictimm_bKilledByGrenade))
    
//else if(get_member(iVictim, m_bKilledByGrenade))

        
isitON[iKiller] = -2;
    else if(
get_user_weapon(iKiller) == CSW_KNIFE)
        
isitON[iKiller] = -3;
    else
        
isitON[iKiller] = kills[iKiller];

    
comboHudGoster(iKiller)
    
set_task(SHOWTIME,"RemoveHUD",1997+iKiller);

        return 
PLUGIN_CONTINUE;
        
//return HC_CONTINUE;
}
public 
RemoveHUD(numara){
    
numara numara-1997
    
if(get_user_name(numaram_iFOV) == 90){
        
isitON[numara] = 0;
        
Hide_NormalCrosshair(numara0);
        
show_crosshair(numara0)
    }
    else {
        
set_task(1.0,"RemoveHUD",1997+numara);
    }
}
public 
CBasePlayer_Spawn(oyuncu){
    
kills[oyuncu] = 0;
}
public 
comboHudGoster(id){
    if(
isitON[id] == 0){
        return 
PLUGIN_HANDLED
    
}
    else if(
get_user_name(idm_iFOV) != 90){
        return 
PLUGIN_HANDLED
    
}
    static 
userwpnprimsprtxt[52]
    
userwpn get_user_weapon(idprim)

    switch (
isitON[id])
    {
        case -
3: { formatex(sprtxt,charsmax(sprtxt),"yek_combo/alarm_knife"); }
        case -
2: { formatex(sprtxt,charsmax(sprtxt),"yek_combo/alarm_grenade"); }
        case -
1: { formatex(sprtxt,charsmax(sprtxt),"yek_combo/alarm_headshot"); }
        case 
1: { formatex(sprtxt,charsmax(sprtxt),"yek_combo/alarm_kill"); }
        case 
2: { formatex(sprtxt,charsmax(sprtxt),"yek_combo/alarm_2kill"); }
        case 
3: { formatex(sprtxt,charsmax(sprtxt),"yek_combo/alarm_3kill"); }
        case 
4: { formatex(sprtxt,charsmax(sprtxt),"yek_combo/alarm_4kill"); }
        case 
5: { formatex(sprtxt,charsmax(sprtxt),"yek_combo/alarm_5kill"); }
        case 
6: { formatex(sprtxt,charsmax(sprtxt),"yek_combo/alarm_6kill"); }
        case 
7: { formatex(sprtxt,charsmax(sprtxt),"yek_combo/alarm_7kill"); }
        case 
8: { formatex(sprtxt,charsmax(sprtxt),"yek_combo/alarm_8kill"); }
        default: { 
formatex(sprtxt,charsmax(sprtxt),"yek_combo/alarm_combo"); }
    }
    switch (
userwpn)
    {
        case 
CSW_P228: { Msg_WeaponList(idsprtxt,9,52,-1,-1,0,11,CSW_SHIELD,0);Hide_NormalCrosshair(id0); }
        case 
CSW_HEGRENADE: { Msg_WeaponList(idsprtxt,12,1,-1,-1,0,11,CSW_SHIELD,0);Hide_NormalCrosshair(id0); }
        case 
CSW_XM1014: { Msg_WeaponList(idsprtxt,5,32,-1,-1,0,11,CSW_SHIELD,0);Hide_NormalCrosshair(id0); }
        case 
CSW_C4: { Msg_WeaponList(idsprtxt,14,1,-1,-1,0,11,CSW_SHIELD,0);Hide_NormalCrosshair(id0); }
        case 
CSW_MAC10: { Msg_WeaponList(idsprtxt,6,100,-1,-1,0,11,CSW_SHIELD,0);Hide_NormalCrosshair(id0); }
        case 
CSW_AUG: { Msg_WeaponList(idsprtxt,4,90,-1,-1,0,11,CSW_SHIELD,0);Hide_NormalCrosshair(id0); }
        case 
CSW_SMOKEGRENADE: { Msg_WeaponList(idsprtxt,13,1,-1,-1,0,11,CSW_SHIELD,0);Hide_NormalCrosshair(id0); }
        case 
CSW_ELITE: { Msg_WeaponList(idsprtxt,10,120,-1,-1,0,11,CSW_SHIELD,0);Hide_NormalCrosshair(id0); }
        case 
CSW_FIVESEVEN: { Msg_WeaponList(idsprtxt,7,100,-1,-1,0,11,CSW_SHIELD,0);Hide_NormalCrosshair(id0); }
        case 
CSW_UMP45: { Msg_WeaponList(idsprtxt,6,100,-1,-1,0,11,CSW_SHIELD,0);Hide_NormalCrosshair(id0); }
        case 
CSW_GALIL: { Msg_WeaponList(idsprtxt,4,90,-1,-1,0,11,CSW_SHIELD,0);Hide_NormalCrosshair(id0); }
        case 
CSW_FAMAS: { Msg_WeaponList(idsprtxt,4,90,-1,-1,0,11,CSW_SHIELD,0);Hide_NormalCrosshair(id0); }
        case 
CSW_USP: { Msg_WeaponList(idsprtxt,6,100,-1,-1,0,11,CSW_SHIELD,0);Hide_NormalCrosshair(id0); }
        case 
CSW_GLOCK18: { Msg_WeaponList(idsprtxt,10,120,-1,-1,0,11,CSW_SHIELD,0);Hide_NormalCrosshair(id0); }
        case 
CSW_MP5NAVY: { Msg_WeaponList(idsprtxt,10,120,-1,-1,0,11,CSW_SHIELD,0);Hide_NormalCrosshair(id0); }
        case 
CSW_M249: { Msg_WeaponList(idsprtxt,3,200,-1,-1,0,11,CSW_SHIELD,0);Hide_NormalCrosshair(id0); }
        case 
CSW_M3: {Msg_WeaponList(idsprtxt,5,32,-1,-1,0,11,CSW_SHIELD,0);Hide_NormalCrosshair(id0); }
        case 
CSW_M4A1: { Msg_WeaponList(idsprtxt,4,90,-1,-1,0,11,CSW_SHIELD,0);Hide_NormalCrosshair(id0); }
        case 
CSW_TMP: { Msg_WeaponList(idsprtxt,10,120,-1,-1,0,11,CSW_SHIELD,0);Hide_NormalCrosshair(id0); }
        case 
CSW_FLASHBANG: { Msg_WeaponList(idsprtxt,11,2,-1,-1,0,11,CSW_SHIELD,0);Hide_NormalCrosshair(id0); }
        case 
CSW_DEAGLE: { Msg_WeaponList(idsprtxt,8,35,-1,-1,0,11,CSW_SHIELD,0);Hide_NormalCrosshair(id0); }
        case 
CSW_SG552: { Msg_WeaponList(idsprtxt,4,90,-1,-1,0,11,CSW_SHIELD,0);Hide_NormalCrosshair(id0); }
        case 
CSW_AK47: { Msg_WeaponList(idsprtxt,2,90,-1,-1,0,11,CSW_SHIELD,0);Hide_NormalCrosshair(id0); }
        case 
CSW_KNIFE:{ Msg_WeaponList(idsprtxt,-1,-1,-1,-1,0,11,CSW_SHIELD,0);Hide_NormalCrosshair(id0); }
        case 
CSW_P90: { Msg_WeaponList(idsprtxt,7,100,-1,-1,0,11,CSW_SHIELD,0);Hide_NormalCrosshair(id0); }
        case 
CSW_SCOUT: { Msg_WeaponList(idsprtxt,2,90,-1,-1,0,11,CSW_SHIELD,0);Hide_NormalCrosshair(id1); }
        case 
CSW_AWP: { Msg_WeaponList(idsprtxt,1,30,-1,-1,0,11,CSW_SHIELD,0);Hide_NormalCrosshair(id1); }
        case 
CSW_SG550: { Msg_WeaponList(idsprtxt,4,90,-1,-1,0,11,CSW_SHIELD,0);Hide_NormalCrosshair(id1); }
        case 
CSW_G3SG1: { Msg_WeaponList(idsprtxt,2,90,-1,-1,0,11,CSW_SHIELD,0);Hide_NormalCrosshair(id1); }
    }
    
Msg_SetFOV(id89);
    
Msg_CurWeapon(id1,CSW_SHIELD,prim);
    
Msg_SetFOV(id90);
    return 
PLUGIN_CONTINUE
}
stock Hide_NormalCrosshair(idflag){
    if(
flag == 1){
        
message_begin(MSG_ONEg_Messages[g_iMsg_HideWeapon], _id);
        
write_byte(HUD_HIDE_CROSS HUD_HIDE_FLASH);
        
message_end();
    }
    else{
        
message_begin(MSG_ONEg_Messages[g_iMsg_HideWeapon], _id);
        
write_byte(HUD_DRAW_CROSS HUD_HIDE_FLASH);
        
message_end();
    }
}
stock show_crosshair(idflag){
    
message_begin(MSG_ONE_UNRELIABLEg_Messages[g_iMsg_Crosshair], _id);
    
write_byte(flag);
    
message_end();
}
stock Msg_CurWeapon(idIsActive,WeaponID,ClipAmmo){
    
message_begin(MSG_ONE,g_Messages[g_iMsg_CurWeapon], {0,0,0}, id);
    
write_byte(IsActive);
    
write_byte(WeaponID);
    
write_byte(ClipAmmo);

    
message_end();
}
stock Msg_WeaponList(id, const WeaponName[],PrimaryAmmoID,PrimaryAmmoMaxAmount,SecondaryAmmoID,
SecondaryAmmoMaxAmount,SlotID,NumberInSlot,WeaponID,Flags){
    
message_begin(MSG_ONE,g_Messages[g_iMsg_WeaponList], {0,0,0}, id);
    
write_string(WeaponName);
    
write_byte(PrimaryAmmoID);
    
write_byte(PrimaryAmmoMaxAmount);
    
write_byte(SecondaryAmmoID);
    
write_byte(SecondaryAmmoMaxAmount);
    
write_byte(SlotID);
    
write_byte(NumberInSlot);
    
write_byte(WeaponID);
    
write_byte(Flags);
    
message_end();
}

stock Msg_SetFOV(idDegrees){
    
message_begin(MSG_ONE,g_Messages[g_iMsg_SetFOV], {0,0,0}, id);
    
write_byte(Degrees);
    
message_end();


Last edited by MayroN; 06-06-2020 at 07:53.
MayroN is offline
Send a message via ICQ to MayroN Send a message via Skype™ to MayroN
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 06-06-2020 , 08:18   Re: At the request of [Without Reapi]
Reply With Quote #2

This may help.
https://forums.alliedmods.net/showpo...01#post1712101

You can probably get m_iFOV and m_bKilledByGrenade with get_pdata_int.
__________________
GitHub
SteamWishlist

六四天安門事件
+ARUKARI- is offline
MayroN
Senior Member
Join Date: Aug 2017
Location: Kyiv
Old 07-18-2020 , 20:03   Re: At the request of [Without Reapi]
Reply With Quote #3

Please...

UP
__________________
МультиМод CS 83.222.97.124:27015

MayroN is offline
Send a message via ICQ to MayroN Send a message via Skype™ to MayroN
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 07-19-2020 , 08:04   Re: At the request of [Without Reapi]
Reply With Quote #4

Quote:
Originally Posted by MayroN View Post
Please...

UP
What are you pleasing about? You already got an answer which you haven't responded to.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:21.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode