Raised This Month: $ Target: $400
 0% 

add the access flag


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
anakonda001
Member
Join Date: Jul 2020
Old 08-17-2020 , 03:19   add the access flag
Reply With Quote #1

hi all, can I please make the plugin work on the flag
Code:
#include <amxmodx>

#define NEW_SPRITE "sprites/muzzleflash67.spr"

new g_sModelIndexExp;
new g_sModelIndexExp2;
new g_sModelIndexFireball2;
new g_sModelIndexFireball3;
public plugin_init()
{
    register_plugin("[CS] HE grenade Sprite", "1.0", "Doc.Batcon");
    register_message(SVC_TEMPENTITY, "MsgHook_SVC_TEMPENTITY");
}
public plugin_precache()
{
    g_sModelIndexFireball2 = precache_model("sprites/eexplo.spr");
    g_sModelIndexFireball3 = precache_model("sprites/fexplo.spr");
    g_sModelIndexExp = precache_model(NEW_SPRITE);
}
public MsgHook_SVC_TEMPENTITY(iMsgID, iMsgDest, pClient)
{
    if (iMsgDest != MSG_PAS)
        return;

    if (get_msg_arg_int(1) != TE_EXPLOSION)
        return;

    static sNewModelIndex; sNewModelIndex = -1;
    static sModelIndex; sModelIndex = get_msg_arg_int(5);

    if (sModelIndex == g_sModelIndexFireball2)
        sNewModelIndex = g_sModelIndexExp
    else if (sModelIndex == g_sModelIndexFireball3)
        sNewModelIndex = g_sModelIndexExp2

    // CSSDK | HE Grenade framerate = 30
    if (get_msg_arg_int(7) != 30)
        return;

    if (sNewModelIndex != -1)
        set_msg_arg_int(5, ARG_SHORT, sNewModelIndex)
}
anakonda001 is offline
 



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 13:44.


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