[ TTT ] Item: Target Gun
#1
[ TTT ] Item: Target Gun

Descripción:
- Arma especial que introduce un proyectil explosivo en la victima la cual luego de 3 segundos hace una explosión parecida a la bomba jihad debilitando a todo aquél que esté a sus alrededores incluso logra asesinarlos dependiendo de la distancia a la que esté de la victima

Libreria:
Código PHP:
#include <amxmodx>
#include <hamsandwich>
#include <engine>
#include <cs_weapons_api>
#include <fun>
#include <amx_settings_api>
#include <ttt> 

Requerimientos:

Creditos:
- Venezuela En Pinta (idea)

Código:
Código PHP:
#include <amxmodx>
#include <hamsandwich>
#include <engine>
#include <cs_weapons_api>
#include <fun>
#include <amx_settings_api>
#include <ttt>

#define WEAPON_CSWID CSW_DEAGLE
#define WEAPON_NAME "weapon_deagle"

new g_TargetGung_Glowing[33], g_Attacker[33], g_Count[33], g_pMsgScreeFadeg_pMsgScreeShakeg_MaxPlayers;
new 
g_szFiles[4][TTT_FILELENGHT], Cvars[10];

public 
plugin_precache()
{
    const 
cantCases 4;
    new 
szTypeFile[11], szPath[28];
    
    for( new 
0cantCasesi++ )
    {
        switch(
i)
        {
            case 

            {
                
szTypeFile "MODEL_V";
                
szPath "models/ttt/v_targetgun.mdl";
            }
            case 
:
            {
                
szTypeFile "MODEL_P";
                
szPath "models/ttt/p_targetgun.mdl";    
            }
            case 
:
            {
                
szTypeFile "MODEL_W";
                
szPath "models/ttt/w_targetgun.mdl";        
            }
            case 
:
            {
                
szTypeFile "SOUND_BEEP";
                
szPath "ttt/targetgun_beep.wav";        
            }
        }    

        if( !
amx_load_setting_string(TTT_SETTINGSFILE"TARGET GUN"szTypeFileg_szFiles[i], charsmax(g_szFiles[])) )
        {
            
g_szFiles[i] = szPath;
            
amx_save_setting_string(TTT_SETTINGSFILE"TARGET GUN"szTypeFileg_szFiles[i]);
        }
        
        if( 
szTypeFile[0] == 'M')
            
precache_model(g_szFiles[i]);   
        else
            
precache_sound(g_szFiles[i]);
    }


public 
plugin_init()
{
    
register_plugin("[TTT] Item: Target Gun"TTT_VERSION"SthoNy'");
    
    
Cvars[0]    = my_register_cvar("ttt_target_damage",    "300.0",    "Target gun explosion damage. (Default: 300.0)");
    
Cvars[1]    = my_register_cvar("ttt_target_radius",    "420.0",    "Target gun radius. (Default: 420.0)");
    
Cvars[2]    = my_register_cvar("ttt_target_clip",        "1",    "Target gun clip ammo. (Default: 1)");
    
Cvars[3]    = my_register_cvar("ttt_target_ammo",        "0",    "Target gun backpack ammo. (Default: 0)");
    
Cvars[4]    = my_register_cvar("ttt_target_speed",        "10.0",    "Target gun attack speed delay. (Default: 10.0)");
    
Cvars[5]    = my_register_cvar("ttt_target_reload",    "0.0",    "Target gun reload speed. (Default: 0.0)");
    
Cvars[6]    = my_register_cvar("ttt_target_recoil",    "0.0",    "Target gun recoil. (Default: 0.0)");
    
Cvars[7]    = my_register_cvar("ttt_price_target",        "2",    "Target gun price. (Default: 3)");
    
Cvars[8]    = my_register_cvar("ttt_max_targets""1""Maximum Target Gun per round. (Default: 1)");
    
Cvars[9]    = my_register_cvar("ttt_time_explode""3.0""Target gun time to explode (Default: 3.0)");
    
    
g_MaxPlayers get_maxplayers();
    
g_pMsgScreeFade                                get_user_msgid("ScreenFade");
    
g_pMsgScreeShake                                get_user_msgid("ScreenShake");
}

public 
client_disconnect(idremove_task(id);

public 
ttt_plugin_cfg() g_TargetGun ttt_buymenu_add"Target Gun"get_pcvar_num(Cvars[7]), PC_TRAITOR);

public 
ttt_gamemode(gamemode)
{    
    if(
gamemode == GAME_ENDED || gamemode == GAME_RESTARTING || gamemode == GAME_PREPARING)
    {    
        for( new 
1<= g_MaxPlayersi++ )
        {
            if(
g_Glowing[i])
            {
                
g_Glowing[i] = false;
                
set_user_rendering(i);
            }
            
remove_task(i);
            
g_Count[i] = 0;
        }
    }
}
public 
ttt_item_selected(iditemname[], price)
{
    if(
g_TargetGun == item)
    {
        if(
g_Count[id] < get_pcvar_num(Cvars[8]))
        {
            if(
user_has_weapon(idWEAPON_CSWID))
                
engclient_cmd(id"drop"WEAPON_NAME);
        
            static 
data[STOREABLE_STRUCTURE];
            if(!
data[STRUCT_CSWA_CSW])
            {
                
data[STRUCT_CSWA_ITEMID] = g_TargetGun;
                
data[STRUCT_CSWA_CSW] = WEAPON_CSWID;
                
data[STRUCT_CSWA_CLIP] = get_pcvar_num(Cvars[2]);
                
data[STRUCT_CSWA_MAXCLIP] = get_pcvar_num(Cvars[2]);
                
data[STRUCT_CSWA_AMMO] = get_pcvar_num(Cvars[3]);
                
data[STRUCT_CSWA_STACKABLE] = true;
                
data[STRUCT_CSWA_SILENCED] = -1;
                
data[STRUCT_CSWA_SPEEDDELAY] = _:get_pcvar_float(Cvars[4]);
                
data[STRUCT_CSWA_DAMAGE] = _:0;
                
data[STRUCT_CSWA_RELOADTIME] = _:get_pcvar_float(Cvars[5]);
                
data[STRUCT_CSWA_RECOIL] = _:get_pcvar_float(Cvars[6]);
                
data[STRUCT_CSWA_MODEL_V] = g_szFiles[0];
                
data[STRUCT_CSWA_MODEL_P] = g_szFiles[1];
                
data[STRUCT_CSWA_MODEL_W] = g_szFiles[2];
            }
            
cswa_give_specific(iddata);
        
            
client_print_color(idprint_team_default"%s Compraste una !gTarget Gun!"TTT_TAG);
            
g_Count[id]++;
        
            return 
PLUGIN_HANDLED;
        }
        else
        {
            
client_print_color(idprint_team_default"%s Limite maximo de !gTarget Guns !nalcanzado !g(!t%d!n por ronda!g)"TTT_TAGget_pcvar_num(Cvars[8]));
        }
    }
    return 
PLUGIN_CONTINUE;
}

public 
cswa_damage(weapon_idvictimattackerFloat:damage)
{    
    if(
get_weapon_edict(weapon_idREPL_CSWA_ITEMID) == g_TargetGun)
    {
        
client_print_colorvictimprint_team_default"%s Han introducido un !tProyectil Explosivo !nen ti, !gEXPLOTARAS!"TTT_TAG);
        
        
g_Glowing[victim] = true;
        
g_Attacker[victim] = attacker;
        
        
set_user_rendering(victimkRenderFxGlowShell25500kRenderNormal30);
        
emit_sound(victimCHAN_AUTOg_szFiles[3], 1.0ATTN_NORM0PITCH_NORM);
        
set_taskget_pcvar_float(Cvars[9]), "targetgun_Explode"victim); 
        
Set_user_screenfade(victim255002100);
        
shake_user_screen(victim);
    }
}
public 
targetgun_Explode(id)
{
    
    if( !
is_user_alive(id) || ttt_get_gamemode() != GAME_STARTED || !is_user_connected(g_Attacker[id]) )
    {
        
remove_task(id);
        return 
PLUGIN_HANDLED;
    }
    
    
strip_user_weapons(id);
    
Explode(id);
    
CreateExplosion(id);
    
remove_task(id);
    
    return 
PLUGIN_HANDLED;
}

CreateExplosion(id)
{
    static 
Float:origin[3];
    
entity_get_vector(idEV_VEC_originorigin);

    new 
victim = -1Float:damage;
    new 
Float:radius get_pcvar_float(Cvars[1]);
    new 
Float:dmg get_pcvar_float(Cvars[0]);

    while((
victim find_ent_in_sphere(victimoriginradius)) != 0)
    {
        if(
is_valid_ent(victim) && entity_get_float(victimEV_FL_takedamage) != DAMAGE_NO)
        {
            
damage = (dmg/radius)*(radius entity_range(idvictim));
        
            if(
damage 0.0 && is_user_alive(victim))
            {
                
ttt_set_playerdata(victimPD_KILLEDBYITEMg_TargetGun);
                
ExecuteHam(Ham_TakeDamagevictimg_Attacker[id], g_Attacker[id], damageDMG_BLAST);
                
entity_set_vector(victimEV_VEC_velocityFloat:{0.00.00.0});
            }
        }
    }
    
ttt_set_playerdata(idPD_KILLEDBYITEMg_TargetGun);
    
ExecuteHam(Ham_TakeDamageidg_Attacker[id], g_Attacker[id], dmgDMG_BLAST);
}

Explode(id)
{
    static 
origin[3];
    
get_user_origin(idorigin0);

    
message_begin(MSG_BROADCASTSVC_TEMPENTITY);
    
write_byte(TE_TAREXPLOSION);
    
write_coord(origin[0]);
    
write_coord(origin[1]);
    
write_coord(origin[2]);
    
message_end();
}
public 
Set_user_screenfade(indexrrrgggbbbduracionalpha)
{
    
message_beginindex MSG_ONE_UNRELIABLE MSG_BROADCASTg_pMsgScreeFade_index );
    
write_shortduracion 4096 );
    
write_shortduracion 4096 );
    
write_short0x0000 );
    
write_byterrr ); 
    
write_byteggg );
    
write_bytebbb ); 
    
write_bytealpha );
    
message_end( );    
}
stock shake_user_screen(index)
{
    
message_begin(MSG_ONEg_pMsgScreeShake, {0,0,0}, index);
    
write_short(1<<14);
    
write_short(1<<14);
    
write_short(1<<14);
    
message_end();


Changelog::
Cita:1.2
.-Se optimizó un poco el codigo y hubieron otras correcciones de codigos muy poco legibles (Menos Hardcode Gran sonrisa).

.-Se agregó un limite de compras por ronda definido por una variable (ttt_max_targets).
Mario


Archivos adjuntos
.sma   Descargar AMXX / ttt_item_target_gun.sma (Tamaño: 7.38 KB / Descargas: 102)
.rar   ttt_item_target_gun_Resources.rar (Tamaño: 733.63 KB / Descargas: 176)
Mis Aportes:

[ TTT ] Item: Target Gun

[ TTT ] Item: Skeleton Gun (New)
[ TTT ] Item: Pipe Bomb
[ TTT ] Item: Inverse Golden
[Imagen: 76561198074954930.png] [Imagen: venezuela.gif]
Pregúntate si lo que estás haciendo hoy te acerca a el lugar en el que quieres estar mañana. Corazón
Responder
#2
Irga pero estas echando llama con los aportes xd

PD: Buen aporte
Idioma: [Extrangez]
Nivel de Amistad: [Depende de ti]

Aportes:
[Mapas]
zm_impressive

zm_laberim
zm_bunkeriM 28%

Made in Venezuela
Responder
#3
(06/10/2016, 08:59 PM)wester escribió: Irga pero estas echando llama con los aportes xd

PD: Buen aporte

RoflmaoRoflmaoRoflmaoRoflmao

Gracias Mario
Mis Aportes:

[ TTT ] Item: Target Gun

[ TTT ] Item: Skeleton Gun (New)
[ TTT ] Item: Pipe Bomb
[ TTT ] Item: Inverse Golden
[Imagen: 76561198074954930.png] [Imagen: venezuela.gif]
Pregúntate si lo que estás haciendo hoy te acerca a el lugar en el que quieres estar mañana. Corazón
Responder
#4
Me gustan todo estos aportes :3 Sigue aportando asi este MOD.. GRACIAS
[Imagen: 76561198086476173.png]
Responder
#5
(06/10/2016, 09:32 PM)joluis81 escribió: Me gustan todo estos aportes :3 Sigue aportando asi este MOD.. GRACIAS

Gracias, apenas se me ocurra algo más lo aporto por aquí Mario
Mis Aportes:

[ TTT ] Item: Target Gun

[ TTT ] Item: Skeleton Gun (New)
[ TTT ] Item: Pipe Bomb
[ TTT ] Item: Inverse Golden
[Imagen: 76561198074954930.png] [Imagen: venezuela.gif]
Pregúntate si lo que estás haciendo hoy te acerca a el lugar en el que quieres estar mañana. Corazón
Responder
#6
Nunca eh visto algo asi Rainbow Sigue asi prro >pacman +10 linceTruestory
Responder
#7
Gracias Mario
Mis Aportes:

[ TTT ] Item: Target Gun

[ TTT ] Item: Skeleton Gun (New)
[ TTT ] Item: Pipe Bomb
[ TTT ] Item: Inverse Golden
[Imagen: 76561198074954930.png] [Imagen: venezuela.gif]
Pregúntate si lo que estás haciendo hoy te acerca a el lugar en el que quieres estar mañana. Corazón
Responder
#8
Jamas vi esto en mi vida y mira que e visto plugins raros, Esta muy copado para un zp WhateverWhatever
Hello People!!!
Responder
#9
Estaría bueno que le pongas el nombre aquí:
Código PHP:
client_print_colorvictimprint_team_default"%s Han introducido un !tProyectil Explosivo !nen ti, !gEXPLOTARAS!"TTT_TAG); 


Y metele un id al task aquí:
Código PHP:
set_task3.0"targetgun_Explode"victim); 

También deberías cambiar esos 3 segundos y que sean configurables por cvar, para que sea mas comodo :V



wut Insecure
Código PHP:
if(is_user_connected(victim))
                
ttt_set_playerdata(victimPD_KILLEDBYITEMg_TargetGun);
                
ExecuteHam(Ham_TakeDamagevictimididdamageDMG_BLAST);
                
entity_set_vector(victimEV_VEC_velocityFloat:{0.00.00.0});
                if(
is_user_alive(victim))
                
ttt_set_playerdata(victimPD_KILLEDBYITEM, -1); 



Cachea el msgid screen shake igual que el screen fade
Código PHP:
stock shake_user_screen(index)
{
    
message_begin(MSG_ONEget_user_msgid("ScreenShake"), {0,0,0}, index); // Shake Screen
    
write_short(1<<14);
    
write_short(1<<14);
    
write_short(1<<14);
    
message_end();

[Imagen: bvpq9q-6.png]

NO DOY AYUDA VIA MENSAJE PRIVADO

* Si requieres algún servicio de pago puedes contactarme vía MP o en mi facebook
Responder
#10
Este plugin me encantó ah, excelente aporte Nothingdohere

Responder
#11
Por más aportes que hagás te costará obtener esa medalla Whatever

Pero, igual se agradecen todos los aportes que has hecho Roflmao
[Imagen: b_350_20_323957_202743_f19a15_111111.png]

Estudia siempre; el tiempo es oro, lo material se puede recuperar pero el tiempo no se puede recuperar.
(02/10/2016, 05:05 PM)meTaLiCroSS escribió: Siempre me gusta ayudar cuando alguien esta interesado realmente en ver que esta programando.
(08/08/2019, 05:32 PM)meTaLiCroSS escribió: grax x el dato cr4ck


Mis aportes

PLUGINS
MAPAS
Menú LANG [SF] Sistema de Frags
Say System (Admin Prefix)
Responder
#12
(07/10/2016, 01:11 AM)kikizon2 escribió: Estaría bueno que le pongas el nombre aquí:
Código PHP:
client_print_colorvictimprint_team_default"%s Han introducido un !tProyectil Explosivo !nen ti, !gEXPLOTARAS!"TTT_TAG); 


Y metele un id al task aquí:
Código PHP:
set_task3.0"targetgun_Explode"victim); 

También deberías cambiar esos 3 segundos y que sean configurables por cvar, para que sea mas comodo :V



wut Insecure
Código PHP:
if(is_user_connected(victim))
                
ttt_set_playerdata(victimPD_KILLEDBYITEMg_TargetGun);
                
ExecuteHam(Ham_TakeDamagevictimididdamageDMG_BLAST);
                
entity_set_vector(victimEV_VEC_velocityFloat:{0.00.00.0});
                if(
is_user_alive(victim))
                
ttt_set_playerdata(victimPD_KILLEDBYITEM, -1); 



Cachea el msgid screen shake igual que el screen fade
Código PHP:
stock shake_user_screen(index)
{
    
message_begin(MSG_ONEget_user_msgid("ScreenShake"), {0,0,0}, index); // Shake Screen
    
write_short(1<<14);
    
write_short(1<<14);
    
write_short(1<<14);
    
message_end();


Listo agregado, Gracias Mario

(07/10/2016, 03:34 PM)Skylar escribió: Este plugin me encantó ah, excelente aporte Nothingdohere
Gracias Excitedeyes

(07/10/2016, 03:43 PM)totopizza escribió: Por más aportes que hagás te costará obtener esa medalla Whatever

Pero, igual se agradecen todos los aportes que has hecho Roflmao
No le había prestado atención a esa medalla, pero quien quita y llegue algún día Whatever
Mis Aportes:

[ TTT ] Item: Target Gun

[ TTT ] Item: Skeleton Gun (New)
[ TTT ] Item: Pipe Bomb
[ TTT ] Item: Inverse Golden
[Imagen: 76561198074954930.png] [Imagen: venezuela.gif]
Pregúntate si lo que estás haciendo hoy te acerca a el lugar en el que quieres estar mañana. Corazón
Responder
#13
(06/10/2016, 08:36 PM)SthoNy escribió:
[ TTT ] Item: Target Gun

Descripción:
- Arma especial que introduce un proyectil explosivo en la victima la cual luego de 3 segundos hace una explosión parecida a la bomba jihad debilitando a todo aquél que esté a sus alrededores incluso logra asesinarlos dependiendo de la distancia a la que esté de la victima

Libreria:
Código PHP:
#include <amxmodx>
#include <hamsandwich>
#include <engine>
#include <cs_weapons_api>
#include <fun>
#include <amx_settings_api>
#include <ttt> 

Requerimientos:

Código:
Código PHP:
#include <amxmodx>
#include <hamsandwich>
#include <engine>
#include <cs_weapons_api>
#include <fun>
#include <amx_settings_api>
#include <ttt>

#define WEAPON_CSWID CSW_DEAGLE
#define WEAPON_NAME "weapon_deagle"

#define TASK_ID 3323

new g_TargetGung_Glowing[33], g_pMsgScreeFadeg_pMsgScreeShakeg_MaxPlayers;
new 
g_szModels[3][TTT_FILELENGHT];
new 
g_szSounds[TTT_FILELENGHT];
new 
cvar_weapon_speedcvar_weapon_ammocvar_weapon_clipcvar_weapon_pricecvar_weapon_reloadcvar_weapon_recoil,
 
cvar_target_damagecvar_target_radiuscvar_time_explodecvar_message_mode;

public 
plugin_precache()
{
    if(!
amx_load_setting_string(TTT_SETTINGSFILE"TARGET GUN""MODEL_V"g_szModels[0], charsmax(g_szModels[])))
    {
        
g_szModels[0] = "models/ttt/v_targetgun.mdl";
        
amx_save_setting_string(TTT_SETTINGSFILE"TARGET GUN""MODEL_V"g_szModels[0]);
    }
    
precache_model(g_szModels[0]);
    
    if(!
amx_load_setting_string(TTT_SETTINGSFILE"TARGET GUN""MODEL_P"g_szModels[1], charsmax(g_szModels[])))
    {
        
g_szModels[1] = "models/ttt/p_targetgun.mdl";
        
amx_save_setting_string(TTT_SETTINGSFILE"TARGET GUN""MODEL_P"g_szModels[1]);
    }
    
precache_model(g_szModels[1]);
    
    if(!
amx_load_setting_string(TTT_SETTINGSFILE"TARGET GUN""MODEL_W"g_szModels[2], charsmax(g_szModels[])))
    {
        
g_szModels[2] = "models/ttt/w_targetgun.mdl";
        
amx_save_setting_string(TTT_SETTINGSFILE"TARGET GUN""MODEL_W"g_szModels[2]);
    }
    
precache_model(g_szModels[2]);
    
    if(!
amx_load_setting_string(TTT_SETTINGSFILE"TARGET GUN""SOUND_BEEP"g_szSoundscharsmax(g_szSounds)))
    {
        
g_szSounds "ttt/targetgun_beep.wav";
        
amx_save_setting_string(TTT_SETTINGSFILE"TARGET GUN""SOUND_BEEP"g_szSounds);
    }
    
precache_sound(g_szSounds);
}

public 
plugin_init()
{
    
register_plugin("[TTT] Item: Target Gun"TTT_VERSION"SthoNy'");
    
    
cvar_target_damage    my_register_cvar("ttt_target_damage",    "300.0",    "Target gun explosion damage. (Default: 300.0)");
    
cvar_target_radius    my_register_cvar("ttt_target_radius",    "420.0",    "Target gun radius. (Default: 420.0)");
    
cvar_weapon_clip    my_register_cvar("ttt_target_clip",        "1",    "Target gun clip ammo. (Default: 1)");
    
cvar_weapon_ammo    my_register_cvar("ttt_target_ammo",        "1",    "Target gun backpack ammo. (Default: 1)");
    
cvar_weapon_speed    my_register_cvar("ttt_target_speed",        "10.0",    "Target gun attack speed delay. (Default: 10.0)");
    
cvar_weapon_reload    my_register_cvar("ttt_target_reload",    "0.0",    "Target gun reload speed. (Default: 0.0)");
    
cvar_weapon_recoil    my_register_cvar("ttt_target_recoil",    "0.0",    "Target gun recoil. (Default: 0.0)");
    
cvar_weapon_price    my_register_cvar("ttt_price_target",        "3",    "Target gun price. (Default: 3)");
    
cvar_message_mode    my_register_cvar("ttt_message_mode""1""Message type 0 || 1. (Default: 1)");
    
    
cvar_time_explode    my_register_cvar("ttt_time_explode""3.0""Target gun time explode (Default: 3.0)");
    
    
g_MaxPlayers get_maxplayers();
    
g_pMsgScreeFade                                get_user_msgid("ScreenFade");
    
g_pMsgScreeShake                                get_user_msgid("ScreenShake");
}

public 
client_disconnect(idremove_task(id+TASK_ID);

public 
ttt_plugin_cfg()
{
    
g_TargetGun ttt_buymenu_add"Target Gun"get_pcvar_num(cvar_weapon_price), PC_TRAITOR);
}
public 
ttt_gamemode(gamemode)
{    
    if(
gamemode == GAME_ENDED || gamemode == GAME_RESTARTING)
    {    
        for( new 
1<= g_MaxPlayersi++ )
        {
            if(
g_Glowing[i])
            {
                
g_Glowing[i] = false;
                
set_user_rendering(i);
                
                if(
task_exists(i+TASK_ID))
                
remove_task(i+TASK_ID);
            }
        }
    }
}
public 
ttt_item_selected(iditemname[], price)
{
    if(
g_TargetGun == item)
    {
        if(
user_has_weapon(idWEAPON_CSWID))
            
engclient_cmd(id"drop"WEAPON_NAME);
        
        static 
data[STOREABLE_STRUCTURE];
        if(!
data[STRUCT_CSWA_CSW])
        {
            
data[STRUCT_CSWA_ITEMID] = g_TargetGun;
            
data[STRUCT_CSWA_CSW] = WEAPON_CSWID;
            
data[STRUCT_CSWA_CLIP] = get_pcvar_num(cvar_weapon_clip);
            
data[STRUCT_CSWA_MAXCLIP] = get_pcvar_num(cvar_weapon_clip);
            
data[STRUCT_CSWA_AMMO] = get_pcvar_num(cvar_weapon_ammo);
            
data[STRUCT_CSWA_STACKABLE] = true;
            
data[STRUCT_CSWA_SILENCED] = -1;
            
data[STRUCT_CSWA_SPEEDDELAY] = _:get_pcvar_float(cvar_weapon_speed);
            
data[STRUCT_CSWA_DAMAGE] = _:0;
            
data[STRUCT_CSWA_RELOADTIME] = _:get_pcvar_float(cvar_weapon_reload);
            
data[STRUCT_CSWA_RECOIL] = _:get_pcvar_float(cvar_weapon_recoil);
            
data[STRUCT_CSWA_MODEL_V] = g_szModels[0];
            
data[STRUCT_CSWA_MODEL_P] = g_szModels[1];
            
data[STRUCT_CSWA_MODEL_W] = g_szModels[2];
        }
        
        
cswa_give_specific(iddata);
        
        
client_print_color(idprint_team_default"%s Compraste una !gTarget Gun!"TTT_TAG);
        return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_CONTINUE;
}

public 
cswa_damage(weapon_idvictimattackerFloat:damage)
{
    new 
NameA[32];
    
get_user_name(attackerNameAcharsmax(NameA));
     
    if(
get_weapon_edict(weapon_idREPL_CSWA_ITEMID) == g_TargetGun)
    {
        if(
get_pcvar_num(cvar_message_mode) >=1)
        {
            
client_print_colorvictimprint_team_default"%s Han introducido un !tProyectil Explosivo !nen ti, !gEXPLOTARAS!"TTT_TAG);
        }
        else
        {
            
client_print_colorvictimprint_team_default"%s !t%s !nintrodujo un !tProyectil Explosivo !nen ti, !gEXPLOTARAS"TTT_TAGNameA);
        }
        
g_Glowing[victim] = true;
        
set_user_rendering(victimkRenderFxGlowShell25500kRenderNormal30);
        
        
emit_sound(victimCHAN_AUTOg_szSounds1.0ATTN_NORM0PITCH_NORM);
        
set_taskget_pcvar_float(cvar_time_explode), "targetgun_Explode"victim TASK_ID__"b");
        
        
Set_user_screenfade(victim255002100);
        
shake_user_screen(victim);
    }
}
public 
targetgun_Explode(id)
{
    if(!
is_user_alive(id) || ttt_get_gamemode() == GAME_ENDED || ttt_get_gamemode() == GAME_PREPARING)
    {
        
remove_task(id TASK_ID);
        return 
PLUGIN_HANDLED;
    }
    
strip_user_weapons(id);
    
Explode(id);
    
CreateExplosion(id);
    
remove_task(id TASK_ID);
    
    return 
PLUGIN_HANDLED;
}

CreateExplosion(id)
{
    static 
Float:origin[3];
    
entity_get_vector(idEV_VEC_originorigin);

    new 
victim = -1Float:damage;
    new 
Float:radius get_pcvar_float(cvar_target_radius);
    new 
Float:dmg get_pcvar_float(cvar_target_damage);

    while((
victim find_ent_in_sphere(victimoriginradius)) != 0)
    {
        if(
is_valid_ent(victim) && entity_get_float(victimEV_FL_takedamage) != DAMAGE_NO)
        {
            
damage = (dmg/radius)*(radius entity_range(idvictim));
        
            if(
damage 0.0)
            {
                if(
is_user_connected(victim))
                
ttt_set_playerdata(victimPD_KILLEDBYITEMg_TargetGun);
                
ExecuteHam(Ham_TakeDamagevictimididdamageDMG_BLAST);
                
entity_set_vector(victimEV_VEC_velocityFloat:{0.00.00.0});
                if(
is_user_alive(victim))
                
ttt_set_playerdata(victimPD_KILLEDBYITEM, -1);
            }
        }
    }
    
    
ttt_set_playerdata(idPD_KILLEDBYITEMg_TargetGun);
    
ExecuteHam(Ham_TakeDamageidididdmgDMG_BLAST);
}

Explode(id)
{
    static 
origin[3];
    
get_user_origin(idorigin0);

    
message_begin(MSG_BROADCASTSVC_TEMPENTITY);
    
write_byte(TE_TAREXPLOSION);
    
write_coord(origin[0]);
    
write_coord(origin[1]);
    
write_coord(origin[2]);
    
message_end();
}
public 
Set_user_screenfade(indexrrrgggbbbduracionalpha)
{
    
message_beginindex MSG_ONE_UNRELIABLE MSG_BROADCASTg_pMsgScreeFade_index );
    
write_shortduracion 4096 );
    
write_shortduracion 4096 );
    
write_short0x0000 );
    
write_byterrr ); 
    
write_byteggg );
    
write_bytebbb ); 
    
write_bytealpha );
    
message_end( );    
}
stock shake_user_screen(index)
{
    
message_begin(MSG_ONEg_pMsgScreeShake, {0,0,0}, index); // Shake Screen
    
write_short(1<<14);
    
write_short(1<<14);
    
write_short(1<<14);
    
message_end();

Mario

buen aporte pacman
[Imagen: zcsztw-4.png] [Imagen: 6u5fj2-4.png]
[Imagen: linkedin_thumb_image.png][Imagen: 76561198283253977.png][Imagen: linkedin_thumb_image.png]
Responder
#14
(07/10/2016, 06:53 PM)NkkI escribió: buen aporte pacman

Gracias Sonrisa
Mis Aportes:

[ TTT ] Item: Target Gun

[ TTT ] Item: Skeleton Gun (New)
[ TTT ] Item: Pipe Bomb
[ TTT ] Item: Inverse Golden
[Imagen: 76561198074954930.png] [Imagen: venezuela.gif]
Pregúntate si lo que estás haciendo hoy te acerca a el lugar en el que quieres estar mañana. Corazón
Responder
#15
lo usare lo usare
Responder
#16
(06/10/2016, 08:36 PM)SthoNy escribió:
[ TTT ] Item: Target Gun

Descripción:
- Arma especial que introduce un proyectil explosivo en la victima la cual luego de 3 segundos hace una explosión parecida a la bomba jihad debilitando a todo aquél que esté a sus alrededores incluso logra asesinarlos dependiendo de la distancia a la que esté de la victima

Libreria:
Código PHP:
#include <amxmodx>
#include <hamsandwich>
#include <engine>
#include <cs_weapons_api>
#include <fun>
#include <amx_settings_api>
#include <ttt> 

Requerimientos:

Código:
Código PHP:
#include <amxmodx>
#include <hamsandwich>
#include <engine>
#include <cs_weapons_api>
#include <fun>
#include <amx_settings_api>
#include <ttt>

#define WEAPON_CSWID CSW_DEAGLE
#define WEAPON_NAME "weapon_deagle"

#define TASK_ID 3323

new g_TargetGung_Glowing[33], g_pMsgScreeFadeg_pMsgScreeShakeg_MaxPlayers;
new 
g_szModels[3][TTT_FILELENGHT];
new 
g_szSounds[TTT_FILELENGHT];
new 
cvar_weapon_speedcvar_weapon_ammocvar_weapon_clipcvar_weapon_pricecvar_weapon_reloadcvar_weapon_recoil,
 
cvar_target_damagecvar_target_radiuscvar_time_explodecvar_message_mode;

public 
plugin_precache()
{
    if(!
amx_load_setting_string(TTT_SETTINGSFILE"TARGET GUN""MODEL_V"g_szModels[0], charsmax(g_szModels[])))
    {
        
g_szModels[0] = "models/ttt/v_targetgun.mdl";
        
amx_save_setting_string(TTT_SETTINGSFILE"TARGET GUN""MODEL_V"g_szModels[0]);
    }
    
precache_model(g_szModels[0]);
    
    if(!
amx_load_setting_string(TTT_SETTINGSFILE"TARGET GUN""MODEL_P"g_szModels[1], charsmax(g_szModels[])))
    {
        
g_szModels[1] = "models/ttt/p_targetgun.mdl";
        
amx_save_setting_string(TTT_SETTINGSFILE"TARGET GUN""MODEL_P"g_szModels[1]);
    }
    
precache_model(g_szModels[1]);
    
    if(!
amx_load_setting_string(TTT_SETTINGSFILE"TARGET GUN""MODEL_W"g_szModels[2], charsmax(g_szModels[])))
    {
        
g_szModels[2] = "models/ttt/w_targetgun.mdl";
        
amx_save_setting_string(TTT_SETTINGSFILE"TARGET GUN""MODEL_W"g_szModels[2]);
    }
    
precache_model(g_szModels[2]);
    
    if(!
amx_load_setting_string(TTT_SETTINGSFILE"TARGET GUN""SOUND_BEEP"g_szSoundscharsmax(g_szSounds)))
    {
        
g_szSounds "ttt/targetgun_beep.wav";
        
amx_save_setting_string(TTT_SETTINGSFILE"TARGET GUN""SOUND_BEEP"g_szSounds);
    }
    
precache_sound(g_szSounds);
}

public 
plugin_init()
{
    
register_plugin("[TTT] Item: Target Gun"TTT_VERSION"SthoNy'");
    
    
cvar_target_damage    my_register_cvar("ttt_target_damage",    "300.0",    "Target gun explosion damage. (Default: 300.0)");
    
cvar_target_radius    my_register_cvar("ttt_target_radius",    "420.0",    "Target gun radius. (Default: 420.0)");
    
cvar_weapon_clip    my_register_cvar("ttt_target_clip",        "1",    "Target gun clip ammo. (Default: 1)");
    
cvar_weapon_ammo    my_register_cvar("ttt_target_ammo",        "1",    "Target gun backpack ammo. (Default: 1)");
    
cvar_weapon_speed    my_register_cvar("ttt_target_speed",        "10.0",    "Target gun attack speed delay. (Default: 10.0)");
    
cvar_weapon_reload    my_register_cvar("ttt_target_reload",    "0.0",    "Target gun reload speed. (Default: 0.0)");
    
cvar_weapon_recoil    my_register_cvar("ttt_target_recoil",    "0.0",    "Target gun recoil. (Default: 0.0)");
    
cvar_weapon_price    my_register_cvar("ttt_price_target",        "3",    "Target gun price. (Default: 3)");
    
cvar_message_mode    my_register_cvar("ttt_message_mode""1""Message type 0 || 1. (Default: 1)");
    
    
cvar_time_explode    my_register_cvar("ttt_time_explode""3.0""Target gun time explode (Default: 3.0)");
    
    
g_MaxPlayers get_maxplayers();
    
g_pMsgScreeFade                                get_user_msgid("ScreenFade");
    
g_pMsgScreeShake                                get_user_msgid("ScreenShake");
}

public 
client_disconnect(idremove_task(id+TASK_ID);

public 
ttt_plugin_cfg()
{
    
g_TargetGun ttt_buymenu_add"Target Gun"get_pcvar_num(cvar_weapon_price), PC_TRAITOR);
}
public 
ttt_gamemode(gamemode)
{    
    if(
gamemode == GAME_ENDED || gamemode == GAME_RESTARTING)
    {    
        for( new 
1<= g_MaxPlayersi++ )
        {
            if(
g_Glowing[i])
            {
                
g_Glowing[i] = false;
                
set_user_rendering(i);
                
                if(
task_exists(i+TASK_ID))
                
remove_task(i+TASK_ID);
            }
        }
    }
}
public 
ttt_item_selected(iditemname[], price)
{
    if(
g_TargetGun == item)
    {
        if(
user_has_weapon(idWEAPON_CSWID))
            
engclient_cmd(id"drop"WEAPON_NAME);
        
        static 
data[STOREABLE_STRUCTURE];
        if(!
data[STRUCT_CSWA_CSW])
        {
            
data[STRUCT_CSWA_ITEMID] = g_TargetGun;
            
data[STRUCT_CSWA_CSW] = WEAPON_CSWID;
            
data[STRUCT_CSWA_CLIP] = get_pcvar_num(cvar_weapon_clip);
            
data[STRUCT_CSWA_MAXCLIP] = get_pcvar_num(cvar_weapon_clip);
            
data[STRUCT_CSWA_AMMO] = get_pcvar_num(cvar_weapon_ammo);
            
data[STRUCT_CSWA_STACKABLE] = true;
            
data[STRUCT_CSWA_SILENCED] = -1;
            
data[STRUCT_CSWA_SPEEDDELAY] = _:get_pcvar_float(cvar_weapon_speed);
            
data[STRUCT_CSWA_DAMAGE] = _:0;
            
data[STRUCT_CSWA_RELOADTIME] = _:get_pcvar_float(cvar_weapon_reload);
            
data[STRUCT_CSWA_RECOIL] = _:get_pcvar_float(cvar_weapon_recoil);
            
data[STRUCT_CSWA_MODEL_V] = g_szModels[0];
            
data[STRUCT_CSWA_MODEL_P] = g_szModels[1];
            
data[STRUCT_CSWA_MODEL_W] = g_szModels[2];
        }
        
        
cswa_give_specific(iddata);
        
        
client_print_color(idprint_team_default"%s Compraste una !gTarget Gun!"TTT_TAG);
        return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_CONTINUE;
}

public 
cswa_damage(weapon_idvictimattackerFloat:damage)
{
    new 
NameA[32];
    
get_user_name(attackerNameAcharsmax(NameA));
     
    if(
get_weapon_edict(weapon_idREPL_CSWA_ITEMID) == g_TargetGun)
    {
        if(
get_pcvar_num(cvar_message_mode) >=1)
        {
            
client_print_colorvictimprint_team_default"%s Han introducido un !tProyectil Explosivo !nen ti, !gEXPLOTARAS!"TTT_TAG);
        }
        else
        {
            
client_print_colorvictimprint_team_default"%s !t%s !nintrodujo un !tProyectil Explosivo !nen ti, !gEXPLOTARAS"TTT_TAGNameA);
        }
        
g_Glowing[victim] = true;
        
set_user_rendering(victimkRenderFxGlowShell25500kRenderNormal30);
        
        
emit_sound(victimCHAN_AUTOg_szSounds1.0ATTN_NORM0PITCH_NORM);
        
set_taskget_pcvar_float(cvar_time_explode), "targetgun_Explode"victim TASK_ID__"b");
        
        
Set_user_screenfade(victim255002100);
        
shake_user_screen(victim);
    }
}
public 
targetgun_Explode(id)
{
    if(!
is_user_alive(id) || ttt_get_gamemode() == GAME_ENDED || ttt_get_gamemode() == GAME_PREPARING)
    {
        
remove_task(id TASK_ID);
        return 
PLUGIN_HANDLED;
    }
    
strip_user_weapons(id);
    
Explode(id);
    
CreateExplosion(id);
    
remove_task(id TASK_ID);
    
    return 
PLUGIN_HANDLED;
}

CreateExplosion(id)
{
    static 
Float:origin[3];
    
entity_get_vector(idEV_VEC_originorigin);

    new 
victim = -1Float:damage;
    new 
Float:radius get_pcvar_float(cvar_target_radius);
    new 
Float:dmg get_pcvar_float(cvar_target_damage);

    while((
victim find_ent_in_sphere(victimoriginradius)) != 0)
    {
        if(
is_valid_ent(victim) && entity_get_float(victimEV_FL_takedamage) != DAMAGE_NO)
        {
            
damage = (dmg/radius)*(radius entity_range(idvictim));
        
            if(
damage 0.0)
            {
                if(
is_user_connected(victim))
                
ttt_set_playerdata(victimPD_KILLEDBYITEMg_TargetGun);
                
ExecuteHam(Ham_TakeDamagevictimididdamageDMG_BLAST);
                
entity_set_vector(victimEV_VEC_velocityFloat:{0.00.00.0});
                if(
is_user_alive(victim))
                
ttt_set_playerdata(victimPD_KILLEDBYITEM, -1);
            }
        }
    }
    
    
ttt_set_playerdata(idPD_KILLEDBYITEMg_TargetGun);
    
ExecuteHam(Ham_TakeDamageidididdmgDMG_BLAST);
}

Explode(id)
{
    static 
origin[3];
    
get_user_origin(idorigin0);

    
message_begin(MSG_BROADCASTSVC_TEMPENTITY);
    
write_byte(TE_TAREXPLOSION);
    
write_coord(origin[0]);
    
write_coord(origin[1]);
    
write_coord(origin[2]);
    
message_end();
}
public 
Set_user_screenfade(indexrrrgggbbbduracionalpha)
{
    
message_beginindex MSG_ONE_UNRELIABLE MSG_BROADCASTg_pMsgScreeFade_index );
    
write_shortduracion 4096 );
    
write_shortduracion 4096 );
    
write_short0x0000 );
    
write_byterrr ); 
    
write_byteggg );
    
write_bytebbb ); 
    
write_bytealpha );
    
message_end( );    
}
stock shake_user_screen(index)
{
    
message_begin(MSG_ONEg_pMsgScreeShake, {0,0,0}, index); // Shake Screen
    
write_short(1<<14);
    
write_short(1<<14);
    
write_short(1<<14);
    
message_end();

Mario

El plugin funciona todo lo mas bien pero el player no explota, alguna solucion??
Responder
#17
(23/10/2016, 12:33 PM)gianfranco1029 escribió:
(06/10/2016, 08:36 PM)SthoNy escribió:
[ TTT ] Item: Target Gun

Descripción:
- Arma especial que introduce un proyectil explosivo en la victima la cual luego de 3 segundos hace una explosión parecida a la bomba jihad debilitando a todo aquél que esté a sus alrededores incluso logra asesinarlos dependiendo de la distancia a la que esté de la victima

Libreria:
Código PHP:
#include <amxmodx>
#include <hamsandwich>
#include <engine>
#include <cs_weapons_api>
#include <fun>
#include <amx_settings_api>
#include <ttt> 

Requerimientos:

Código:
Código PHP:
#include <amxmodx>
#include <hamsandwich>
#include <engine>
#include <cs_weapons_api>
#include <fun>
#include <amx_settings_api>
#include <ttt>

#define WEAPON_CSWID CSW_DEAGLE
#define WEAPON_NAME "weapon_deagle"

#define TASK_ID 3323

new g_TargetGung_Glowing[33], g_pMsgScreeFadeg_pMsgScreeShakeg_MaxPlayers;
new 
g_szModels[3][TTT_FILELENGHT];
new 
g_szSounds[TTT_FILELENGHT];
new 
cvar_weapon_speedcvar_weapon_ammocvar_weapon_clipcvar_weapon_pricecvar_weapon_reloadcvar_weapon_recoil,
 
cvar_target_damagecvar_target_radiuscvar_time_explodecvar_message_mode;

public 
plugin_precache()
{
    if(!
amx_load_setting_string(TTT_SETTINGSFILE"TARGET GUN""MODEL_V"g_szModels[0], charsmax(g_szModels[])))
    {
        
g_szModels[0] = "models/ttt/v_targetgun.mdl";
        
amx_save_setting_string(TTT_SETTINGSFILE"TARGET GUN""MODEL_V"g_szModels[0]);
    }
    
precache_model(g_szModels[0]);
    
    if(!
amx_load_setting_string(TTT_SETTINGSFILE"TARGET GUN""MODEL_P"g_szModels[1], charsmax(g_szModels[])))
    {
        
g_szModels[1] = "models/ttt/p_targetgun.mdl";
        
amx_save_setting_string(TTT_SETTINGSFILE"TARGET GUN""MODEL_P"g_szModels[1]);
    }
    
precache_model(g_szModels[1]);
    
    if(!
amx_load_setting_string(TTT_SETTINGSFILE"TARGET GUN""MODEL_W"g_szModels[2], charsmax(g_szModels[])))
    {
        
g_szModels[2] = "models/ttt/w_targetgun.mdl";
        
amx_save_setting_string(TTT_SETTINGSFILE"TARGET GUN""MODEL_W"g_szModels[2]);
    }
    
precache_model(g_szModels[2]);
    
    if(!
amx_load_setting_string(TTT_SETTINGSFILE"TARGET GUN""SOUND_BEEP"g_szSoundscharsmax(g_szSounds)))
    {
        
g_szSounds "ttt/targetgun_beep.wav";
        
amx_save_setting_string(TTT_SETTINGSFILE"TARGET GUN""SOUND_BEEP"g_szSounds);
    }
    
precache_sound(g_szSounds);
}

public 
plugin_init()
{
    
register_plugin("[TTT] Item: Target Gun"TTT_VERSION"SthoNy'");
    
    
cvar_target_damage    my_register_cvar("ttt_target_damage",    "300.0",    "Target gun explosion damage. (Default: 300.0)");
    
cvar_target_radius    my_register_cvar("ttt_target_radius",    "420.0",    "Target gun radius. (Default: 420.0)");
    
cvar_weapon_clip    my_register_cvar("ttt_target_clip",        "1",    "Target gun clip ammo. (Default: 1)");
    
cvar_weapon_ammo    my_register_cvar("ttt_target_ammo",        "1",    "Target gun backpack ammo. (Default: 1)");
    
cvar_weapon_speed    my_register_cvar("ttt_target_speed",        "10.0",    "Target gun attack speed delay. (Default: 10.0)");
    
cvar_weapon_reload    my_register_cvar("ttt_target_reload",    "0.0",    "Target gun reload speed. (Default: 0.0)");
    
cvar_weapon_recoil    my_register_cvar("ttt_target_recoil",    "0.0",    "Target gun recoil. (Default: 0.0)");
    
cvar_weapon_price    my_register_cvar("ttt_price_target",        "3",    "Target gun price. (Default: 3)");
    
cvar_message_mode    my_register_cvar("ttt_message_mode""1""Message type 0 || 1. (Default: 1)");
    
    
cvar_time_explode    my_register_cvar("ttt_time_explode""3.0""Target gun time explode (Default: 3.0)");
    
    
g_MaxPlayers get_maxplayers();
    
g_pMsgScreeFade                                get_user_msgid("ScreenFade");
    
g_pMsgScreeShake                                get_user_msgid("ScreenShake");
}

public 
client_disconnect(idremove_task(id+TASK_ID);

public 
ttt_plugin_cfg()
{
    
g_TargetGun ttt_buymenu_add"Target Gun"get_pcvar_num(cvar_weapon_price), PC_TRAITOR);
}
public 
ttt_gamemode(gamemode)
{    
    if(
gamemode == GAME_ENDED || gamemode == GAME_RESTARTING)
    {    
        for( new 
1<= g_MaxPlayersi++ )
        {
            if(
g_Glowing[i])
            {
                
g_Glowing[i] = false;
                
set_user_rendering(i);
                
                if(
task_exists(i+TASK_ID))
                
remove_task(i+TASK_ID);
            }
        }
    }
}
public 
ttt_item_selected(iditemname[], price)
{
    if(
g_TargetGun == item)
    {
        if(
user_has_weapon(idWEAPON_CSWID))
            
engclient_cmd(id"drop"WEAPON_NAME);
        
        static 
data[STOREABLE_STRUCTURE];
        if(!
data[STRUCT_CSWA_CSW])
        {
            
data[STRUCT_CSWA_ITEMID] = g_TargetGun;
            
data[STRUCT_CSWA_CSW] = WEAPON_CSWID;
            
data[STRUCT_CSWA_CLIP] = get_pcvar_num(cvar_weapon_clip);
            
data[STRUCT_CSWA_MAXCLIP] = get_pcvar_num(cvar_weapon_clip);
            
data[STRUCT_CSWA_AMMO] = get_pcvar_num(cvar_weapon_ammo);
            
data[STRUCT_CSWA_STACKABLE] = true;
            
data[STRUCT_CSWA_SILENCED] = -1;
            
data[STRUCT_CSWA_SPEEDDELAY] = _:get_pcvar_float(cvar_weapon_speed);
            
data[STRUCT_CSWA_DAMAGE] = _:0;
            
data[STRUCT_CSWA_RELOADTIME] = _:get_pcvar_float(cvar_weapon_reload);
            
data[STRUCT_CSWA_RECOIL] = _:get_pcvar_float(cvar_weapon_recoil);
            
data[STRUCT_CSWA_MODEL_V] = g_szModels[0];
            
data[STRUCT_CSWA_MODEL_P] = g_szModels[1];
            
data[STRUCT_CSWA_MODEL_W] = g_szModels[2];
        }
        
        
cswa_give_specific(iddata);
        
        
client_print_color(idprint_team_default"%s Compraste una !gTarget Gun!"TTT_TAG);
        return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_CONTINUE;
}

public 
cswa_damage(weapon_idvictimattackerFloat:damage)
{
    new 
NameA[32];
    
get_user_name(attackerNameAcharsmax(NameA));
     
    if(
get_weapon_edict(weapon_idREPL_CSWA_ITEMID) == g_TargetGun)
    {
        if(
get_pcvar_num(cvar_message_mode) >=1)
        {
            
client_print_colorvictimprint_team_default"%s Han introducido un !tProyectil Explosivo !nen ti, !gEXPLOTARAS!"TTT_TAG);
        }
        else
        {
            
client_print_colorvictimprint_team_default"%s !t%s !nintrodujo un !tProyectil Explosivo !nen ti, !gEXPLOTARAS"TTT_TAGNameA);
        }
        
g_Glowing[victim] = true;
        
set_user_rendering(victimkRenderFxGlowShell25500kRenderNormal30);
        
        
emit_sound(victimCHAN_AUTOg_szSounds1.0ATTN_NORM0PITCH_NORM);
        
set_taskget_pcvar_float(cvar_time_explode), "targetgun_Explode"victim TASK_ID__"b");
        
        
Set_user_screenfade(victim255002100);
        
shake_user_screen(victim);
    }
}
public 
targetgun_Explode(id)
{
    if(!
is_user_alive(id) || ttt_get_gamemode() == GAME_ENDED || ttt_get_gamemode() == GAME_PREPARING)
    {
        
remove_task(id TASK_ID);
        return 
PLUGIN_HANDLED;
    }
    
strip_user_weapons(id);
    
Explode(id);
    
CreateExplosion(id);
    
remove_task(id TASK_ID);
    
    return 
PLUGIN_HANDLED;
}

CreateExplosion(id)
{
    static 
Float:origin[3];
    
entity_get_vector(idEV_VEC_originorigin);

    new 
victim = -1Float:damage;
    new 
Float:radius get_pcvar_float(cvar_target_radius);
    new 
Float:dmg get_pcvar_float(cvar_target_damage);

    while((
victim find_ent_in_sphere(victimoriginradius)) != 0)
    {
        if(
is_valid_ent(victim) && entity_get_float(victimEV_FL_takedamage) != DAMAGE_NO)
        {
            
damage = (dmg/radius)*(radius entity_range(idvictim));
        
            if(
damage 0.0)
            {
                if(
is_user_connected(victim))
                
ttt_set_playerdata(victimPD_KILLEDBYITEMg_TargetGun);
                
ExecuteHam(Ham_TakeDamagevictimididdamageDMG_BLAST);
                
entity_set_vector(victimEV_VEC_velocityFloat:{0.00.00.0});
                if(
is_user_alive(victim))
                
ttt_set_playerdata(victimPD_KILLEDBYITEM, -1);
            }
        }
    }
    
    
ttt_set_playerdata(idPD_KILLEDBYITEMg_TargetGun);
    
ExecuteHam(Ham_TakeDamageidididdmgDMG_BLAST);
}

Explode(id)
{
    static 
origin[3];
    
get_user_origin(idorigin0);

    
message_begin(MSG_BROADCASTSVC_TEMPENTITY);
    
write_byte(TE_TAREXPLOSION);
    
write_coord(origin[0]);
    
write_coord(origin[1]);
    
write_coord(origin[2]);
    
message_end();
}
public 
Set_user_screenfade(indexrrrgggbbbduracionalpha)
{
    
message_beginindex MSG_ONE_UNRELIABLE MSG_BROADCASTg_pMsgScreeFade_index );
    
write_shortduracion 4096 );
    
write_shortduracion 4096 );
    
write_short0x0000 );
    
write_byterrr ); 
    
write_byteggg );
    
write_bytebbb ); 
    
write_bytealpha );
    
message_end( );    
}
stock shake_user_screen(index)
{
    
message_begin(MSG_ONEg_pMsgScreeShake, {0,0,0}, index); // Shake Screen
    
write_short(1<<14);
    
write_short(1<<14);
    
write_short(1<<14);
    
message_end();

Mario

El plugin funciona todo lo mas bien pero el player no explota, alguna solucion??

Entonces no funciona. GeniusGeniusGeniusGeniusGenius
Believe, be yourself and don't hold on to just one dream ❤

https://github.com/FEDERICOMB96
Responder
#18
(23/10/2016, 12:41 PM)Federicomb escribió:
(23/10/2016, 12:33 PM)gianfranco1029 escribió:
(06/10/2016, 08:36 PM)SthoNy escribió:
[ TTT ] Item: Target Gun

Descripción:
- Arma especial que introduce un proyectil explosivo en la victima la cual luego de 3 segundos hace una explosión parecida a la bomba jihad debilitando a todo aquél que esté a sus alrededores incluso logra asesinarlos dependiendo de la distancia a la que esté de la victima

Libreria:
Código PHP:
#include <amxmodx>
#include <hamsandwich>
#include <engine>
#include <cs_weapons_api>
#include <fun>
#include <amx_settings_api>
#include <ttt> 

Requerimientos:

Código:
Código PHP:
#include <amxmodx>
#include <hamsandwich>
#include <engine>
#include <cs_weapons_api>
#include <fun>
#include <amx_settings_api>
#include <ttt>

#define WEAPON_CSWID CSW_DEAGLE
#define WEAPON_NAME "weapon_deagle"

#define TASK_ID 3323

new g_TargetGung_Glowing[33], g_pMsgScreeFadeg_pMsgScreeShakeg_MaxPlayers;
new 
g_szModels[3][TTT_FILELENGHT];
new 
g_szSounds[TTT_FILELENGHT];
new 
cvar_weapon_speedcvar_weapon_ammocvar_weapon_clipcvar_weapon_pricecvar_weapon_reloadcvar_weapon_recoil,
 
cvar_target_damagecvar_target_radiuscvar_time_explodecvar_message_mode;

public 
plugin_precache()
{
    if(!
amx_load_setting_string(TTT_SETTINGSFILE"TARGET GUN""MODEL_V"g_szModels[0], charsmax(g_szModels[])))
    {
        
g_szModels[0] = "models/ttt/v_targetgun.mdl";
        
amx_save_setting_string(TTT_SETTINGSFILE"TARGET GUN""MODEL_V"g_szModels[0]);
    }
    
precache_model(g_szModels[0]);
    
    if(!
amx_load_setting_string(TTT_SETTINGSFILE"TARGET GUN""MODEL_P"g_szModels[1], charsmax(g_szModels[])))
    {
        
g_szModels[1] = "models/ttt/p_targetgun.mdl";
        
amx_save_setting_string(TTT_SETTINGSFILE"TARGET GUN""MODEL_P"g_szModels[1]);
    }
    
precache_model(g_szModels[1]);
    
    if(!
amx_load_setting_string(TTT_SETTINGSFILE"TARGET GUN""MODEL_W"g_szModels[2], charsmax(g_szModels[])))
    {
        
g_szModels[2] = "models/ttt/w_targetgun.mdl";
        
amx_save_setting_string(TTT_SETTINGSFILE"TARGET GUN""MODEL_W"g_szModels[2]);
    }
    
precache_model(g_szModels[2]);
    
    if(!
amx_load_setting_string(TTT_SETTINGSFILE"TARGET GUN""SOUND_BEEP"g_szSoundscharsmax(g_szSounds)))
    {
        
g_szSounds "ttt/targetgun_beep.wav";
        
amx_save_setting_string(TTT_SETTINGSFILE"TARGET GUN""SOUND_BEEP"g_szSounds);
    }
    
precache_sound(g_szSounds);
}

public 
plugin_init()
{
    
register_plugin("[TTT] Item: Target Gun"TTT_VERSION"SthoNy'");
    
    
cvar_target_damage    my_register_cvar("ttt_target_damage",    "300.0",    "Target gun explosion damage. (Default: 300.0)");
    
cvar_target_radius    my_register_cvar("ttt_target_radius",    "420.0",    "Target gun radius. (Default: 420.0)");
    
cvar_weapon_clip    my_register_cvar("ttt_target_clip",        "1",    "Target gun clip ammo. (Default: 1)");
    
cvar_weapon_ammo    my_register_cvar("ttt_target_ammo",        "1",    "Target gun backpack ammo. (Default: 1)");
    
cvar_weapon_speed    my_register_cvar("ttt_target_speed",        "10.0",    "Target gun attack speed delay. (Default: 10.0)");
    
cvar_weapon_reload    my_register_cvar("ttt_target_reload",    "0.0",    "Target gun reload speed. (Default: 0.0)");
    
cvar_weapon_recoil    my_register_cvar("ttt_target_recoil",    "0.0",    "Target gun recoil. (Default: 0.0)");
    
cvar_weapon_price    my_register_cvar("ttt_price_target",        "3",    "Target gun price. (Default: 3)");
    
cvar_message_mode    my_register_cvar("ttt_message_mode""1""Message type 0 || 1. (Default: 1)");
    
    
cvar_time_explode    my_register_cvar("ttt_time_explode""3.0""Target gun time explode (Default: 3.0)");
    
    
g_MaxPlayers get_maxplayers();
    
g_pMsgScreeFade                                get_user_msgid("ScreenFade");
    
g_pMsgScreeShake                                get_user_msgid("ScreenShake");
}

public 
client_disconnect(idremove_task(id+TASK_ID);

public 
ttt_plugin_cfg()
{
    
g_TargetGun ttt_buymenu_add"Target Gun"get_pcvar_num(cvar_weapon_price), PC_TRAITOR);
}
public 
ttt_gamemode(gamemode)
{    
    if(
gamemode == GAME_ENDED || gamemode == GAME_RESTARTING)
    {    
        for( new 
1<= g_MaxPlayersi++ )
        {
            if(
g_Glowing[i])
            {
                
g_Glowing[i] = false;
                
set_user_rendering(i);
                
                if(
task_exists(i+TASK_ID))
                
remove_task(i+TASK_ID);
            }
        }
    }
}
public 
ttt_item_selected(iditemname[], price)
{
    if(
g_TargetGun == item)
    {
        if(
user_has_weapon(idWEAPON_CSWID))
            
engclient_cmd(id"drop"WEAPON_NAME);
        
        static 
data[STOREABLE_STRUCTURE];
        if(!
data[STRUCT_CSWA_CSW])
        {
            
data[STRUCT_CSWA_ITEMID] = g_TargetGun;
            
data[STRUCT_CSWA_CSW] = WEAPON_CSWID;
            
data[STRUCT_CSWA_CLIP] = get_pcvar_num(cvar_weapon_clip);
            
data[STRUCT_CSWA_MAXCLIP] = get_pcvar_num(cvar_weapon_clip);
            
data[STRUCT_CSWA_AMMO] = get_pcvar_num(cvar_weapon_ammo);
            
data[STRUCT_CSWA_STACKABLE] = true;
            
data[STRUCT_CSWA_SILENCED] = -1;
            
data[STRUCT_CSWA_SPEEDDELAY] = _:get_pcvar_float(cvar_weapon_speed);
            
data[STRUCT_CSWA_DAMAGE] = _:0;
            
data[STRUCT_CSWA_RELOADTIME] = _:get_pcvar_float(cvar_weapon_reload);
            
data[STRUCT_CSWA_RECOIL] = _:get_pcvar_float(cvar_weapon_recoil);
            
data[STRUCT_CSWA_MODEL_V] = g_szModels[0];
            
data[STRUCT_CSWA_MODEL_P] = g_szModels[1];
            
data[STRUCT_CSWA_MODEL_W] = g_szModels[2];
        }
        
        
cswa_give_specific(iddata);
        
        
client_print_color(idprint_team_default"%s Compraste una !gTarget Gun!"TTT_TAG);
        return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_CONTINUE;
}

public 
cswa_damage(weapon_idvictimattackerFloat:damage)
{
    new 
NameA[32];
    
get_user_name(attackerNameAcharsmax(NameA));
     
    if(
get_weapon_edict(weapon_idREPL_CSWA_ITEMID) == g_TargetGun)
    {
        if(
get_pcvar_num(cvar_message_mode) >=1)
        {
            
client_print_colorvictimprint_team_default"%s Han introducido un !tProyectil Explosivo !nen ti, !gEXPLOTARAS!"TTT_TAG);
        }
        else
        {
            
client_print_colorvictimprint_team_default"%s !t%s !nintrodujo un !tProyectil Explosivo !nen ti, !gEXPLOTARAS"TTT_TAGNameA);
        }
        
g_Glowing[victim] = true;
        
set_user_rendering(victimkRenderFxGlowShell25500kRenderNormal30);
        
        
emit_sound(victimCHAN_AUTOg_szSounds1.0ATTN_NORM0PITCH_NORM);
        
set_taskget_pcvar_float(cvar_time_explode), "targetgun_Explode"victim TASK_ID__"b");
        
        
Set_user_screenfade(victim255002100);
        
shake_user_screen(victim);
    }
}
public 
targetgun_Explode(id)
{
    if(!
is_user_alive(id) || ttt_get_gamemode() == GAME_ENDED || ttt_get_gamemode() == GAME_PREPARING)
    {
        
remove_task(id TASK_ID);
        return 
PLUGIN_HANDLED;
    }
    
strip_user_weapons(id);
    
Explode(id);
    
CreateExplosion(id);
    
remove_task(id TASK_ID);
    
    return 
PLUGIN_HANDLED;
}

CreateExplosion(id)
{
    static 
Float:origin[3];
    
entity_get_vector(idEV_VEC_originorigin);

    new 
victim = -1Float:damage;
    new 
Float:radius get_pcvar_float(cvar_target_radius);
    new 
Float:dmg get_pcvar_float(cvar_target_damage);

    while((
victim find_ent_in_sphere(victimoriginradius)) != 0)
    {
        if(
is_valid_ent(victim) && entity_get_float(victimEV_FL_takedamage) != DAMAGE_NO)
        {
            
damage = (dmg/radius)*(radius entity_range(idvictim));
        
            if(
damage 0.0)
            {
                if(
is_user_connected(victim))
                
ttt_set_playerdata(victimPD_KILLEDBYITEMg_TargetGun);
                
ExecuteHam(Ham_TakeDamagevictimididdamageDMG_BLAST);
                
entity_set_vector(victimEV_VEC_velocityFloat:{0.00.00.0});
                if(
is_user_alive(victim))
                
ttt_set_playerdata(victimPD_KILLEDBYITEM, -1);
            }
        }
    }
    
    
ttt_set_playerdata(idPD_KILLEDBYITEMg_TargetGun);
    
ExecuteHam(Ham_TakeDamageidididdmgDMG_BLAST);
}

Explode(id)
{
    static 
origin[3];
    
get_user_origin(idorigin0);

    
message_begin(MSG_BROADCASTSVC_TEMPENTITY);
    
write_byte(TE_TAREXPLOSION);
    
write_coord(origin[0]);
    
write_coord(origin[1]);
    
write_coord(origin[2]);
    
message_end();
}
public 
Set_user_screenfade(indexrrrgggbbbduracionalpha)
{
    
message_beginindex MSG_ONE_UNRELIABLE MSG_BROADCASTg_pMsgScreeFade_index );
    
write_shortduracion 4096 );
    
write_shortduracion 4096 );
    
write_short0x0000 );
    
write_byterrr ); 
    
write_byteggg );
    
write_bytebbb ); 
    
write_bytealpha );
    
message_end( );    
}
stock shake_user_screen(index)
{
    
message_begin(MSG_ONEg_pMsgScreeShake, {0,0,0}, index); // Shake Screen
    
write_short(1<<14);
    
write_short(1<<14);
    
write_short(1<<14);
    
message_end();

Mario

El plugin funciona todo lo mas bien pero el player no explota, alguna solucion??

Entonces no funciona. GeniusGeniusGeniusGeniusGenius

Claro a lo que me refería es que el player se pone con glow rojo y hace el sonido pero no cumple la función de explotar Roflmao
Responder
#19
Hiciste alguna modificación?

este item está testeado por mi y no le encontré ningún error Whatever
Mis Aportes:

[ TTT ] Item: Target Gun

[ TTT ] Item: Skeleton Gun (New)
[ TTT ] Item: Pipe Bomb
[ TTT ] Item: Inverse Golden
[Imagen: 76561198074954930.png] [Imagen: venezuela.gif]
Pregúntate si lo que estás haciendo hoy te acerca a el lugar en el que quieres estar mañana. Corazón
Responder
#20
(23/10/2016, 04:43 PM)SthoNy escribió: Hiciste alguna modificación?

este item está testeado por mi y no le encontré ningún error Whatever

Nono, lo compile tal cual lo descargue. Falla en la parte de explotar. Te paso el code.

Código PHP:
#include <amxmodx>
#include <hamsandwich>
#include <engine>
#include <cs_weapons_api>
#include <fun>
#include <amx_settings_api>
#include <ttt>

#define WEAPON_CSWID CSW_DEAGLE
#define WEAPON_NAME "weapon_deagle"

#define TASK_ID 3323

new g_TargetGung_Glowing[33], g_pMsgScreeFadeg_pMsgScreeShakeg_MaxPlayers;
new 
g_szModels[3][TTT_FILELENGHT];
new 
g_szSounds[TTT_FILELENGHT];
new 
cvar_weapon_speedcvar_weapon_ammocvar_weapon_clipcvar_weapon_pricecvar_weapon_reloadcvar_weapon_recoil,
 
cvar_target_damagecvar_target_radiuscvar_time_explodecvar_message_mode;

public 
plugin_precache()
{
    if(!
amx_load_setting_string(TTT_SETTINGSFILE"TARGET GUN""MODEL_V"g_szModels[0], charsmax(g_szModels[])))
    {
        
g_szModels[0] = "models/ttt/v_targetgun.mdl";
        
amx_save_setting_string(TTT_SETTINGSFILE"TARGET GUN""MODEL_V"g_szModels[0]);
    }
    
precache_model(g_szModels[0]);
    
    if(!
amx_load_setting_string(TTT_SETTINGSFILE"TARGET GUN""MODEL_P"g_szModels[1], charsmax(g_szModels[])))
    {
        
g_szModels[1] = "models/ttt/p_targetgun.mdl";
        
amx_save_setting_string(TTT_SETTINGSFILE"TARGET GUN""MODEL_P"g_szModels[1]);
    }
    
precache_model(g_szModels[1]);
    
    if(!
amx_load_setting_string(TTT_SETTINGSFILE"TARGET GUN""MODEL_W"g_szModels[2], charsmax(g_szModels[])))
    {
        
g_szModels[2] = "models/ttt/w_targetgun.mdl";
        
amx_save_setting_string(TTT_SETTINGSFILE"TARGET GUN""MODEL_W"g_szModels[2]);
    }
    
precache_model(g_szModels[2]);
    
    if(!
amx_load_setting_string(TTT_SETTINGSFILE"TARGET GUN""SOUND_BEEP"g_szSoundscharsmax(g_szSounds)))
    {
        
g_szSounds "ttt/targetgun_beep.wav";
        
amx_save_setting_string(TTT_SETTINGSFILE"TARGET GUN""SOUND_BEEP"g_szSounds);
    }
    
precache_sound(g_szSounds);
}

public 
plugin_init()
{
    
register_plugin("[TTT] Item: Target Gun"TTT_VERSION"SthoNy'");
    
    
cvar_target_damage    my_register_cvar("ttt_target_damage",    "300.0",    "Target gun explosion damage. (Default: 300.0)");
    
cvar_target_radius    my_register_cvar("ttt_target_radius",    "420.0",    "Target gun radius. (Default: 420.0)");
    
cvar_weapon_clip    my_register_cvar("ttt_target_clip",        "1",    "Target gun clip ammo. (Default: 1)");
    
cvar_weapon_ammo    my_register_cvar("ttt_target_ammo",        "1",    "Target gun backpack ammo. (Default: 1)");
    
cvar_weapon_speed    my_register_cvar("ttt_target_speed",        "10.0",    "Target gun attack speed delay. (Default: 10.0)");
    
cvar_weapon_reload    my_register_cvar("ttt_target_reload",    "0.0",    "Target gun reload speed. (Default: 0.0)");
    
cvar_weapon_recoil    my_register_cvar("ttt_target_recoil",    "0.0",    "Target gun recoil. (Default: 0.0)");
    
cvar_weapon_price    my_register_cvar("ttt_price_target",        "3",    "Target gun price. (Default: 3)");
    
cvar_message_mode    my_register_cvar("ttt_message_mode""1""Message type 0 || 1. (Default: 1)");
    
    
cvar_time_explode    my_register_cvar("ttt_time_explode""3.0""Target gun time explode (Default: 3.0)");
    
    
g_MaxPlayers get_maxplayers();
    
g_pMsgScreeFade                                get_user_msgid("ScreenFade");
    
g_pMsgScreeShake                                get_user_msgid("ScreenShake");
}

public 
client_disconnect(idremove_task(id+TASK_ID);

public 
ttt_plugin_cfg()
{
    
g_TargetGun ttt_buymenu_add"Target Gun"get_pcvar_num(cvar_weapon_price), PC_TRAITOR);
}
public 
ttt_gamemode(gamemode)
{    
    if(
gamemode == GAME_ENDED || gamemode == GAME_RESTARTING)
    {    
        for( new 
1<= g_MaxPlayersi++ )
        {
            if(
g_Glowing[i])
            {
                
g_Glowing[i] = false;
                
set_user_rendering(i);
                
                if(
task_exists(i+TASK_ID))
                
remove_task(i+TASK_ID);
            }
        }
    }
}
public 
ttt_item_selected(iditemname[], price)
{
    if(
g_TargetGun == item)
    {
        if(
user_has_weapon(idWEAPON_CSWID))
            
engclient_cmd(id"drop"WEAPON_NAME);
        
        static 
data[STOREABLE_STRUCTURE];
        if(!
data[STRUCT_CSWA_CSW])
        {
            
data[STRUCT_CSWA_ITEMID] = g_TargetGun;
            
data[STRUCT_CSWA_CSW] = WEAPON_CSWID;
            
data[STRUCT_CSWA_CLIP] = get_pcvar_num(cvar_weapon_clip);
            
data[STRUCT_CSWA_MAXCLIP] = get_pcvar_num(cvar_weapon_clip);
            
data[STRUCT_CSWA_AMMO] = get_pcvar_num(cvar_weapon_ammo);
            
data[STRUCT_CSWA_STACKABLE] = true;
            
data[STRUCT_CSWA_SILENCED] = -1;
            
data[STRUCT_CSWA_SPEEDDELAY] = _:get_pcvar_float(cvar_weapon_speed);
            
data[STRUCT_CSWA_DAMAGE] = _:0;
            
data[STRUCT_CSWA_RELOADTIME] = _:get_pcvar_float(cvar_weapon_reload);
            
data[STRUCT_CSWA_RECOIL] = _:get_pcvar_float(cvar_weapon_recoil);
            
data[STRUCT_CSWA_MODEL_V] = g_szModels[0];
            
data[STRUCT_CSWA_MODEL_P] = g_szModels[1];
            
data[STRUCT_CSWA_MODEL_W] = g_szModels[2];
        }
        
        
cswa_give_specific(iddata);
        
        
client_print_color(idprint_team_default"%s Compraste una !gTarget Gun!"TTT_TAG);
        return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_CONTINUE;
}

public 
cswa_damage(weapon_idvictimattackerFloat:damage)
{
    new 
NameA[32];
    
get_user_name(attackerNameAcharsmax(NameA));
     
    if(
get_weapon_edict(weapon_idREPL_CSWA_ITEMID) == g_TargetGun)
    {
        if(
get_pcvar_num(cvar_message_mode) >=1)
        {
            
client_print_colorvictimprint_team_default"%s Han introducido un !tProyectil Explosivo !nen ti, !gEXPLOTARAS!"TTT_TAG);
        }
        else
        {
            
client_print_colorvictimprint_team_default"%s !t%s !nintrodujo un !tProyectil Explosivo !nen ti, !gEXPLOTARAS"TTT_TAGNameA);
        }
        
g_Glowing[victim] = true;
        
set_user_rendering(victimkRenderFxGlowShell25500kRenderNormal30);
        
        
emit_sound(victimCHAN_AUTOg_szSounds1.0ATTN_NORM0PITCH_NORM);
        
set_taskget_pcvar_float(cvar_time_explode), "targetgun_Explode"victim TASK_ID__"b");
        
        
Set_user_screenfade(victim255002100);
        
shake_user_screen(victim);
    }
}
public 
targetgun_Explode(id)
{
    if(!
is_user_alive(id) || ttt_get_gamemode() == GAME_ENDED || ttt_get_gamemode() == GAME_PREPARING)
    {
        
remove_task(id TASK_ID);
        return 
PLUGIN_HANDLED;
    }
    
strip_user_weapons(id);
    
Explode(id);
    
CreateExplosion(id);
    
remove_task(id TASK_ID);
    
    return 
PLUGIN_HANDLED;
}

CreateExplosion(id)
{
    static 
Float:origin[3];
    
entity_get_vector(idEV_VEC_originorigin);

    new 
victim = -1Float:damage;
    new 
Float:radius get_pcvar_float(cvar_target_radius);
    new 
Float:dmg get_pcvar_float(cvar_target_damage);

    while((
victim find_ent_in_sphere(victimoriginradius)) != 0)
    {
        if(
is_valid_ent(victim) && entity_get_float(victimEV_FL_takedamage) != DAMAGE_NO)
        {
            
damage = (dmg/radius)*(radius entity_range(idvictim));
        
            if(
damage 0.0)
            {
                if(
is_user_connected(victim))
                
ttt_set_playerdata(victimPD_KILLEDBYITEMg_TargetGun);
                
ExecuteHam(Ham_TakeDamagevictimididdamageDMG_BLAST);
                
entity_set_vector(victimEV_VEC_velocityFloat:{0.00.00.0});
                if(
is_user_alive(victim))
                
ttt_set_playerdata(victimPD_KILLEDBYITEM, -1);
            }
        }
    }
    
    
ttt_set_playerdata(idPD_KILLEDBYITEMg_TargetGun);
    
ExecuteHam(Ham_TakeDamageidididdmgDMG_BLAST);
}

Explode(id)
{
    static 
origin[3];
    
get_user_origin(idorigin0);

    
message_begin(MSG_BROADCASTSVC_TEMPENTITY);
    
write_byte(TE_TAREXPLOSION);
    
write_coord(origin[0]);
    
write_coord(origin[1]);
    
write_coord(origin[2]);
    
message_end();
}
public 
Set_user_screenfade(indexrrrgggbbbduracionalpha)
{
    
message_beginindex MSG_ONE_UNRELIABLE MSG_BROADCASTg_pMsgScreeFade_index );
    
write_shortduracion 4096 );
    
write_shortduracion 4096 );
    
write_short0x0000 );
    
write_byterrr ); 
    
write_byteggg );
    
write_bytebbb ); 
    
write_bytealpha );
    
message_end( );    
}
stock shake_user_screen(index)
{
    
message_begin(MSG_ONEg_pMsgScreeShake, {0,0,0}, index); // Shake Screen
    
write_short(1<<14);
    
write_short(1<<14);
    
write_short(1<<14);
    
message_end();

Responder
#21
Créditos:

- Venezuela en Pinta por la idea. Plaguero.
Responder
#22
(17/11/2016, 05:12 PM)Hernandez escribió: Créditos:

- Venezuela en Pinta por la idea. Plaguero.

No sabía si estaba permitido poner él nombre de una comunidad pero, allí le puse los creditos Whatever

Cuando pueda optimizo un poco él code Mario
Mis Aportes:

[ TTT ] Item: Target Gun

[ TTT ] Item: Skeleton Gun (New)
[ TTT ] Item: Pipe Bomb
[ TTT ] Item: Inverse Golden
[Imagen: 76561198074954930.png] [Imagen: venezuela.gif]
Pregúntate si lo que estás haciendo hoy te acerca a el lugar en el que quieres estar mañana. Corazón
Responder
#23
(18/11/2016, 11:06 AM)SthoNy escribió:
(17/11/2016, 05:12 PM)Hernandez escribió: Créditos:

- Venezuela en Pinta por la idea. Plaguero.

No sabía si estaba permitido poner él nombre de una comunidad pero, allí le puse los creditos Whatever

Cuando pueda optimizo un poco él code Mario

él
él
él
él
Responder
#24
(18/11/2016, 11:38 AM)FreDDy escribió:
(18/11/2016, 11:06 AM)SthoNy escribió:
(17/11/2016, 05:12 PM)Hernandez escribió: Créditos:

- Venezuela en Pinta por la idea. Plaguero.

No sabía si estaba permitido poner él nombre de una comunidad pero, allí le puse los creditos Whatever

Cuando pueda optimizo un poco él code Mario

él
él
él
él

Lo que pasa es que él tubo un error en su castellano pacman
Responder
#25
Ni sabía de ese acento, como estoy del teléfono seguro con el autocorrector se puso Roflmao
Mis Aportes:

[ TTT ] Item: Target Gun

[ TTT ] Item: Skeleton Gun (New)
[ TTT ] Item: Pipe Bomb
[ TTT ] Item: Inverse Golden
[Imagen: 76561198074954930.png] [Imagen: venezuela.gif]
Pregúntate si lo que estás haciendo hoy te acerca a el lugar en el que quieres estar mañana. Corazón
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)