Sky^^ Publicado 9 de abril del 2016 Denunciar Publicado 9 de abril del 2016 TTT Item Invisible Descripción: - Al comprar este item, se te otorgará 10 Segundos de invisibilidad(solo si sos Traidor).Cvars: cvarTimeInvisible = register_cvar( "ttt_timeinvisible", "10.0" ) // Tiempo de la invisibilidad. cvarPriceInvisible = register_cvar( "ttt_priceinvisible", "1000" ) // Precio de la invisibilidad. Requerimientos: - Mod Trouble in Terrorist Town mod Código: #include <amxmodx> #include <cstrike> #include <fun> #include <ttt> new const PluginAndPrefix[ ][ ] = { "[TTT] Invisible Item", "1.0", "Skylar", "[ TTT ]" }; new gInvisibleItem; new cvarTimeInvisible, cvarPriceInvisible; public plugin_init( ) { register_plugin( PluginAndPrefix[ 0 ], PluginAndPrefix[ 1 ], PluginAndPrefix[ 2 ] ); cvarTimeInvisible = register_cvar( "ttt_timeinvisible", "10.0" ); cvarPriceInvisible = register_cvar( "ttt_priceinvisible", "1000" ); } public ttt_plugin_cfg( ) { new name[ TTT_ITEMLENGHT ]; formatex( name, charsmax( name ), "Invisible (10 Segundos)" ); gInvisibleItem = ttt_buymenu_add( name, get_pcvar_num( cvarPriceInvisible ), PC_TRAITOR ); } public ttt_item_selected( id, item, name[ ], price ) { if( !is_user_alive( id ) ) return PLUGIN_HANDLED; if( gInvisibleItem == item ) { client_print( id, print_chat, "%s Compraste: Invisible (10 Segundos)", PluginAndPrefix[ 3 ] ); set_user_rendering( id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 40 ); set_task( get_pcvar_float( cvarTimeInvisible ), "RemoveInvisible", id ); } return PLUGIN_HANDLED; } public RemoveInvisible( id ) set_user_rendering( id, kRenderFxNone, 0, 0, 0, kRenderNormal, 25 );
Posts recomendados