Weapons Trail

Pluginuri facute de utilizatorii forumului eXtream.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
aNNakin
Fost administrator
Fost administrator
Posts: 10464
Joined: 17 Dec 2007, 21:42
Detinator Steam: Da
CS Status: a iubi - necesar si suficient
Detinator server CS: romania.cs16.ro
SteamID: anakin_cstrike16
Reputatie: Membru Club eXtreamCS
Fost Contribuitor
Fost Scripter eXtreamCS
Fost Lider Echipa eXtreamCS
Fost Administrator
Location: di.fm
Has thanked: 230 times
Been thanked: 787 times
Contact:

29 Aug 2008, 00:05

Descriere:
Pluginul original a fost facut pentru grenazi, dar acesta este pentru arme.
Cu acest plugin pe server-ul dvs., atunci cand aruncati o arma, aceasta va lasa in urma ei o dara/urma/ colorata.
Daca arma este aruncata de buna voi (g) culoarea este aleatorie/random/la intamplare.
Daca arma este arunca atunci cand muriti, culoarea este rosie pentru terro si albastra pentru ct.
Cand arma atinge pamantul, se formeaza un efect de lumina in jurul acesteia. (cvar)
Cand arma este arunca, velocitatea acesteia este schimbata iar aceasta o ia in alta parte (cvar)

sursa:
| Afiseaza codul
#include <amxmodx>
#include <fakemeta>

#define PLUGIN "Weapon Trail"
#define VERSION "2.0"
#define AUTHOR "anakin_cstrike"

#define MAX_PLAYERS 32
#define OFFSET_ENT_TO_INDEX 43

enum droptype 
{
	droptype_manual,
	droptype_ondeath
}
new 
toggle,light,vel,g_max_clients,g_max_entities;

new const g_drop[] = "drop";
new const g_wbox_class[] = "weaponbox";
new const g_wbox_model[] = "models/w_weaponbox.mdl";
new const g_wbox_model_prefix[] = "models/w_";
new const g_start_client_index = 1;
new g_command[MAX_PLAYERS + 1][sizeof g_drop + 1];
new g_trail,r,g,b;
public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, AUTHOR);
	register_forward(FM_SetModel, "fw_setmodel");
	register_forward(FM_Touch,"fw_touch");
	toggle = register_cvar("weapontrail","1");
	light = register_cvar("weapontrail_light","1");
	vel = register_cvar("weapontrail_vel","1");
	g_max_clients = global_get(glb_maxClients);
	g_max_entities = global_get(glb_maxEntities);
}
public plugin_precache()
g_trail = precache_model("sprites/smoke.spr");
public client_command(id) 
	read_argv(0, g_command[id], sizeof g_drop);
public fw_setmodel(ent, const model[])
{
	if(get_pcvar_num(toggle) != 1)
		return FMRES_IGNORED;
	if(!pev_valid(ent) || !equal(model, g_wbox_model_prefix, sizeof g_wbox_model_prefix - 1) || equal(model, g_wbox_model))
		return FMRES_IGNORED;	
	new id = pev(ent, pev_owner)
	if(!(g_start_client_index <= id <= g_max_clients))
		return FMRES_IGNORED;
	static class[32],i;
	pev(ent,pev_classname,class, sizeof class - 1)
	if(!equal(class,g_wbox_class))
		return FMRES_IGNORED;
	for(i = g_max_clients + 1;i < g_max_entities;++i) 
	{
		if(!pev_valid(i) || ent != pev(i, pev_owner))
			continue;
		
		new wid = get_pdata_int(i,OFFSET_ENT_TO_INDEX);
		if(wid != CSW_C4)
		{
			new droptype:drop_type;
			if(!is_user_alive(id))
				drop_type = droptype_ondeath;
			else if(equal(g_command[id], g_drop))
				drop_type = droptype_manual;
			else
				return FMRES_IGNORED;
			switch(drop_type)
			{
				case droptype_ondeath: {
					if(get_user_team(id) == 1){r=255;g=0;b=0;}
					else if(get_user_team(id) == 2){r=0;g=0;b=255;}
				}
				case droptype_manual: {
					r = random(255);
					g = random(255);
					b = random(255);
				}
			}
			if(get_pcvar_num(vel) == 1)
			{
				new Float:vel[3];
				vel[0] = float(random(300));
				vel[1] = float(random(300));
				vel[2] = float(random(300));
				set_pev(ent,pev_velocity,vel);
			}
			message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
			write_byte(TE_BEAMFOLLOW);
			write_short(ent);
			write_short(g_trail);
			write_byte(5);
			write_byte(5);
			write_byte(r);
			write_byte(g);
			write_byte(b);
			write_byte(195);
			message_end();
		}
	}
	return FMRES_IGNORED;
}
public fw_touch(touched, toucher)
{
	if(get_pcvar_num(toggle) != 1)
		return FMRES_IGNORED;
	if(get_pcvar_num(light) != 1)
		return FMRES_IGNORED;
	
	static class[32];
	pev(toucher, pev_classname, class, sizeof class - 1);
	
	if(containi(class, "weapon") != -1 && !touched)
	{
		new Float:origin[3];
		pev(toucher, pev_origin, origin);
			
		message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
		write_byte(TE_DLIGHT);
		write_coord(floatround(origin[0])); 
		write_coord(floatround(origin[1])); 
		write_coord(floatround(origin[2]));
		write_byte(20);
		write_byte(r);
		write_byte(g);
		write_byte(b);
		write_byte(5);
		write_byte(20);
		message_end();
	}
	return FMRES_IGNORED;
}
Descarcare: Click!
Link oficial: Click!

Nume: Weapon Trail
Autor: anakin_cstrike
Versiune: 2.0
Schimbare
[2.0]
- am schimbat cvar-ul general si am adaugat inca 2 cvar-uri
- am adaugat optiune de efect de lumina
- am adaugat optiune de schimbare velocitate la arme
[1.0]
- prima publicare

Credite:
* VEN - pentru functiile de la drop
* Alka - modifcare adusa forwar-ului Touched + idee schimbare velocitate

Instalare:
1. Fisierul WeaponTrail.sma il puneti in addons/amxmodx/scripting
2. Fisierul WeaponTrail.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:

Code: Select all

WeaponTrail.amxx
Cvars:
weapontrail 1/0 - activat/dezactivat (default 1)
weapontrail_light 1/0 - activeaza/dezactiveaza lumina la contact cu pamantul (default 1)
weapontrail_vel 1/0 - activeaza/dezactiveaza schimbare velocitate (default 1)

Module: Fakemeta

Imagini: Multumesc lui Scorpions
Image Image Image
Last edited by Cosmin on 24 Jul 2015, 13:43, edited 3 times in total.
Reason: sursa adaugata
RoyalServer 2
User avatar
fenomen15
Membru, skill +2
Membru, skill +2
Posts: 795
Joined: 20 Apr 2008, 07:30
Detinator Steam: Da
CS Status: Pac Pac!!!Iam dat hed lu becali:))
Location: La x1 pe de_inferno cu awp
Has thanked: 41 times
Been thanked: 2 times

23 Oct 2008, 21:12

Face lag ?
Last edited by aNNakin on 01 Feb 2009, 00:58, edited 1 time in total.
Reason: Nu

Attention please
mDiImageFenomeenn;x

Image
Image
Image
User avatar
Cazar@s
Membru, skill +1
Membru, skill +1
Posts: 146
Joined: 17 Mar 2009, 13:00
Detinator Steam: Da
CS Status: www.extreamcs.com best site
Has thanked: 2 times
Been thanked: 1 time

03 Apr 2009, 20:16

Imi place , e frumos ...... este identic ca si cel cu grenade trail.
Image
User avatar
danieledy94
Membru, skill +1
Membru, skill +1
Posts: 122
Joined: 16 Jan 2009, 16:06
Detinator Steam: Da
CS Status: DND
Detinator server CS: da
SteamID: danieledy94

06 Apr 2009, 00:06

nu mi se pare foarte intreant dar gj pentru defortul epus
Image
Image
Image
Image
Image
Image
Image
Image
Image
MeD* Music On :X
extra_cstrike
Utilizator banat
Utilizator banat
Posts: 176
Joined: 12 Mar 2009, 21:35
Detinator Steam: Da
Has thanked: 1 time
Been thanked: 1 time

06 Apr 2009, 12:26

Nu mareste lagul, insa nu prea te ajuta la nimic(Doar daca vrei server FunMod) , oricum, bravo anakin pentru efortul depus :)>- \m/
Mr. Kill3r
Fost moderator
Fost moderator
Posts: 320
Joined: 18 Dec 2008, 17:45
Detinator Steam: Da
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 5 times
Been thanked: 6 times
Contact:

11 Apr 2009, 22:16

imi place plugin-ul
dar are si un mare dezavantaj pentru cel care arunca o grenada: daca e ascuns,adversarul vede unde este cel care a aruncat,si il poate omora prin perete,automat luand ban!
oricum,imi place >:)
User avatar
aNNakin
Fost administrator
Fost administrator
Posts: 10464
Joined: 17 Dec 2007, 21:42
Detinator Steam: Da
CS Status: a iubi - necesar si suficient
Detinator server CS: romania.cs16.ro
SteamID: anakin_cstrike16
Reputatie: Membru Club eXtreamCS
Fost Contribuitor
Fost Scripter eXtreamCS
Fost Lider Echipa eXtreamCS
Fost Administrator
Location: di.fm
Has thanked: 230 times
Been thanked: 787 times
Contact:

12 Apr 2009, 12:48

Mr. Kill3r wrote:imi place plugin-ul
dar are si un mare dezavantaj pentru cel care arunca o grenada: daca e ascuns,adversarul vede unde este cel care a aruncat,si il poate omora prin perete,automat luand ban!
oricum,imi place >:)
Weapon vine de la arma :) nu e la fel ca si grenade trail, acesta e pentru arme acela e pentru grenade.
Post Reply

Return to “Pluginuri eXtream”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 22 guests