Jump to content

Cerere plugin


TeG!^ KenT..

Recommended Posts

Grenadele:

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <fakemeta_util>

new g_Enable;
new g_bwEnt[33];


new const model_nade_world[] = "models/snowballs/w_snowball.mdl" 
new const model_nade_view[] = "models/snowballs/v_snowball.mdl" 
new const model_trail[] = "sprites/laserbeam.spr"
new on
new rendering
new trail

//For snowball trail
new g_trail
public plugin_init() {
   register_plugin( "Christmass", "1.0", "anakin_cstrike" );
   register_cvar("santa_hat", "1.1", FCVAR_SERVER);
   g_Enable = register_cvar("amx_santahat", "1");
   
   RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1);
   
   on = register_cvar("snowballs_on","0")
   if(get_pcvar_num(on))
   {
      rendering = register_cvar("snowballs_rendering","1")
      trail = register_cvar("snowballs_trail","1")
      
      register_forward(FM_SetModel,"forward_model")
      
      register_event("CurWeapon","func_modelchange_hook","be","1=1","2=4","2=9","2=25")
   }
}

public plugin_precache()
{
   engfunc(EngFunc_PrecacheModel,model_nade_world)
   engfunc(EngFunc_PrecacheModel,model_nade_view)
   engfunc(EngFunc_PrecacheModel,model_nade_view)
   
   engfunc ( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "env_snow" ) );
   
   g_trail = engfunc(EngFunc_PrecacheModel,model_trail)
   
}

public fwHamPlayerSpawnPost( const player ) { // Cleanup by arkshine
   if ( get_pcvar_num( g_Enable ) && is_user_alive( player ) && !pev_valid ( g_bwEnt[ player ] ) ) {
      g_bwEnt[ player ] = engfunc ( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "info_target" ) );
      set_pev( g_bwEnt[ player ], pev_movetype, MOVETYPE_FOLLOW );
      set_pev( g_bwEnt[ player ], pev_aiment, player );
      engfunc( EngFunc_SetModel, g_bwEnt[ player ], "" );
   }
}

public func_modelchange_hook(id)
   set_pev(id, pev_viewmodel2,model_nade_view)
   
public forward_model(entity,const model[])
{
   if(!pev_valid(entity))
      return FMRES_IGNORED
   
   if ( model[ 0 ] == 'm' && model[ 7 ] == 'w' && model[ 8 ] == '_' )
   {
      switch ( model[ 9 ] )
      {
         case 'f' :
         {
            engfunc ( EngFunc_SetModel, entity, model_nade_world )
            if(get_pcvar_num(trail))
            {
               fm_set_trail(entity,255,255,255,255)
            }
            if(get_pcvar_num(rendering))
            {
               fm_set_rendering ( entity, kRenderFxGlowShell, 255, 255, 255, kRenderNormal, 255 )
            }
      
         }
         case 'h' :
         {
            engfunc ( EngFunc_SetModel, entity, model_nade_world )
            if(get_pcvar_num(trail))
            {
               fm_set_trail(entity,255,0,0,255)
            }
            if(get_pcvar_num(rendering))
            {
               fm_set_rendering ( entity, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 255 )
            }
         }
         case 's' :
         {
            engfunc ( EngFunc_SetModel, entity, model_nade_world )
            if(get_pcvar_num(trail))
            {
               fm_set_trail(entity,0,255,0,255)
            }
            if(get_pcvar_num(rendering))
            {
               fm_set_rendering ( entity, kRenderFxGlowShell, 0, 255, 0, kRenderNormal, 255 )
            }
         }
      }
      return FMRES_SUPERCEDE
   }
    
   return FMRES_IGNORED
}
stock fm_set_trail(id,r,g,b,bright)
{
   message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
   write_byte(TE_BEAMFOLLOW)              
   write_short(id)         
   write_short(g_trail)        
   write_byte(25)              
   write_byte(5)               
   write_byte(r)             
   write_byte(g)               
   write_byte(                
   write_byte(bright)                
   message_end()

C4:

http://www.girlshare.ro/31875826.4

 

Te descurci cu ele sau ai nevoie de ajutor?

 

Edit:In loc de costume la jucatori,vrei niste caciulite? Pentru ca ala cu costum poate sa faca lag

Edited by me KLAUS
Link to comment
Share on other sites

Ti-l fac in 10 min,dau edit

 

Edit:

#include < amxmodx >
#include < engine >
#include < cstrike >
#include < hamsandwich >
 
new const g_szHatModel[ CsTeams ][ ] = {
"",
"models/santahat.mdl",
"models/santahat_blue.mdl",
       "" 
};
 
new g_iHats[ 33 ];
 
public plugin_init( ) {
register_plugin( "Santa Hat + Snow", "1.3", "xPaw" );
 
register_cvar( "santa_hat", "1.3", FCVAR_SERVER );
 
register_event( "TeamInfo", "EventTeamInfo", "a" );
 
RegisterHam( Ham_Spawn, "player", "FwdHamPlayerSpawn", 1 );
}
 
public plugin_precache( ) { 
//  create_entity( "env_snow" );
 
precache_model( g_szHatModel[ CS_TEAM_T ] );    
precache_model( g_szHatModel[ CS_TEAM_CT ] ); 
}
 
public client_disconnect( id )     
if( is_valid_ent( g_iHats[ id ] ) )         
remove_entity( g_iHats[ id ] ) ;
 
public FwdHamPlayerSpawn( const id ) {     
if( is_user_alive( id ) ) {         
new iEntity = g_iHats[ id ];
 
if( !is_valid_ent( iEntity ) ) {            
if( !( iEntity = g_iHats[ id ] = create_entity( "info_target" ) ) )                
return;
 
new CsTeams:iTeam = cs_get_user_team( id );                       
  
if( iTeam != CS_TEAM_T && iTeam != CS_TEAM_CT )                 
iTeam = CS_TEAM_T;                         
entity_set_model( iEntity, g_szHatModel[ iTeam ] );             
entity_set_int( iEntity, EV_INT_movetype, MOVETYPE_FOLLOW );             
entity_set_edict( iEntity, EV_ENT_aiment, id );        
}    
} 
}
 
public EventTeamInfo( ) {    
new id = read_data( 1 ), iEntity = g_iHats[ id ];
 
if( !is_valid_ent( iEntity ) ) {       
  if( iEntity > 0 )           
  g_iHats[ id ] = 0;
 
return;    
}
 
new szTeam[ 2 ];     
read_data( 2, szTeam, 1 );
 
if( szTeam[ 0 ] == 'C' )         
entity_set_model( iEntity, g_szHatModel[ CS_TEAM_CT ] );
else
entity_set_model( iEntity, g_szHatModel[ CS_TEAM_T ] ); 
}

Daca nu functioneaza,imi spui,ca nu am mai facut de mult din astea

Edited by me KLAUS
Link to comment
Share on other sites

Uite aici ai tot ce-ti trebuie . Download 

 

Contine urmatoarele : 

;Cand Tero planteaza C4/Bomba aceasta este sub forma de brad de craciun.
cs16_xmas_c4.amxx

;Toti jucatorii de pe server o sa aibe caciulite de mos craciun.
;La CT o sa fie albastre, iar la T o sa fie rosii.
cs16_xmas_hats.amxx

;Pe intregul server ninge si cerul este instelat.
cs16_xmas_snow.amxx

;Toti jucatorii de pe server o sa aibe in loc de modelul de grenada un bulgare de zapada.
;Pe langa acest bulgare de zapada mai este si un efect de tip "trail" sub forma de laser.
cs16_xmas_snowballs.amxx

;In fiecare runda serverul alege un jucator norocos pe care-l face "Salvatorul craciunului".
;Acesta are extra beneficii precum: 150HP+100ARMURA+HE+FLASH+SMOKE.
;Alt extra beneficiu este ca modelul se schimba instant intr-un mos craciun rosu.
;Acest "Salvator al craciunului" este recomandat doar pe modul clasic!
cs16_xmas_salvator.amxx
Instalare
Se uploadeaza folderele addons + models  peste cele existente din FTP-ul serverului dumneavoastra.
Dupa se configureaza fisierul amxmodx/configs/plugins-xmas.ini dupa bunul plac
Pentru a dezactiva unul dintre aceste pluginuri va rugam sa puneti in fata acestora semnul ; (;plugin.amxx). Sau puteti sterge pur si simplu.
 
 
 
Sper ca te-am ajutat .
  • Like 1
Link to comment
Share on other sites

uite care este ,;Toti jucatorii de pe server o sa aibe in loc de modelul de grenada un bulgare de zapada.

;Pe langa acest bulgare de zapada mai este si un efect de tip "trail" sub forma de laser.
;cs16_xmas_snowballs.amxx
 
Cand se planta bomba cadea sv
 
scz de dublu post imi pare rau
 
Si l-eam activat pe toata in afara de cs16_xmas_snowballs.amxx si tot cadea sv dar nu cand plantai bomba sa zic la 20-30 de minute
Link to comment
Share on other sites

Daca zici ca ala cu bulgarii dezapada ar fi problema inlocuieste-l cu asta : 

 

sw_resources.zip

sw_plugin305.zip

 

Cvar's :

sw_toggle - is mod on/off? (default ON - 1)
sw_friendly - is friendly fire on/off? (default OFF - 0)
sw_damage - damage done by snowball (default 100)
sw_life - life of snowball splat (default 3.0)
sw_dm - is deathmatch on/off? (defualt OFF - 0)
sw_dm_time - time to respawn (default 2.0)
sw_chill_chance - chance to chill player (from 0 - off, to 100 - maximum chance, default 30)
sw_chill_duration - duration of chill (default 5.0)
sw_chill_speed - percentage of speed that player receives when chilled (default 50.0)
sw_snowball_gravity - gravity of snowball (default 0.3)
sw_snowball_velocity - how many times snowball velocity will be multipied (default 2.0 times)
sw_crosshair_remove - will be crosshair removed (default ON - 1)
sw_spawn_protection - is spawn protection on? (default ON - 1)
sw_spawn_protection_time - time of spawn protection (default 3.0)

La plugin e doar .sma ti-l faci dupa bunul plac apoi il compilezi .

Edited by th3#doc
Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...