Raised This Month: $12 Target: $400
 3% 

Solved [Searching plugin name] Team win logo


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
4ever16
Veteran Member
Join Date: Apr 2015
Old 12-06-2016 , 16:48   [Searching plugin name] Team win logo
Reply With Quote #1

When CT or T wins this server shows a logo. Its so cool.
Whats the name of that plugin?
Its a normal public server not a zombie server.


Last edited by 4ever16; 01-10-2017 at 22:44.
4ever16 is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 12-06-2016 , 17:39   Re: [Searching plugin name] Team win logo
Reply With Quote #2

Probably some kind of sprite that shows up at round end. also probably private, also probably non-steam.
__________________

Last edited by Napoleon_be; 12-06-2016 at 17:39.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
4ever16
Veteran Member
Join Date: Apr 2015
Old 12-06-2016 , 18:35   Re: [Searching plugin name] Team win logo
Reply With Quote #3

Well i understand that. Still want the name of that plugin or the whole .sma code
Steam or none steam i dont know. I use steam only.
If its ok i can post server ip adress.

Googled a bit found some wierd site https://forum.csduragi.com/eklentile...ges-t2629.html
I will come with more info later.

Last edited by 4ever16; 12-06-2016 at 18:41.
4ever16 is offline
4ever16
Veteran Member
Join Date: Apr 2015
Old 12-06-2016 , 19:13   Re: [Searching plugin name] Team win logo
Reply With Quote #4

Quote:
Downloaded whole shit. Here is it.
https://mega.nz/#fm/UQhFXYDT
advanced_win_msgs.sma
sprites_on_hud.sma
Sprites.rar
The both plugins are running and sprites are corectly placed.
Why arnt the sprites showing?

advanced_win_msgs.sma
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <fakemeta_util>

#if defined _dsohud_included
  #endinput
#endif
#define _dsohud_included

/**
 * Allows you to display a sprite on a user's HUD display
 *
 * Note: The sprite which is to be displayed must be precached
 * in your sub-plugin
 * 
 * @param id            Player index.
 * @param sprite_name        The sprite's name which is to be displayed
 * @param sprite_scale        The sprite's scale/size, must be a float
 * @param sprite_stopframe    The frame at which to halt the sprite's animation
 * @param sprite_framerate    The framerate of the sprite's animation
 * @return            Index of the sprite's entity or -1 on failure
 * 
**/
native display_hud_sprite(id, const sprite_name[], Float:sprite_scale 0.03sprite_stopframe 0Float:sprite_framerate 0.0)

/**
 * Allows you to remove the sprite from a player's screen
 *
 * @param id        Player index.
 * @return        1 on success otherwise -1 on failure
 * 
**/
native remove_hud_sprite(id)

// Win sprites dirs'
new const g_ct_win[] = "sprites/teamwin/ct_win.spr"
new const g_t_win[] = "sprites/teamwin/t_win.spr"

new g_maxplayers

public plugin_init()
{
    
register_plugin("Advanced Win Msgs.""1.0""@bdul!");
    
    
// Round start event
    
register_event("HLTV""event_round_start""a""1=0""2=0")
    
    
// Hook win team
    
register_logevent("Event_CTWin"6"3=CTs_Win""3=All_Hostages_Rescued")
    
register_logevent("Event_TerroristWin" 6"3=Terrorists_Win""3=Target_Bombed")
    
    
// Retrieve max players
    
g_maxplayers get_maxplayers()
}

// Prechache the sprites
public plugin_precache()
{
    
precache_model(g_t_win)
    
precache_model(g_ct_win)
}

// Remove win sprites on new round
public event_round_start()
{
    static 
id
    
for (id 1id <= g_maxplayersid++)
        
remove_hud_sprite(id)
}

// Set "ctwin" sprites on players HUD
public Event_CTWin(id)
{
    static 
id
    
for (id 1id <= g_maxplayersid++)
    {
        
display_hud_sprite(idg_ct_win0.04)
    }
}

// Set "twin" sprites on players HUD
public Event_TerroristWin(id)
{
    static 
id
    
for (id 1id <= g_maxplayersid++)
    {
        
display_hud_sprite(idg_t_win0.05)
    }
}

// no sprites on players HUD
public Event_Draw(id)
{
    return

sprites_on_hud.sma
PHP Code:
/***************************************************************************\
            ====================================           
             * || Sprites On HUD v1.1 || *
            ====================================
                *by @bdul!*

    -------------------
     *||DESCRIPTION||*
    -------------------

    This plugins allows you to display a sprite on a user's HUD display
    It also features an easy-to-use API natives include file
    Animated sprites are also supported
    
    ---------------
     *||CREDITS||*
    ---------------

    - MeRcyLeZZ -----------> For his awesome Zombie Plague Mod
    - Quim' / Conner ------> For helping me in vector calculations and
                 helping me with FM_AddToFullPack forward
    - Arkshine ------------> For helping me with animating sprites
    - kketan77 ------------> For helping me to create normal mod sprite

    ------------------
     *||CHANGE LOG||*
    ------------------
    
    v1.0 ====> Initial Release
    v1.1 ====> Added support for animated sprites
    
\***************************************************************************/

#include <amxmodx>
#include <fakemeta>
#include <xs>

// Distance at which the sprite is placed from the users screen
// DO NOT EDIT UNNECESSARILY!
#define DISTANCE     12

new g_player_ent[33], g_bit_connected_userg_stop_frame[33]

// Connected players macros
#define player_is_connected(%1)        (g_bit_connected_user |=  (1 << (%1 & 31)))
#define player_disconnected(%1)        (g_bit_connected_user &= ~(1 << (%1 & 31)))
#define is_player_connected(%1)        ((1 <= %1 <= 32) && (g_bit_connected_user & (1 << (%1 & 31))))

public plugin_init() 
{
    
// Register the plugin and the main forward
    
register_plugin("Addon: Sprites On HUD""1.0""@bdul!");
    
register_forward(FM_AddToFullPack"fm_add_to_fullpack"1)
}

public 
plugin_natives()
{
    
// Lets register some natives
    
register_native("display_hud_sprite""native_display_hud_sprite"1)
    
register_native("remove_hud_sprite""native_remove_hud_sprite"1)
}

public 
fm_add_to_fullpack(eseenthosthost_flagsplayerp_set)
{
    
// Valid player ?
    
if (!is_player_connected(host))
        return 
FMRES_IGNORED;
    
    
// Player haves a valid sprite entity
    
if (ent == g_player_ent[host])
    {
        static 
Float:origin[3], Float:forvec[3], Float:voffsets[3]
        
        
// Retrieve player's origin
        
pev(hostpev_originorigin)
        
pev(hostpev_view_ofsvoffsets)
        
xs_vec_add(originvoffsetsorigin)
        
        
// Get a forward vector in the direction of player's aim
        
velocity_by_aim(hostDISTANCEforvec)
        
        
// Set the sprite on the new origin
        
xs_vec_add(originforvecorigin)
        
engfunc(EngFunc_SetOriginentorigin)
        
set_es(esES_Originorigin)
        
        
// Make the sprite visible
        
set_es(esES_RenderModekRenderNormal)
        
set_es(esES_RenderAmt200)
        
        
// Sprite animation already stopped ?
        
if (!g_stop_frame[host])
            return 
FMRES_IGNORED
        
        
// Stop the animation at the desired frame
        
if (pev(entpev_frame) == g_stop_frame[host])
        {
            
set_pev(entpev_framerate0.0)
            
g_stop_frame[host] = 0
        
}
    }
    
    
// Stupid compiler !!
    
return FMRES_IGNORED
}

public 
client_putinserver(id)
{
    
// Player connected
    
player_is_connected(id)
    
    
// Marks bots as disconnected players (so sprites are'nt displayed to them)
    
if (is_user_bot(id)) player_disconnected(id)
    
    
// Remove sprite entity if present
    
if (pev_valid(g_player_ent[id]))
        
remove_sprite_entity(id)
}

public 
client_disconnect(id)
{
    
// Player disconnected
    
player_disconnected(id)
    
    
// Remove sprite entity if present
    
if (pev_valid(g_player_ent[id]))
        
remove_sprite_entity(id)
}

public 
native_display_hud_sprite(id, const sprite_name[], Float:sprite_sizesprite_stopframeFloat:sprite_framerate)
{
    
// Invalid player ?
    
if (!is_player_connected(id))
        return -
1;
    
    
// Already haves a sprite on his hud
    
if (g_player_ent[id])
        return -
1;
    
    
// Strings passed byref
    
param_convert(2)
    
    
// Invalid sprite ?
    
if (!sprite_name[0])
        return -
1;
    
    
// Create an entity for the player
    
g_player_ent[id] = engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"env_sprite"))
    
    
// Invalid entity ?
    
if (!pev_valid(g_player_ent[id]))
        return -
1;
    
    
// Set some basic properties
    
set_pev(g_player_ent[id], pev_takedamage0.0)
    
set_pev(g_player_ent[id], pev_solidSOLID_NOT)
    
set_pev(g_player_ent[id], pev_movetypeMOVETYPE_NONE)
    
    
// Set the sprite model
    
engfunc(EngFunc_SetModelg_player_ent[id], sprite_name)
    
    
// Set the rendering on the entity
    
set_pev(g_player_ent[id], pev_rendermodekRenderTransAlpha)
    
set_pev(g_player_ent[id], pev_renderamt0.0)
    
    
// Set the sprite size
    
set_pev(g_player_ent[id], pev_scalesprite_size)
    
    
// Update sprite's stopping frame
    
g_stop_frame[id] = sprite_stopframe
    
    
// Allow animation of sprite ?
    
if (g_stop_frame[id] && sprite_framerate 0.0)
    {
        
// Set the sprites animation time, framerate and stop frame
        
set_pev(g_player_ent[id], pev_animtimeget_gametime())
        
set_pev(g_player_ent[id], pev_frameratesprite_framerate)
        
        
// Spawn the sprite entity (necessary to play the sprite animations)
        
set_pev(g_player_ent[id], pev_spawnflagsSF_SPRITE_STARTON)
        
dllfunc(DLLFunc_Spawng_player_ent[id])
    }
    
    return 
g_player_ent[id];
}

public 
native_remove_hud_sprite(id)
{
    
// Invalid player ?
    
if (!is_player_connected(id))
        return -
1;
    
    
// Doesnt haves any sprite on his screen ?
    
if (!pev_valid(g_player_ent[id]))
        return -
1;
    
    
// Remove sprite entity
    
remove_sprite_entity(id)
    
    return 
1;
}

// Removes a sprite entity from world
remove_sprite_entity(id)
{
    
engfunc(EngFunc_RemoveEntityg_player_ent[id])
    
    
g_player_ent[id] = 0
    g_stop_frame
[id] = 0


Last edited by 4ever16; 12-06-2016 at 19:13.
4ever16 is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 12-07-2016 , 10:57   Re: [Searching plugin name] Team win logo
Reply With Quote #5

maybe you don't have the sprites installed?
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
4ever16
Veteran Member
Join Date: Apr 2015
Old 12-07-2016 , 11:44   Re: [Searching plugin name] Team win logo
Reply With Quote #6

Well they are installed correctly.

But in one of the .sma's it say like this.

Quote:
Note: The sprite which is to be displayed must be precached
* in your sub-plugin
What does it mean in lighter english?

I placed the sprite map in cstrike and addons/amxmodx map.

Is there som .inc or module im missing?

Last edited by 4ever16; 12-07-2016 at 11:53.
4ever16 is offline
4ever16
Veteran Member
Join Date: Apr 2015
Old 12-07-2016 , 12:01   Re: [Searching plugin name] Team win logo
Reply With Quote #7

4ever16 is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 12-08-2016 , 04:50   Re: [Searching plugin name] Team win logo
Reply With Quote #8

advanced_win_msgs.sma is the plugin which will display your sprite.

so make sure your sprites are located right here:
Code:
sprites/teamwin/ct_win.spr
sprites/teamwin/t_win.spr

__________________

Last edited by Napoleon_be; 12-08-2016 at 04:51.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
4ever16
Veteran Member
Join Date: Apr 2015
Old 12-08-2016 , 05:03   Re: [Searching plugin name] Team win logo
Reply With Quote #9

Well i told you i placed them right.
Does it work for you if you have time to test it?
4ever16 is offline
4ever16
Veteran Member
Join Date: Apr 2015
Old 12-11-2016 , 18:43   Re: [Searching plugin name] Team win logo
Reply With Quote #10

Its working fine!
He he nice one!
4ever16 is offline
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 16:16.


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