Salvatorul Craciunului [Xmas Random] v2.0
In Sistem de vot IPB scris de: bubulino  27/3/2020, 4:49 pm

In FgDesign România scris de: Emanuel  24/3/2020, 1:59 pm

In Tema Infinigame [punbb] scris de: Emanuel  24/3/2020, 11:36 am

In Categorie Protejata scris de: ♥ мιнαιѕυρρσят ♥  30/11/2019, 10:19 pm

In [punbb] Tema InvizionVirus scris de: pariuriz  21/1/2019, 10:51 pm

In Leis setat de BuLLeT scris de: Offline  19/1/2019, 5:07 pm

In RPG.PLAYES.RO, WE MAKE THE DIFFERENCE! scris de: Andro  30/12/2018, 11:14 pm


 » ONLINE » Counter-Strike » Pluginuri » 


1 Salvatorul Craciunului [Xmas Random] v2.0  Empty Salvatorul Craciunului [Xmas Random] v2.0 la data de 30/11/2013, 9:12 pm

Emanuel

Emanuel
Fondator
Fondator
Multumiri primite : 448
Mesaje scrise : 6639
Data de inscriere : 08/07/2011
Varsta : 2
Puncte obtinute : 11139
100%
Descriere: Acest plugin este un Update al plugin-ului original facut de S3eKer^ (
Link ) ! Ce este nou? Am schimbat modelul moshului, adaugare cvar-uri, viteza, gloante infinite, si un efect foarte frumos( atunci cand omorati mosul din el vor sari fulgi de zapada). Vedeti pozele mai jos.
Descarcare: GirlShare!

SMA:
/* Credits: Reptyle a.k.a S3eKeR^ : plugin-ul original.
YONTU: Adaugare Cvar-uri, efecte, viteza, gloante infinite, opimizare cod.*/

#include < amxmodx >
#include < fakemeta >
#include < cstrike >
#include < hamsandwich >
#include < fun >
#include < CC_ColorChat >

#pragma semicolon 1

#define PLUGIN "Xmas Random"
#define VERSION "2.0"

#define OFFSET_LINUX_WEAPONS 4
#define OFFSET_WEAPON_OWNER 41
#define OFFSET_CLIPAMMO 51
#define OFFSET_ACTIVE_ITEM 373
#define NO_UCLIP_WEAPONS_BITSUM ( ( 1<
new const g_iMaxClips[  ] = { 0, 13, 0, 10, 0, 7, 0, 30, 30, 0, 15, 20, 25, 30, 35, 25, 12, 20, 10, 30, 100, 8, 30, 30, 20, 0, 7, 30, 30, 0, 50 };
new const SpriteSnow[  ] = "sprites/snowflakes.spr";
new const g_szModel[  ] = "xmas_red2";

new Snow;
new g_iLastSaverId;
new bool:g_bUserHasSpeed[ 33 ], bool:g_bUserHasUClip[ 33 ];

new g_iCvarRandomHealth,
g_iCvarRandomArmor,
g_iCvarRandomSpeed;

public plugin_init( ) {

register_plugin( PLUGIN, VERSION, "Reptyle a.k.a S3ekEr" );

register_logevent( "logevent_RoundStart", 2, "1=Round_Start" );

register_event( "DeathMsg",  "EventDeathMsg",  "a" );
register_event( "CurWeapon", "CurWeapon2", "be", "1=1" );

RegisterHam( Ham_Spawn, "player", "fwd_HamPlayerSpawnPost", 1 );
RegisterHam( Ham_Killed, "player", "fwd_HamPlayerKill" );

g_iCvarRandomHealth = register_cvar( "xmas_random_hp", "255" );
g_iCvarRandomArmor = register_cvar( "xmas_random_ap", "200" );
g_iCvarRandomSpeed = register_cvar( "xmas_random_speed", "400.0" );
}

public plugin_precache(  ) {

new szBuff[ 128 ];
formatex( szBuff, charsmax( szBuff ), "models/player/%s/%s.mdl", g_szModel, g_szModel );

precache_model(szBuff);

Snow = precache_model( SpriteSnow );
}

public client_putinserver( id ) {

g_bUserHasSpeed[ id ] = false;
g_bUserHasUClip[ id ] = false;
}

public client_disconnect( id ) {

g_bUserHasSpeed[ id ] = false;
g_bUserHasUClip[ id ] = false;
}

//lower the SVC_BAD error / maybe?
public logevent_RoundStart(  ) {

set_task( 0.1, "task_SetSanta" );
}

public task_SetSanta(  ) {

//get random player and don't get it twice in a row
new iPlayer;
do {

iPlayer = GetRandomPlayer( "ah" );
}

while( ( iPlayer == g_iLastSaverId || !is_user_connected( iPlayer) ) && iPlayer != 0 );

if( !iPlayer )
return;

set_user_health( iPlayer, get_pcvar_num( g_iCvarRandomHealth ) );
set_user_armor( iPlayer, get_pcvar_num( g_iCvarRandomArmor ) );
g_bUserHasSpeed[ iPlayer ] = true;
g_bUserHasUClip[ iPlayer ] = true;

give_item( iPlayer, "weapon_hegrenade" );
give_item( iPlayer, "weapon_smokegrenade" );
give_item( iPlayer, "weapon_flashbang" );
give_item( iPlayer, "weapon_flashbang" );

cs_set_user_model( iPlayer, g_szModel );

ColorChat( 0, GREEN, "^x01--------------------^x03--------------------^x04--------------------^x01--------------------^x03--------------------^x04--------------------");
ColorChat( 0, GREEN, "^x04[ Xmas ]^x03 %s^x01 a fost ales salvatorul^x03 Craciunului^x01!^x04 %i HP^x01 +^x04 %i AP^x01 -^x04 HE^x01 +^x04 FLASH^x01!^x03 Ho Ho Ho^x01!", get_name( iPlayer ), get_pcvar_num( g_iCvarRandomHealth ), get_pcvar_num( g_iCvarRandomArmor ) );
ColorChat( 0, GREEN, "^x01--------------------^x03--------------------^x04--------------------^x01--------------------^x03--------------------^x04--------------------");

g_iLastSaverId = iPlayer;
}

public EventDeathMsg(  ) {

new iVictim  = read_data( 2 );

if( iVictim == g_iLastSaverId ) {

new Float:fOrigin[ 3 ], iOrigin[ 3 ];
pev( iVictim, pev_origin, fOrigin );
FVecIVec( fOrigin, iOrigin );

UTIL_CreateSnow( iOrigin, Snow, random_num( 40, 60 ), random_num( 10, 15 ), random_num( 5, 10 ) );
}
}

public CurWeapon2( id ) {

if( g_bUserHasSpeed[ id ] ) {

set_user_maxspeed( id, get_pcvar_float( g_iCvarRandomSpeed ) );
}

else {

set_user_maxspeed( id, 260.0 );
}

if(  g_bUserHasUClip[ id ] ) {

new iWeapon = read_data( 2 );

if( !( NO_UCLIP_WEAPONS_BITSUM & ( 1 << iWeapon ) ) ) {

set_pdata_int( get_pdata_cbase( id, OFFSET_ACTIVE_ITEM ), OFFSET_CLIPAMMO, g_iMaxClips[ iWeapon ], OFFSET_LINUX_WEAPONS );
}
}
}

public fwd_HamPlayerSpawnPost( id ) {

if( !is_user_connected( id ) )
return HAM_IGNORED;

if( id == g_iLastSaverId )
cs_reset_user_model( id );

return HAM_IGNORED;
}

public fwd_HamPlayerKill( iVictim, iAttacker ) {

if( iVictim == g_iLastSaverId ) {

ColorChat( 0, GREEN, "^x04[ Xmas ]^x01 Salvatorul Craciunului^x03 %s^x01 a fost omorat de^x03 %s^x01 !", get_name( iVictim ), get_name( iAttacker ) );
g_bUserHasSpeed[ iVictim ] = false;
g_bUserHasUClip[ iVictim ] = false;
}
}

stock GetRandomPlayer( const flags[  ] = "", const team[  ]= "" ) {

new iPlayers[ 32 ], iNum;
get_players( iPlayers, iNum, flags, team );

return iNum ? iPlayers[ random_num( 0, iNum - 1 ) ] : 0;
}

stock UTIL_CreateSnow( const iOrigin[ 3 ], const iSpriteID, const iCount, const iLife, const iScale ) {

message_begin( MSG_BROADCAST,SVC_TEMPENTITY );
write_byte( TE_SPRITETRAIL );
write_coord( iOrigin[ 0 ] ); // start position (X)
write_coord( iOrigin[ 1 ] ); // start position (Y)
write_coord( iOrigin[ 2 ] ); // start position (Z)
write_coord( iOrigin[ 0 ] ); // end position (X)
write_coord( iOrigin[ 1 ] ); // end position (Y)
write_coord( iOrigin[ 2 ] + random_num( 40, 60 ) ); // end position (Z)
write_short( iSpriteID ); // sprite index
write_byte( iCount ); // number of snow
write_byte( iLife ); // life in 0.1's
write_byte( iScale ); // scale in 0.1's
write_byte( random_num( 40, 55 ) ); // velocity along vector in 10's
write_byte( random_num( 15, 15 ) ); // randomness of velocity in 10's
message_end(  );
}

stock get_name( id ) {

new szName[ 32 ];
get_user_name( id, szName, sizeof( szName ) -1 );

return szName;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/

Nume: Xmas Random with new Update
Versiune: 2.0
Link oficial: Aici.

Instalare:
1. Fisierul Xmas_red2.sma il puneti in addons/amxmodx/scripting !
2. Fisierul Xmas_red2.amxx il puneti in addons/amxmodx/plugins !
3. Fisierul snowflakes.spr il puneti in cstrike/sprites !
4. Fisierul xmas_red2.spr il puneti in cstrike/models/xmas_red2 !
5. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:
Cod:
Xmas_red2.amxx
6. Alti pasi necesari....

Cvar-uri (se adauga in fisierul amxmodx\configs\amxx.cfg):

    xmas_random_hp "VIATA" - cata viata sa primeasca mosul
    xmas_random_ap "ARMURA" - cata armura sa primeasca mosul
    xmas_random_speed "VITEZA.0" - cata viteza sa primeasca mosul


Module necesare (se sterge ; din fata modulului de mai jos; acestea le gasiti in fisierul amxmodx\configs\modules.ini):
- Fakemeta
- CStrike
- Hamsandwich
- Fun
Imagini:
 Salvatorul Craciunului [Xmas Random] v2.0  2-1385149936

 Salvatorul Craciunului [Xmas Random] v2.0  5-1385149954

 Salvatorul Craciunului [Xmas Random] v2.0  Poza1

 Salvatorul Craciunului [Xmas Random] v2.0  Poza3

 Salvatorul Craciunului [Xmas Random] v2.0  Poza5

 Salvatorul Craciunului [Xmas Random] v2.0  Poza6

2 Salvatorul Craciunului [Xmas Random] v2.0  Empty Re: Salvatorul Craciunului [Xmas Random] v2.0 la data de 30/11/2013, 9:32 pm

asica

asica
Designer
Multumiri primite : 38
Mesaje scrise : 1032
Data de inscriere : 03/03/2013
Varsta : 22
Locație : © InfiniGame
Puncte obtinute : 1416
100%
Foarte bun pentru sabatori Smile

Vezi subiectul anterior Vezi subiectul urmator Sus  Mesaj [Pagina 1 din 1]