Pluginuri Craciun

In jos

Pluginuri Craciun

Mesaj Scris de -delete la data de Mar Dec 28, 2010 2:29 am

M-am gandit sa postez cateva pluginuri pentru Craciun , deoarece suntem la un pas de el!
Am facut o lista de pluginuri pentru serverele voastre:

1.C4 inlocuit de un bradut!

Christmas C4| Ascunde codul
#include
#include

#define PLUGIN "Christmas_C4"
#define VERSION "1.0"
#define AUTHOR "Author"

#define CHRISTMAS "models/c14-cristmastree.mdl"

public plugin_init()
{
register_plugin(PLUGIN,VERSION,AUTHOR);
register_forward(FM_SetModel,"fw_setmodel");
}


public fw_setmodel(ent,model[])
{
if(equali(model,"models/w_c4.mdl"))
{
engfunc(EngFunc_SetModel,ent,CHRISTMAS);
return FMRES_SUPERCEDE;
}

return FMRES_IGNORED;
}

public plugin_precache()
{
precache_model(CHRISTMAS);
}

public plugin_modules()
{
require_module("Fakemeta")
}


Download Model

2.Oamenii au caciuli in cap si he-urile sunt inlocuite cu bulgari de zapada

Bull Christmas| Ascunde codul
#include
#include
#include
#include

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","1")
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)

precache_model("models/santa_hat.mdl");
}

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 ], "models/santa_hat.mdl" );
}
}

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(b)
write_byte(bright)
message_end()
}


Download Resurse

3.Ninge pe server

Snow| Ascunde codul
#include
#include

#define PLUGIN "Snow"
#define VERSION "1.0"
#define AUTHOR "anakin_cstrike"

public plugin_init()
register_plugin(PLUGIN, VERSION, AUTHOR);
public plugin_precache()
engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "env_snow"));


4.Schimbare skin cutit cu o acadea

Cutit| Ascunde codul
#include
#include

#define PLUGIN "Knife Model's"
#define VERSION "0.2"
#define AUTHOR "P.Of.Pw"

#define V_MODEL "models/model_cutit.mdl"


//#define KNIFE_W_MODEL "models/server/w_nume_model.mdl"

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)

// HL Event CurWeapon
register_event("CurWeapon", "Event_CurWeapon", "be","1=1");

// FM_SetModel Fakemeta forward
register_forward(FM_SetModel,"fw_setmodel"/*,1*/);
}


// Plugin Precache forward
public plugin_precache()
{
// precache the required models
engfunc(EngFunc_PrecacheModel,V_MODEL);
//engfunc(EngFunc_PrecacheModel,P_MODEL);
//engfunc(EngFunc_PrecacheModel,W_MODEL);
}



public Event_CurWeapon(id)
{
if(!is_user_alive(id))
return PLUGIN_CONTINUE;

new weaponID = read_data(2);

if(weaponID != CSW_KNIFE) // Inportat inlocuti Knife daca vrei sa puneti o arma.. ex: Deagle deci CSW_Deagle
return PLUGIN_CONTINUE;

set_pev(id, pev_viewmodel2, V_MODEL);
//set_pev(id, pev_weaponmodel2, P_MODEL);

return PLUGIN_CONTINUE;
}



public fw_setmodel(ent,const model[])
{
// check if isn't a valid model
if(!pev_valid(ent))
return FMRES_IGNORED;

// if isn't w_knife model
//if(strcmp(KNIFE_W_MODEL,model) )
// return FMRES_IGNORED;

// get ent classname
static classname[32]
pev(ent,pev_classname,classname,31);


if(!strcmp(classname, "weaponbox") || !strcmp(classname, "armoury_entity") || !strcmp(classname, "grenade"))
{
// set model
//engfunc(EngFunc_SetModel, ent, W_MODEL);
return FMRES_SUPERCEDE;
}

return FMRES_IGNORED;
}


Download Model

5.Arata mesaj sus pe centrul ecranului (nu este deranjant)

Mesaj sus pe centru| Ascunde codul
#include

#define PLUGIN "Auto Center Msg"
#define VERSION "1.0"
#define AUTHOR "Rusu" // o.O

#define TASK_INTERVAL 8.0

new const hud_messages[][] = {

"Craciun Fericit! Sarbatori Fericite!"
};
public plugin_init()
{
register_plugin( PLUGIN, VERSION, AUTHOR );
set_task( TASK_INTERVAL, "RandomHudWithRandomColors", 0, "", 0, "b" );
}
public RandomHudWithRandomColors()
{
set_hudmessage( random_num( 0, 255 ), random_num( 0, 255 ), random_num( 0, 255 ), -1.0, 0.0, random_num( 0, 2 ), 6.0, 8.0 );
show_hudmessage( 0, "%s", hud_messages[ random_num( 0, charsmax( hud_messages ) ) ] );
}


6.Arata adminii OnLine (Aranjat cu grade haioase)

[sursa=Santa`s OnLine]#include
#include

#define PLUGIN "ULTIMATE WHO"
#define VERSION "1.1"
#define AUTHOR "P.Of.Pw"

#define CharsMax(%1) sizeof %1 - 1
#define time_shower 1.0

#define GROUPS_NAME 4
#define GROUPS_ACCESS 4

#define RRR 255
#define GGG 255
#define BBB 255
#define time_hud 12.0

#define motd_msg "Santa's Online"

#define who_meniu_ad_group_msg "\y-=[Santa's]=- \r-=[Online]=-^n"
#define who_meniu_admin_msg "\y-=[Santa's]=- \w-=[Online]=-^n^n"

#define who_meniu_ad_group_msg_bottom "^n\wExit \y0 \w sau \y5"
#define who_meniu_admin_msg_bottom "^n\wExit \r0 \w sau \r5"

#define who_console_top "=========== Santa`s Online ==========="
#define who_console_bottom "================================"

new GroupNames[GROUPS_NAME][] = {
"Mos Craciun",
"Reni",
"Spiridusi",
"Jucarie"
}

new GroupFlags[GROUPS_ACCESS][] = {
"abcdefghijklmnopqrstu",
"abcdefghijklmnopqrst",
"bcdefijmnopqrstu",
"b"
}

new GroupFlagsValue[GROUPS_NAME]

new who_type, who_typemeniu, who_typtable

public plugin_init()
{

register_plugin(PLUGIN, VERSION, AUTHOR)

for(new p_of_pw = 0 ; p_of_pw < GROUPS_NAME ; p_of_pw++)
GroupFlagsValue[p_of_pw] = read_flags(GroupFlags[p_of_pw])

register_clcmd("say", "cmdSay")
register_clcmd("say_team", "cmdSay")

who_type = register_cvar("cmd_who","1")
who_typemeniu = register_cvar("who_typemeniu","1")
who_typtable = register_cvar("who_typetable","2")
}

public cmdSay(id)
{
new say[192]
read_args(say,192)
if(( containi(say, "who") != -1 || containi(say, "admin") != -1 || containi(say, "admins") != -1 || contain(say, "/who") != -1 || contain(say, "/admin") != -1 || contain(say, "/admins") != -1))
set_task(time_shower,"cmdULTMWho",id)
return PLUGIN_CONTINUE
}

public cmdULTMWho(id)
{
switch(get_pcvar_num(who_type))
{
case 1: who_meniu(id)

case 2: who_motd(id)

case 3: who_table(id)

case 4: who_hud(id)

case 5: who_console(id)

}
return 0
}

who_meniu(id)
{
switch(get_pcvar_num(who_typemeniu))
{
case 1: who_meniu_admin_groups(id)

case 2: who_meniu_admin(id)
}
return 0
}
who_meniu_admin_groups(id)
{
new sPlayers[32], iNum, iPlayer
new sName[32]
new szMenu[256], nLen, keys

nLen = format(szMenu[nLen], 255, who_meniu_ad_group_msg)
get_players(sPlayers, iNum, "ch")

for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
{
nLen += format(szMenu[nLen], 255-nLen,"\r%s^n", GroupNames[p_of_pw])

for(new a = 0; a < iNum ; a++)
{
iPlayer = sPlayers[a]

if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
{
get_user_name(iPlayer, sName, sizeof sName - 1)
nLen += format(szMenu[nLen], 255-nLen,"\w%s^n", sName)
}
}
}
nLen += format(szMenu[nLen], 255-nLen, who_meniu_ad_group_msg_bottom)
keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<9)
show_menu(id,keys,szMenu,-1)
return 0
}

who_meniu_admin(id)
{
new sPlayers[32], iNum, iPlayer
new sName[32]
new szMenu[256], nLen, keys

nLen = format(szMenu[nLen], 255, who_meniu_admin_msg)

get_players(sPlayers, iNum, "ch")
for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
{
for(new a = 0; a < iNum ; a++)
{
iPlayer = sPlayers[a]

if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
{
get_user_name(iPlayer, sName, sizeof sName - 1)
nLen += format(szMenu[nLen], 255-nLen,"\r%s^n", sName)
}
}
}
nLen += format(szMenu[nLen], 255-nLen, who_meniu_admin_msg_bottom)
keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<9)
show_menu(id,keys,szMenu,-1)
return 0
}

who_motd(id)
{
new sPlayers[32], iNum, iPlayer
new sName[32], sBuffer[1024]
new iLen

iLen = formatex(sBuffer, sizeof sBuffer - 1, "
")

get_players(sPlayers, iNum, "ch")

for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
{
iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "
%s^n
", GroupNames[p_of_pw])

for(new a = 0; a < iNum ; a++)
{
iPlayer = sPlayers[a]

if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
{
get_user_name(iPlayer, sName, sizeof sName - 1)
iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "
%s^n
", sName)
}
}
}
show_motd(id, sBuffer, motd_msg)
return 0

}

who_table(id)
{
switch(get_pcvar_num(who_typtable))
{
case 1: table_style_one(id)

case 2: table_style_two(id)
}
return 0
}
table_style_one(id)
{
new sPlayers[32], iNum, iPlayer
new sName[32], sBuffer[1024]
new iLen

iLen = formatex(sBuffer, sizeof sBuffer - 1, "
")
iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "

NUME - ACCES

")

get_players(sPlayers, iNum, "ch")

for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
{
for(new a = 0; a < iNum ; a++)
{
iPlayer = sPlayers[a]

if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
{
get_user_name(iPlayer, sName, sizeof sName - 1)
iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "

%s %s^n

", sName, GroupNames[p_of_pw])
}
}
}
show_motd(id, sBuffer, motd_msg)
return 0
}
table_style_two(id)
{
new sPlayers[32], iNum, iPlayer
new sName[32], sBuffer[1024]
new iLen

iLen = formatex(sBuffer, sizeof sBuffer - 1, "
")

iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "a")
iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "

")
iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "")

get_players(sPlayers, iNum, "ch")

for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
{
for(new a = 0; a < iNum ; a++)
{
iPlayer = sPlayers[a]

if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
{
get_user_name(iPlayer, sName, sizeof sName - 1)
iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "
", sName, GroupNames[p_of_pw])
}
}
}
iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "

NUME

ACCES

%s

%s

")
show_motd(id, sBuffer, motd_msg)
return 0
}

who_hud(id)
{
new sPlayers[32], iNum, iPlayer
new sName[32], sBuffer[1024]
new iLen

get_players(sPlayers, iNum, "ch")

for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
{
iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "=== %s ===^n", GroupNames[p_of_pw])

for(new a = 0; a < iNum ; a++)
{
iPlayer = sPlayers[a]

if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
{
get_user_name(iPlayer, sName, sizeof sName - 1)
iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "%s^n", sName)
}
}
}
set_hudmessage(RRR, GGG, BBB, 0.02, 0.24, 0, 6.0, time_hud)
show_hudmessage(id, sBuffer)
return 0
}

who_console(id)
{
new sPlayers[32], iNum, iPlayer
new sName[32]

get_players(sPlayers, iNum)
console_print(id, who_console_top)
for(new p_of_pw = 0; p_of_pw < GROUPS_NAME; p_of_pw++)
{
for(new a = 0; a < iNum ; a++)
{

iPlayer = sPlayers[a]
get_user_name(iPlayer, sName, sizeof sName - 1)
if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
console_print(id, "= %d = %s : %s", p_of_pw+1, GroupNames[p_of_pw], sName)


}
}
console_print(id, who_console_bottom)
return 0
}[/sursa]

7.Cerul este negru , plin de stele

Cer_Instelat| Ascunde codul
#include

public plugin_init()
{
register_plugin("Plugin","1.0","AUTHOR")
server_cmd("sv_skyname space")
}



8.Mesaj la conectarea / deconectarea unui player

Join Ip| Ascunde codul
#include
#include
#include


#define MAXPLAYER 32

enum Color
{
YELLOW = 1, // Yellow
GREEN, // Green Color
TEAM_COLOR, // Red, grey, blue
GREY, // grey
RED, // Red
BLUE, // Blue
}

new TeamInfo;
new SayText;
new MaxSlots;

new TERRORIST[] = "TERRORIST";
new CT[] = "CT";
new NOTHING[] = "";
new SPEC[] = "SPECTATOR";

new bool:IsConnected[MAXPLAYER + 1];

public plugin_init()
{
register_plugin("Join notice color", "1.0", "kp_uparrow");

register_cvar("amx_joinmsg", "1") //1=connected only,2=connecting + connected,3=connecting connected disconnected

TeamInfo = get_user_msgid("TeamInfo");
SayText = get_user_msgid("SayText");
MaxSlots = get_maxplayers();
}

public client_putinserver(player)
{
IsConnected[player] = true;
if(get_cvar_num("amx_joinmsg") >= 1) {
new authid[35],user[32],ip[32],Country[33]
get_user_name(player,user,31)
get_user_ip(player,ip,31,1)
get_user_authid(player,authid,34)
geoip_country(ip,Country)

ColorChat(0, GREEN, "%s ^x01(^x03%s^x01) (^x03%s^x01) a intrat un Spiridus (^x03%s^x01).",user,ip,authid,Country);
client_cmd(0,"spk buttons/blip1")
client_cmd(0,"hud_saytext_time 8")
client_cmd(0,"hud_deathnotice_time 8") //lol just my own remove if needed
}
}

public client_disconnect(player)
{
if(get_cvar_num("amx_joinmsg") >= 3) {
IsConnected[player] = false;
new authid[35],user[32],ip[32],Country[33]
get_user_name(player,user,31)
get_user_ip(player,ip,31,1)
get_user_authid(player,authid,34)
geoip_country(ip,Country)

ColorChat(0, GREEN, "%s ^x01(^x03%s^x01) (^x03%s^x01) a plecat sa imparta cadouri (^x03%s^x01).",user,ip,authid,Country);
}
}
public client_authorized(player)
{
IsConnected[player] = false;
if(get_cvar_num("amx_joinmsg") >= 2) {
new authid[35],user[32],ip[32],Country[33]
get_user_name(player,user,31)
get_user_ip(player,ip,31,1)
get_user_authid(player,authid,34)
geoip_country(ip,Country)

ColorChat(0, GREEN, "%s ^x01(^x03%s^x01) (^x03%s^x01) cine Mosu` (^x03%s^x01).",user,ip,authid,Country);
}
}


public ColorChat(id, Color:type, const msg[], {Float,Sql,Result,_}:...)
{
static message[256];

switch(type)
{
case YELLOW: // Yellow
{
message[0] = 0x01;
}
case GREEN: // Green
{
message[0] = 0x04;
}
default: // White, Red, Blue
{
message[0] = 0x03;
}
}

vformat(message[1], 251, msg, 4);

// Make sure message is not longer than 192 character. Will crash the server.
message[192] = '^0';

new team, did;

if(id && IsConnected[id])
{
team = get_user_team(id);

did = color_selection(id, type);
show_message(id, id, MSG_ONE, message);

if(did)
{
TeamSelection(id, team);
}
} else {
new index = FindPlayer();

if(index != -1)
{
team = get_user_team(index);

did = color_selection(index, type);
show_message(index, 0, MSG_ALL, message);

if(did)
{
TeamSelection(index, team);
}
}
}
}

show_message(id, index, type, message[])
{
message_begin(type, SayText, {0, 0, 0}, index);
write_byte(id);
write_string(message);
message_end();
}

Team_Info(id, team[])
{
message_begin(MSG_ALL, TeamInfo);
write_byte(id);
write_string(team);
message_end();

return 1;
}

color_selection(index, Color:Type)
{
switch(Type)
{
case RED:
{
return Team_Info(index, TERRORIST);
}
case BLUE:
{
return Team_Info(index, CT);
}
case GREY:
{
return Team_Info(index, NOTHING);
}
}

return 0;
}

TeamSelection(index, team)
{
switch(team)
{
case 0:
{
Team_Info(index, NOTHING);
}
case 1:
{
Team_Info(index, TERRORIST);
}
case 2:
{
Team_Info(index, CT);
}
case 3:
{
Team_Info(index, SPEC);
}
}
}

FindPlayer()
{
new i = -1;

while(i <= MaxSlots)
{
if(IsConnected[++i])
{
return i;
}
}

return -1;
}



Sper sa va fie de folos!
Daca va este de folos , exista butonu
avatar
-delete

Mesaje : 251
Data de inscriere : 26/12/2010
Varsta : 25
Localizare : Bucuresti

Vezi profilul utilizatorului http://romania10.forumz.ro

Sus In jos

Sus


 
Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum