[Rezolvat] compilare plugin

Cereri de pluginuri noi, skinuri in CS, etc.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
Jorj
eXtream Mod
eXtream Mod
Posts: 3500
Joined: 13 Aug 2013, 17:10
Detinator Steam: Da
Detinator server CS: Furien.LsZ.Ro
SteamID: clic_lsz
Reputatie: eXtream Mod
Fost Membru Club eXtreamCS (patru luni)
Nume anterior: Clic
Location: Piatra Neamt
Been thanked: 20 times
Contact:

31 Dec 2013, 14:51

Salut ... am gasit un plugin misto si nu pot sa-l compilez pentru ca nu am o librarie .. si nu am gasit pe nici un sitte . Ma puteti ajuta? :D
.sma | Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <fakemeta_util>
#include <hamsandwich>
#include <cstrike>
#include <engine>
#include <cdt>




#define PLUGIN "Bonus Box"
#define VERSION "1.0"
#define AUTHOR "ONEMDX"


new const item_class_name[] = "dm_item"

new g_models[][] = {"models/cadouct_galben.mdl", "models/cadout_galben.mdl"}

public plugin_precache()
{
	for (new i = 0; i < sizeof g_models; i++)
		precache_model(g_models)   
}

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_forward(FM_Touch, "fwd_Touch")
	
	register_event("HLTV", "round_start", "a", "1=0", "2=0")
	
	RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
	
	
}

public fwd_Touch(toucher, touched)
{
	if (!is_user_alive(toucher) || !pev_valid(touched))
		return FMRES_IGNORED
	
	new classname[32]   
	pev(touched, pev_classname, classname, 31)
	if (!equal(classname, item_class_name))
		return FMRES_IGNORED
	
	
	
	give_item(toucher)
	set_pev(touched, pev_effects, EF_NODRAW)
	set_pev(touched, pev_solid, SOLID_NOT)
	
	return FMRES_IGNORED
	
}

public fw_PlayerKilled(victim, attacker, shouldgib)
{
	if (!is_user_connected(attacker) || !is_user_connected(victim) || attacker == victim || !attacker)
		return HAM_IGNORED
	
	// Modificat : am scos sansele ca am vazut ca toti vreti la fiecare kill 
	new random = random_num(0,2 )
	
	if (random == 0 || random == 1 || random == 2)
	{
		new origin[3]
		get_user_origin(victim, origin, 0)
		
		addItem(origin)
	}
	
	return HAM_IGNORED
}

public removeEntity(ent)
{
	if (pev_valid(ent))
		engfunc(EngFunc_RemoveEntity, ent)
}

public addItem(origin[3])
{
	new ent = fm_create_entity("info_target")
	set_pev(ent, pev_classname, item_class_name)
	
	engfunc(EngFunc_SetModel,ent, g_models[random_num(0, sizeof g_models - 1)])
	
	set_pev(ent,pev_mins,Float:{-10.0,-10.0,0.0})
	set_pev(ent,pev_maxs,Float:{10.0,10.0,25.0})
	set_pev(ent,pev_size,Float:{-10.0,-10.0,0.0,10.0,10.0,25.0})
	engfunc(EngFunc_SetSize,ent,Float:{-10.0,-10.0,0.0},Float:{10.0,10.0,25.0})
	
	set_pev(ent,pev_solid,SOLID_BBOX)
	set_pev(ent,pev_movetype,MOVETYPE_TOSS)
	
	new Float:fOrigin[3]
	IVecFVec(origin, fOrigin)
	set_pev(ent, pev_origin, fOrigin)
	
	set_pev(ent,pev_renderfx,kRenderFxGlowShell)
	
	// Rendere colorate , estetic arata mai bine cu mai multe culori 
	switch(random_num(1,6))
	{
		case 1: set_pev(ent,pev_rendercolor,Float:{0.0,0.0,255.0})
		case 2: set_pev(ent,pev_rendercolor,Float:{0.0,255.0,0.0})
		case 3: set_pev(ent,pev_rendercolor,Float:{255.0,0.0,0.0})
		case 4: set_pev(ent,pev_rendercolor,Float:{255.0,255.0,255.0})
		case 5: set_pev(ent,pev_rendercolor,Float:{0.0,255.0,255.0})
		case 6: set_pev(ent,pev_rendercolor,Float:{255.0,255.0,0.0})
	}
}

public give_item(id)
{
	switch (random_num(0,7)){ 
		case 0:{
			new HP;
			HP = 100;   
			fm_set_user_health(id, get_user_health(id) + HP); 
			ChatColor(id,"!g* [!teamBOX!g] You receive !team + %d Health ",HP); 
		}
		
		case 1:{
			fm_give_item(id,"weapon_hegrenade")
			ChatColor(id,"!g* [!teamBOX!g] You receive !team + 1 HE ");
		}
		
		case 2:{
			set_user_credits(id, get_user_credits(id) + 5)	
			ChatColor(id,"!g* [!teamBOX!g] You receive !team + 5 CREDITE"); 
                }
		
		case 3:{
			fm_give_item(id, "weapon_smokegrenade")
			ChatColor(id,"!g* [!teamBOX!g] You receive !team + 1 SMOKE ");
                }
		
		case 4:{
			set_user_credits(id, get_user_credits(id) + 5)	
			ChatColor(id,"!g* [!teamBOX!g] You receive !team + 5 CREDITE");
		}
		
		
                case 5:{
			set_user_credits(id, get_user_credits(id) + 10)	
			ChatColor(id,"!g* [!teamBOX!g] You receive !team + 10 CREDITE");
		}

                case 6:{
			set_user_credits(id, get_user_credits(id) + 5)	
			ChatColor(id,"!g* [!teamBOX!g] You receive !team + 5 CREDITE");
		}
		case 7:{
			
			set_user_credits(id, get_user_credits(id) + 10)	
			ChatColor(id,"!g* [!teamBOX!g] You receive !team + 10 CREDITE");
			
		}
	}
}

public round_start()
{
	new ent = FM_NULLENT
	static string_class[] = "classname"
	while ((ent = engfunc(EngFunc_FindEntityByString, ent, string_class, item_class_name))) 
		set_pev(ent, pev_flags, FL_KILLME)
}


stock ChatColor(const id, const input[], any:...)
{
	new count = 1, players[32]
	static msg[191]
	vformat(msg, 190, input, 3)
	
	replace_all(msg, 190, "!g", "^4") // Green Color
	replace_all(msg, 190, "!y", "^1") // Default Color
	replace_all(msg, 190, "!team", "^3") // Team Color
	replace_all(msg, 190, "!team2", "^0") // Team2 Color
	
	if (id) players[0] = id; else get_players(players, count, "ch")
	{
	for (new i = 0; i < count; i++)
	{
		if (is_user_connected(players))
		{
			message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players)
			write_byte(players);
			write_string(msg);
			message_end();
		}
	}
}
}
Last edited by DaNNe. on 16 Jan 2014, 23:19, edited 1 time in total.
Reason: Trecut ca si rezolvat.
Intermediez tranzactii cand am chef si timp ! :)

Image
Rapidserver
User avatar
Adventx
Membru, skill +4
Membru, skill +4
Posts: 1785
Joined: 17 Sep 2013, 20:44
Detinator Steam: Da
Reputatie: Fost moderator ajutator
Has thanked: 125 times
Been thanked: 142 times
Contact:

31 Dec 2013, 17:08

Code: Select all

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <fakemeta_util>
#include <hamsandwich>
#include <cstrike>
#include <engine>

#define PLUGIN "Bonus Box"
#define VERSION "1.0"
#define AUTHOR "ONEMDX"

native get_user_credits ( id );
native set_user_credits ( id, credits ); 

new const item_class_name[] = "dm_item"

new g_models[][] = {"models/cadouct_galben.mdl", "models/cadout_galben.mdl"}

public plugin_precache()
{
	for (new i = 0; i < sizeof g_models; i++)
		precache_model(g_models[i])   
}

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_forward(FM_Touch, "fwd_Touch")
	
	register_event("HLTV", "round_start", "a", "1=0", "2=0")
	
	RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
	
	
}

public fwd_Touch(toucher, touched)
{
	if (!is_user_alive(toucher) || !pev_valid(touched))
		return FMRES_IGNORED
	
	new classname[32]   
	pev(touched, pev_classname, classname, 31)
	if (!equal(classname, item_class_name))
		return FMRES_IGNORED
	
	
	
	give_item(toucher)
	set_pev(touched, pev_effects, EF_NODRAW)
	set_pev(touched, pev_solid, SOLID_NOT)
	
	return FMRES_IGNORED
	
}

public fw_PlayerKilled(victim, attacker, shouldgib)
{
	if (!is_user_connected(attacker) || !is_user_connected(victim) || attacker == victim || !attacker)
		return HAM_IGNORED
	
	// Modificat : am scos sansele ca am vazut ca toti vreti la fiecare kill 
	new random = random_num(0,2 )
	
	if (random == 0 || random == 1 || random == 2)
	{
		new origin[3]
		get_user_origin(victim, origin, 0)
		
		addItem(origin)
	}
	
	return HAM_IGNORED
}

public removeEntity(ent)
{
	if (pev_valid(ent))
		engfunc(EngFunc_RemoveEntity, ent)
}

public addItem(origin[3])
{
	new ent = fm_create_entity("info_target")
	set_pev(ent, pev_classname, item_class_name)
	
	engfunc(EngFunc_SetModel,ent, g_models[random_num(0, sizeof g_models - 1)])
	
	set_pev(ent,pev_mins,Float:{-10.0,-10.0,0.0})
	set_pev(ent,pev_maxs,Float:{10.0,10.0,25.0})
	set_pev(ent,pev_size,Float:{-10.0,-10.0,0.0,10.0,10.0,25.0})
	engfunc(EngFunc_SetSize,ent,Float:{-10.0,-10.0,0.0},Float:{10.0,10.0,25.0})
	
	set_pev(ent,pev_solid,SOLID_BBOX)
	set_pev(ent,pev_movetype,MOVETYPE_TOSS)
	
	new Float:fOrigin[3]
	IVecFVec(origin, fOrigin)
	set_pev(ent, pev_origin, fOrigin)
	
	set_pev(ent,pev_renderfx,kRenderFxGlowShell)
	
	// Rendere colorate , estetic arata mai bine cu mai multe culori 
	switch(random_num(1,6))
	{
		case 1: set_pev(ent,pev_rendercolor,Float:{0.0,0.0,255.0})
		case 2: set_pev(ent,pev_rendercolor,Float:{0.0,255.0,0.0})
		case 3: set_pev(ent,pev_rendercolor,Float:{255.0,0.0,0.0})
		case 4: set_pev(ent,pev_rendercolor,Float:{255.0,255.0,255.0})
		case 5: set_pev(ent,pev_rendercolor,Float:{0.0,255.0,255.0})
		case 6: set_pev(ent,pev_rendercolor,Float:{255.0,255.0,0.0})
	}
}

public give_item(id)
{
	switch (random_num(0,7)){ 
		case 0:{
			new HP;
			HP = 100;   
			fm_set_user_health(id, get_user_health(id) + HP); 
			ChatColor(id,"!g* [!teamBOX!g] You receive !team + %d Health ",HP); 
		}
		
		case 1:{
			fm_give_item(id,"weapon_hegrenade")
			ChatColor(id,"!g* [!teamBOX!g] You receive !team + 1 HE ");
		}
		
		case 2:{
			set_user_credits(id, get_user_credits(id) + 5)	
			ChatColor(id,"!g* [!teamBOX!g] You receive !team + 5 CREDITE"); 
                }
		
		case 3:{
			fm_give_item(id, "weapon_smokegrenade")
			ChatColor(id,"!g* [!teamBOX!g] You receive !team + 1 SMOKE ");
                }
		
		case 4:{
			set_user_credits(id, get_user_credits(id) + 5)	
			ChatColor(id,"!g* [!teamBOX!g] You receive !team + 5 CREDITE");
		}
		
		
                case 5:{
			set_user_credits(id, get_user_credits(id) + 10)	
			ChatColor(id,"!g* [!teamBOX!g] You receive !team + 10 CREDITE");
		}

                case 6:{
			set_user_credits(id, get_user_credits(id) + 5)	
			ChatColor(id,"!g* [!teamBOX!g] You receive !team + 5 CREDITE");
		}
		case 7:{
			
			set_user_credits(id, get_user_credits(id) + 10)	
			ChatColor(id,"!g* [!teamBOX!g] You receive !team + 10 CREDITE");
			
		}
	}
}

public round_start()
{
	new ent = FM_NULLENT
	static string_class[] = "classname"
	while ((ent = engfunc(EngFunc_FindEntityByString, ent, string_class, item_class_name))) 
		set_pev(ent, pev_flags, FL_KILLME)
}


stock ChatColor(const id, const input[], any:...)
{
	new count = 1, players[32]
	static msg[191]
	vformat(msg, 190, input, 3)
	
	replace_all(msg, 190, "!g", "^4") // Green Color
	replace_all(msg, 190, "!y", "^1") // Default Color
	replace_all(msg, 190, "!team", "^3") // Team Color
	replace_all(msg, 190, "!team2", "^0") // Team2 Color
	
	if (id) players[0] = id; else get_players(players, count, "ch")
	{
	for (new i = 0; i < count; i++)
	{
		if (is_user_connected(players[i]))
		{
			message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
			write_byte(players[i]);
			write_string(msg);
			message_end();
		}
	}
}
}
User avatar
Jorj
eXtream Mod
eXtream Mod
Posts: 3500
Joined: 13 Aug 2013, 17:10
Detinator Steam: Da
Detinator server CS: Furien.LsZ.Ro
SteamID: clic_lsz
Reputatie: eXtream Mod
Fost Membru Club eXtreamCS (patru luni)
Nume anterior: Clic
Location: Piatra Neamt
Been thanked: 20 times
Contact:

31 Dec 2013, 19:00

?????????
Intermediez tranzactii cand am chef si timp ! :)

Image
User avatar
Adventx
Membru, skill +4
Membru, skill +4
Posts: 1785
Joined: 17 Sep 2013, 20:44
Detinator Steam: Da
Reputatie: Fost moderator ajutator
Has thanked: 125 times
Been thanked: 142 times
Contact:

31 Dec 2013, 20:26

ce nu iti merge?
Incearca asa daca folosesti depozitul lui Askhanar:

Code: Select all

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <fakemeta_util>
#include <hamsandwich>
#include <cstrike>
#include <engine>

#define PLUGIN "Bonus Box"
#define VERSION "1.0"
#define AUTHOR "ONEMDX"

native fcs_get_user_credits(id);
native fcs_set_user_credits(id, credits);

new const item_class_name[] = "dm_item"

new g_models[][] = {"models/cadouct_galben.mdl", "models/cadout_galben.mdl"}

public plugin_precache()
{
   for (new i = 0; i < sizeof g_models; i++)
      precache_model(g_models[i])   
}

public plugin_init()
{
   register_plugin(PLUGIN, VERSION, AUTHOR)
   
   register_forward(FM_Touch, "fwd_Touch")
   
   register_event("HLTV", "round_start", "a", "1=0", "2=0")
   
   RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
   
   
}

public fwd_Touch(toucher, touched)
{
   if (!is_user_alive(toucher) || !pev_valid(touched))
      return FMRES_IGNORED
   
   new classname[32]   
   pev(touched, pev_classname, classname, 31)
   if (!equal(classname, item_class_name))
      return FMRES_IGNORED
   
   
   
   give_item(toucher)
   set_pev(touched, pev_effects, EF_NODRAW)
   set_pev(touched, pev_solid, SOLID_NOT)
   
   return FMRES_IGNORED
   
}

public fw_PlayerKilled(victim, attacker, shouldgib)
{
   if (!is_user_connected(attacker) || !is_user_connected(victim) || attacker == victim || !attacker)
      return HAM_IGNORED
   
   // Modificat : am scos sansele ca am vazut ca toti vreti la fiecare kill 
   new random = random_num(0,2 )
   
   if (random == 0 || random == 1 || random == 2)
   {
      new origin[3]
      get_user_origin(victim, origin, 0)
      
      addItem(origin)
   }
   
   return HAM_IGNORED
}

public removeEntity(ent)
{
   if (pev_valid(ent))
      engfunc(EngFunc_RemoveEntity, ent)
}

public addItem(origin[3])
{
   new ent = fm_create_entity("info_target")
   set_pev(ent, pev_classname, item_class_name)
   
   engfunc(EngFunc_SetModel,ent, g_models[random_num(0, sizeof g_models - 1)])
   
   set_pev(ent,pev_mins,Float:{-10.0,-10.0,0.0})
   set_pev(ent,pev_maxs,Float:{10.0,10.0,25.0})
   set_pev(ent,pev_size,Float:{-10.0,-10.0,0.0,10.0,10.0,25.0})
   engfunc(EngFunc_SetSize,ent,Float:{-10.0,-10.0,0.0},Float:{10.0,10.0,25.0})
   
   set_pev(ent,pev_solid,SOLID_BBOX)
   set_pev(ent,pev_movetype,MOVETYPE_TOSS)
   
   new Float:fOrigin[3]
   IVecFVec(origin, fOrigin)
   set_pev(ent, pev_origin, fOrigin)
   
   set_pev(ent,pev_renderfx,kRenderFxGlowShell)
   
   // Rendere colorate , estetic arata mai bine cu mai multe culori 
   switch(random_num(1,6))
   {
      case 1: set_pev(ent,pev_rendercolor,Float:{0.0,0.0,255.0})
      case 2: set_pev(ent,pev_rendercolor,Float:{0.0,255.0,0.0})
      case 3: set_pev(ent,pev_rendercolor,Float:{255.0,0.0,0.0})
      case 4: set_pev(ent,pev_rendercolor,Float:{255.0,255.0,255.0})
      case 5: set_pev(ent,pev_rendercolor,Float:{0.0,255.0,255.0})
      case 6: set_pev(ent,pev_rendercolor,Float:{255.0,255.0,0.0})
   }
}

public give_item(id)
{
   switch (random_num(0,7)){ 
      case 0:{
         new HP;
         HP = 100;   
         fm_set_user_health(id, get_user_health(id) + HP); 
         ChatColor(id,"!g* [!teamBOX!g] You receive !team + %d Health ",HP); 
      }
      
      case 1:{
         fm_give_item(id,"weapon_hegrenade")
         ChatColor(id,"!g* [!teamBOX!g] You receive !team + 1 HE ");
      }
      
      case 2:{
         set_user_credits(id, get_user_credits(id) + 5)   
         ChatColor(id,"!g* [!teamBOX!g] You receive !team + 5 CREDITE"); 
                }
      
      case 3:{
         fm_give_item(id, "weapon_smokegrenade")
         ChatColor(id,"!g* [!teamBOX!g] You receive !team + 1 SMOKE ");
                }
      
      case 4:{
         set_user_credits(id, get_user_credits(id) + 5)   
         ChatColor(id,"!g* [!teamBOX!g] You receive !team + 5 CREDITE");
      }
      
      
                case 5:{
         set_user_credits(id, get_user_credits(id) + 10)   
         ChatColor(id,"!g* [!teamBOX!g] You receive !team + 10 CREDITE");
      }

                case 6:{
         set_user_credits(id, get_user_credits(id) + 5)   
         ChatColor(id,"!g* [!teamBOX!g] You receive !team + 5 CREDITE");
      }
      case 7:{
         
         set_user_credits(id, get_user_credits(id) + 10)   
         ChatColor(id,"!g* [!teamBOX!g] You receive !team + 10 CREDITE");
         
      }
   }
}

public round_start()
{
   new ent = FM_NULLENT
   static string_class[] = "classname"
   while ((ent = engfunc(EngFunc_FindEntityByString, ent, string_class, item_class_name))) 
      set_pev(ent, pev_flags, FL_KILLME)
}


stock ChatColor(const id, const input[], any:...)
{
   new count = 1, players[32]
   static msg[191]
   vformat(msg, 190, input, 3)
   
   replace_all(msg, 190, "!g", "^4") // Green Color
   replace_all(msg, 190, "!y", "^1") // Default Color
   replace_all(msg, 190, "!team", "^3") // Team Color
   replace_all(msg, 190, "!team2", "^0") // Team2 Color
   
   if (id) players[0] = id; else get_players(players, count, "ch")
   {
   for (new i = 0; i < count; i++)
   {
      if (is_user_connected(players[i]))
      {
         message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
         write_byte(players[i]);
         write_string(msg);
         message_end();
      }
   }
}
}
User avatar
Jorj
eXtream Mod
eXtream Mod
Posts: 3500
Joined: 13 Aug 2013, 17:10
Detinator Steam: Da
Detinator server CS: Furien.LsZ.Ro
SteamID: clic_lsz
Reputatie: eXtream Mod
Fost Membru Club eXtreamCS (patru luni)
Nume anterior: Clic
Location: Piatra Neamt
Been thanked: 20 times
Contact:

31 Dec 2013, 22:58

Ma eu vreau .amxx la ce ti-am dat
Intermediez tranzactii cand am chef si timp ! :)

Image
User avatar
Adventx
Membru, skill +4
Membru, skill +4
Posts: 1785
Joined: 17 Sep 2013, 20:44
Detinator Steam: Da
Reputatie: Fost moderator ajutator
Has thanked: 125 times
Been thanked: 142 times
Contact:

31 Dec 2013, 23:27

LoL, ce depozit folosesti? A lui Askhanar?
User avatar
Jorj
eXtream Mod
eXtream Mod
Posts: 3500
Joined: 13 Aug 2013, 17:10
Detinator Steam: Da
Detinator server CS: Furien.LsZ.Ro
SteamID: clic_lsz
Reputatie: eXtream Mod
Fost Membru Club eXtreamCS (patru luni)
Nume anterior: Clic
Location: Piatra Neamt
Been thanked: 20 times
Contact:

01 Jan 2014, 08:09

Da a alui.
Intermediez tranzactii cand am chef si timp ! :)

Image
User avatar
Adventx
Membru, skill +4
Membru, skill +4
Posts: 1785
Joined: 17 Sep 2013, 20:44
Detinator Steam: Da
Reputatie: Fost moderator ajutator
Has thanked: 125 times
Been thanked: 142 times
Contact:

01 Jan 2014, 15:15

Code: Select all

http://www.girlshare.ro/33123279.2
User avatar
Mădălin
Fost moderator
Fost moderator
Posts: 4938
Joined: 06 Mar 2013, 21:40
Detinator Steam: Nu
Reputatie: Fost Administrator
Fost manager cs.extream.ro
Has thanked: 17 times
Been thanked: 240 times
Contact:

13 Jan 2014, 23:33

Rezolvat?
www.phpbb-themes.com - custom designs
User avatar
Jorj
eXtream Mod
eXtream Mod
Posts: 3500
Joined: 13 Aug 2013, 17:10
Detinator Steam: Da
Detinator server CS: Furien.LsZ.Ro
SteamID: clic_lsz
Reputatie: eXtream Mod
Fost Membru Club eXtreamCS (patru luni)
Nume anterior: Clic
Location: Piatra Neamt
Been thanked: 20 times
Contact:

15 Jan 2014, 08:21

Da...
Intermediez tranzactii cand am chef si timp ! :)

Image
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests