1. sayfa (Toplam 1 sayfa)

Hatalari Duzeltirmisiniz.

Gönderilme zamanı: Pzr Mar 19, 2017 2:09 pm
gönderen NumanKaya
Sonuç
Eklenti derleme sonucu aşağıdaki gibidir;
AMX Mod X Compiler 1.8.3-dev+5079
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team

/home/csserverlar/213.238.173.4-cs4com//cstrike/addons/amxmodx/scripting/c4_timer.sma(64) : warning 204: symbol is assigned a value that is never used: "env_sprite"
Header size: 816 bytes
Code size: 1808 bytes
Data size: 800 bytes
Stack/heap size: 16384 bytes
Total requirements: 19808 bytes

1 Warning.
Done.

Hatalari Duzeltirmisiniz.

Gönderilme zamanı: Pzr Mar 19, 2017 2:22 pm
gönderen TunnS[C]

Kod: Tümünü seç

/*    Copyright © 2009, ConnorMcLeod

    C4 Sprites Timer 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.

    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 C4 Sprites Timer; if not, write to the
    Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.
*/

#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <hamsandwich>

#define PLUGIN "C4 Timer"
#define AUTHOR "ConnorMcLeod"
#define VERSION "0.1.0"

const OFFSET_C4_EXPLODE_TIME    = 100

new g_iC4
new HamHook:g_HhGrenadeThink

new g_iTime = -1

new Float:g_flExplodeTime

public plugin_init()
{    
    register_plugin(PLUGIN, VERSION, AUTHOR)

    if( find_ent_by_class(FM_NULLENT, "func_bomb_target") || find_ent_by_class(FM_NULLENT, "info_bomb_target") )
    {
        g_HhGrenadeThink = RegisterHam(Ham_Think, "grenade", "C4_Think", 1)

        register_event("HLTV", "StopHook", "a", "1=0", "2=0")
        register_logevent("StopHook", 2, "1=Round_End")

        register_logevent("StartHook", 3, "2=Planted_The_Bomb")

        StopHook()
    }
}

public StopHook()
{
    g_iC4 = 0
    g_iTime = -1
    DisableHamForward( g_HhGrenadeThink )
}

public StartHook()
{
    new iC4 = FM_NULLENT
    new const grenade[] = "grenade"
    while( (iC4 = find_ent_by_class(iC4, grenade)) )
    {
        if( get_pdata_int(iC4, 96, 5) & (1<<8) )
        {
            g_iC4 = iC4
            g_flExplodeTime = get_pdata_float(g_iC4, OFFSET_C4_EXPLODE_TIME, 5)
            EnableHamForward( g_HhGrenadeThink )
            return
        }
    }
}

public C4_Think( iC4 )
{
    if( g_iC4 != iC4 )
    {
        return
    }

    static Float:flTime, iTime

    flTime = g_flExplodeTime - get_gametime()
    iTime = floatround(flTime, floatround_ceil)

    if( g_iTime != iTime )
    {
        g_iTime = iTime;
        set_hudmessage( 0, 255, 0, 0.1, 0.2, 0, 0.0, 1.5, 0.0, 0.0, 1 );
        show_hudmessage( 0, "C4: %i", iTime );
    }
}  

Hatalari Duzeltirmisiniz.

Gönderilme zamanı: Pzr Mar 19, 2017 2:23 pm
gönderen NumanKaya
@TunnS[C]
eyw Kardesim Saolasin Cansin.