Skocz do zawartości

  • Zaloguj korzystając z Facebooka Zaloguj korzystając z Twittera Zaloguj przez Steam Zaloguj poprzez Google      Logowanie »   
  • Rejestracja

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.

  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

System XP


  • Zamknięty Temat jest zamknięty
4 odpowiedzi w tym temacie

#1 METALOWIEC

    Zaawansowany

  • Użytkownik

Reputacja: 16
Początkujący

  • Postów:82
  • GG:
  • Lokalizacja:Szczecin
Offline

Napisano 08.12.2009 17:47

Potrzebuję prostego systemu xP, który można wkleić w inny plugin...
Za każdy poziom gracz otrzymywałby nowa range: 10lvl = 10 rang.

Oraz kodu który respawnowałby gracza od razu po śmierci: DM.


Z Góóóóry THX :P
  • +
  • -
  • 0

#2 DarkGL

    Nie oddam ciasteczka !

  • Administrator

Reputacja: 6034
Godlike

  • Postów:10832
  • GG:
  • Steam:steam
  • Imię:Rafał
  • Lokalizacja:Warszawa
Offline

Napisano 08.12.2009 18:00

tworzysz tablice z ilością xP który jest potrzebny do zdobycia levela dajesz event śmierci i temu kto zabił dodajesz xP. xP graczy masz zapisane w tablicy np. players_xP[33];sprawdzasz czy ilość xP jest większa od następnego levela jeśli tak zwiększa level nic prostszego do napisanie ;)

2)
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "Home"


public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_event("DeathMsg", "DeathMsg", "a")
}

public DeathMsg(){
	new victim = read_data(2)
	set_task(1.0,"respawn_player",victim);
}

public respawn_player(id) 
{      
	if (!is_user_connected(id) || is_user_alive(id) || cs_get_user_team(id) == CS_TEAM_SPECTATOR){
		return;
	}
	
	set_pev(id, pev_deadflag, DEAD_RESPAWNABLE) 
	dllfunc(DLLFunc_Think, id) 
	
	if(pev(id, pev_deadflag) == DEAD_RESPAWNABLE)
	{ 
		dllfunc(DLLFunc_Spawn, id) 
	}
}

  • +
  • -
  • 0

#3 METALOWIEC

    Zaawansowany

  • Autor tematu
  • Użytkownik

Reputacja: 16
Początkujący

  • Postów:82
  • GG:
  • Lokalizacja:Szczecin
Offline

Napisano 08.12.2009 18:25

4: errors przy kompilacji z pluginem,

Error: Undefined symbol "set_pev" on line 103
Warning: Expression has no effect on line 103
Error: Expected token: ";", but found ")" on line 103
Error: Invalid expression, assumed zero on line 103
Error: Too many error messages on one line on line 103

Compilation aborted.
4 Errors.

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <engine>
#include <hamsandwich>
#include <fun>

#define PLUGIN "DMC"
#define VERSION "1.0"
#define AUTHOR "Hunter"

new bool:ebony[33]
new ebony_cost
new bool:blood[33]
new woda_cost
new bool:bron[33]

public plugin_init() {
	register_plugin("DMC", "1.0", "Hunter")
	register_event("CurWeapon","yamato","be", "1=1")
	register_event("DeathMsg", "DeathMsg", "a") 
	RegisterHam(Ham_Spawn, "player", "Hamspawn", 1)
	register_event("TeamInfo","team_assign","a")
	register_cvar("amx_dmc","1")
	ebony_cost = register_cvar("amx_ebony_cost", "3000")
	woda_cost = register_cvar("amx_woda_cost", "200")


	register_clcmd("say /ebony", "ivory")
	register_clcmd("say /woda", "he")
	register_clcmd("drop", "drop")
	register_clcmd("cl_setautobuy","block") 
	register_clcmd("cl_autobuy","block") 
	register_clcmd("cl_setrebuy","block") 
	register_clcmd("cl_rebuy","block") 
	register_clcmd("buy","block") 
	register_clcmd("glock","block") 
	register_clcmd("usp","block") 
	register_clcmd("p228","block") 
	register_clcmd("deagle","block") 
	register_clcmd("fn57","block") 
	register_clcmd("m3","block") 
	register_clcmd("xm1014","block") 
	register_clcmd("mac10","block") 
	register_clcmd("tmp","block") 
	register_clcmd("mp5","block") 
	register_clcmd("ump45","block") 
	register_clcmd("p90","block") 
	register_clcmd("galil","block") 
	register_clcmd("ak47","block") 
	register_clcmd("scout","block") 
	register_clcmd("sg552","block") 
	register_clcmd("awp","block") 
	register_clcmd("g3sg1","block") 
	register_clcmd("famas","block") 
	register_clcmd("m4a1","block") 
	register_clcmd("bullpup","block") 
	register_clcmd("sg550","block") 
	register_clcmd("m249","block") 
	register_clcmd("primammo","block") 
	register_clcmd("secammo","block") 
	register_clcmd("vest","block") 
	register_clcmd("vesthelm","block") 
	register_clcmd("flash","block") 
	register_clcmd("hegren","block") 
	register_clcmd("sgren","block") 
	register_clcmd("nvgs","block") 
	register_clcmd("aug","block") 
	register_clcmd("fiveseven","block") 
	register_clcmd("cv47","block") 
	register_clcmd("228compact","block") 
	register_clcmd("autoshotgun","block") 
	register_clcmd("bullpup","block") 
	register_clcmd("fiveseven","block") 
	register_clcmd("krieg550","block") 
	register_clcmd("defender","block") 
	register_clcmd("clarion","block") 
	register_clcmd("km45","block") 
	register_clcmd("9x19mm","block") 
	register_clcmd("magnum","block") 
	register_clcmd("mp5","block") 
	register_clcmd("smg","block") 
	register_clcmd("12gauge","block") 
	register_clcmd("mp","block") 
	register_clcmd("d3au1","block") 
	register_clcmd("nighthawk","block") 
	register_clcmd("krieg552","block") 
	register_clcmd("c90","block") 
}
public DeathMsg(){
    new victim = read_data(2)
    set_task(1.0,"respawn_player",victim)
}

public respawn_player(id)
{     
    if (!is_user_connected(id) || is_user_alive(id) || cs_get_user_team(id) == CS_TEAM_SPECTATOR){
        return PLUGIN_CONTINUE
	}
   
    set_pev(id, pev_deadflag, DEAD_RESPAWNABLE);
    dllfunc(DLLFunc_Think, id)
   
    if(pev(id, pev_deadflag) == DEAD_RESPAWNABLE)
    {
        dllfunc(DLLFunc_Spawn, id)
    } 
    
public yamato (id) {
	new wlaczony = get_cvar_num("amx_dmc")
	if(wlaczony) {
		if(!bron[id]) {
			engclient_cmd(id, "weapon_knife")
			entity_set_string(id, EV_SZ_viewmodel, "models/v_yamato.mdl")
		}
		if(get_user_weapon(id) == CSW_KNIFE) {
			entity_set_string(id, EV_SZ_viewmodel, "models/v_yamato.mdl")
		}
		if(ebony[id] && get_user_weapon(id) == CSW_ELITE) {
			entity_set_string(id, EV_SZ_viewmodel, "models/v_ebony.mdl")
			entity_set_string(id, EV_SZ_weaponmodel, "")
		}
		if(get_user_weapon(id) == CSW_HEGRENADE) {
			entity_set_string(id, EV_SZ_viewmodel, "models/v_woda.mdl")
			entity_set_string(id, EV_SZ_weaponmodel, "models/p_woda.mdl")
		}
		if(get_user_weapon(id)==CSW_USP) client_cmd(id, "drop")
		if(get_user_weapon(id)==CSW_GLOCK18) client_cmd(id, "drop")
	}
		
}
public plugin_precache () {
	precache_model("models/v_yamato.mdl")
	precache_sound("misc/dmc.mp3")
	precache_model("models/player/CT_da/CT_da.mdl")
	precache_model("models/player/TT_d/TT_d.mdl")
	precache_model("models/v_ebony.mdl")
	precache_model("models/v_woda.mdl")
	precache_model("models/p_woda.mdl")
}
public Hamspawn (id) {
	new wlaczony = get_cvar_num("amx_dmc") 
	if (!wlaczony) {
		client_cmd(id, "mp3 stop")
		return PLUGIN_CONTINUE
	}
	client_cmd(id, "mp3 loop sound/misc/dmc.mp3")	
	set_user_gravity(id, 0.4)
	set_user_health(id, 250)
	set_user_armor(id, 200)
	set_hudmessage(255, 0, 0, -1.0, 0.01)
show_hudmessage(id, "<Witamy w DEVIL MAY CRY Mod! Aby kupic Ebony & Ivory - wpisz /ebony, aby kupic Wode Swiecona - wpisz: /woda.  Milej Zabawy.>")
	return PLUGIN_CONTINUE
}
public team_assign (id) {
	new id=read_data(1)
	new team[32]
	new wlaczony = get_cvar_num("amx_dmc") 
	if (!wlaczony) return PLUGIN_CONTINUE
	read_data(2,team,31)
	if(equal("CT",team)) cs_set_user_model(id,"CT_da")
	if(equal("TERRORIST",team)) cs_set_user_model(id,"TT_d")
	return PLUGIN_CONTINUE
}
public ivory(id) {
	new wlaczony = get_cvar_num("amx_dmc") 
	if (!wlaczony) 
	return PLUGIN_CONTINUE
	new price = get_pcvar_num(ebony_cost);
	new money = cs_get_user_money(id);
	if(money < price) {
	    	client_print(id,print_chat, "[DMC] Nie masz tyle krwi demona!")
		return PLUGIN_HANDLED
	} else {
		give_item(id, "weapon_elite")
		ebony[id] = true
		cs_set_user_money(id, money - price)
		client_print(id, print_chat, "[DMC] Kupiles Ebony & Ivory !")
		bron[id] = true
		}
	
	return PLUGIN_CONTINUE
}
public client_connect (id) {
ebony[id] = false
blood[id] = false
bron[id] = false
}
public drop(id) return PLUGIN_CONTINUE
public block(id) {
	new wlaczony = get_cvar_num("amx_dmc")
	if(wlaczony) {
		return PLUGIN_HANDLED
	}
	return PLUGIN_CONTINUE
}
public he (id) {
	new wlaczony = get_cvar_num("amx_dmc") 
	if (!wlaczony) 
	return PLUGIN_CONTINUE
	new money = cs_get_user_money(id);
	new blood = get_pcvar_num(woda_cost)
	if(money < blood) {
		client_print(id, print_chat, "[DMC] Nie masz tyle krwi demona!")
		return PLUGIN_HANDLED
	} else {
		give_item(id, "weapon_hegrenade")
		bron[id] = true
		cs_set_user_money(id, money - blood)
		client_print(id, print_chat, "[DMC] Kupiles Wode Swiecona !")
	}
	return PLUGIN_CONTINUE
}


  • +
  • -
  • 0

#4 DarkGL

    Nie oddam ciasteczka !

  • Administrator

Reputacja: 6034
Godlike

  • Postów:10832
  • GG:
  • Steam:steam
  • Imię:Rafał
  • Lokalizacja:Warszawa
Offline

Napisano 08.12.2009 18:39

/* Plugin generated by AMXX-Studio */ 



#include <amxmodx> 

#include <amxmisc> 

#include <cstrike> 

#include <engine> 

#include <hamsandwich> 

#include <fun> 

#include <fakemeta>



#define PLUGIN "DMC" 

#define VERSION "1.0" 

#define AUTHOR "Hunter" 



new bool:ebony[33] 

new ebony_cost 

new bool:blood[33] 

new woda_cost 

new bool:bron[33] 



public plugin_init() { 

	register_plugin("DMC", "1.0", "Hunter") 

	register_event("CurWeapon","yamato","be", "1=1") 

	register_event("DeathMsg", "DeathMsg", "a") 

	RegisterHam(Ham_Spawn, "player", "Hamspawn", 1) 

	register_event("TeamInfo","team_assign","a") 

	register_cvar("amx_dmc","1") 

	ebony_cost = register_cvar("amx_ebony_cost", "3000") 

	woda_cost = register_cvar("amx_woda_cost", "200") 

	

	

	register_clcmd("say /ebony", "ivory") 

	register_clcmd("say /woda", "he") 

	register_clcmd("drop", "drop") 

	register_clcmd("cl_setautobuy","block") 

	register_clcmd("cl_autobuy","block") 

	register_clcmd("cl_setrebuy","block") 

	register_clcmd("cl_rebuy","block") 

	register_clcmd("buy","block") 

	register_clcmd("glock","block") 

	register_clcmd("usp","block") 

	register_clcmd("p228","block") 

	register_clcmd("deagle","block") 

	register_clcmd("fn57","block") 

	register_clcmd("m3","block") 

	register_clcmd("xm1014","block") 

	register_clcmd("mac10","block") 

	register_clcmd("tmp","block") 

	register_clcmd("mp5","block") 

	register_clcmd("ump45","block") 

	register_clcmd("p90","block") 

	register_clcmd("galil","block") 

	register_clcmd("ak47","block") 

	register_clcmd("scout","block") 

	register_clcmd("sg552","block") 

	register_clcmd("awp","block") 

	register_clcmd("g3sg1","block") 

	register_clcmd("famas","block") 

	register_clcmd("m4a1","block") 

	register_clcmd("bullpup","block") 

	register_clcmd("sg550","block") 

	register_clcmd("m249","block") 

	register_clcmd("primammo","block") 

	register_clcmd("secammo","block") 

	register_clcmd("vest","block") 

	register_clcmd("vesthelm","block") 

	register_clcmd("flash","block") 

	register_clcmd("hegren","block") 

	register_clcmd("sgren","block") 

	register_clcmd("nvgs","block") 

	register_clcmd("aug","block") 

	register_clcmd("fiveseven","block") 

	register_clcmd("cv47","block") 

	register_clcmd("228compact","block") 

	register_clcmd("autoshotgun","block") 

	register_clcmd("bullpup","block") 

	register_clcmd("fiveseven","block") 

	register_clcmd("krieg550","block") 

	register_clcmd("defender","block") 

	register_clcmd("clarion","block") 

	register_clcmd("km45","block") 

	register_clcmd("9x19mm","block") 

	register_clcmd("magnum","block") 

	register_clcmd("mp5","block") 

	register_clcmd("smg","block") 

	register_clcmd("12gauge","block") 

	register_clcmd("mp","block") 

	register_clcmd("d3au1","block") 

	register_clcmd("nighthawk","block") 

	register_clcmd("krieg552","block") 

	register_clcmd("c90","block") 

} 

public DeathMsg(){ 

	new victim = read_data(2) 

	set_task(1.0,"respawn_player",victim) 

} 



public respawn_player(id) 

{      

	if (!is_user_connected(id) || is_user_alive(id) || cs_get_user_team(id) == CS_TEAM_SPECTATOR){ 

		return PLUGIN_CONTINUE 

	} 

	

	set_pev(id, pev_deadflag, DEAD_RESPAWNABLE); 

	dllfunc(DLLFunc_Think, id) 

	

	if(pev(id, pev_deadflag) == DEAD_RESPAWNABLE) 

	{ 

		dllfunc(DLLFunc_Spawn, id) 

	} 

	return PLUGIN_CONTINUE

}



public yamato(id){ 

	new wlaczony = get_cvar_num("amx_dmc") 

	if(wlaczony) { 

		if(!bron[id]) { 

			engclient_cmd(id, "weapon_knife") 

			entity_set_string(id, EV_SZ_viewmodel, "models/v_yamato.mdl") 

		} 

		if(get_user_weapon(id) == CSW_KNIFE) { 

			entity_set_string(id, EV_SZ_viewmodel, "models/v_yamato.mdl") 

		} 

		if(ebony[id] && get_user_weapon(id) == CSW_ELITE) { 

			entity_set_string(id, EV_SZ_viewmodel, "models/v_ebony.mdl") 

			entity_set_string(id, EV_SZ_weaponmodel, "") 

		} 

		if(get_user_weapon(id) == CSW_HEGRENADE) { 

			entity_set_string(id, EV_SZ_viewmodel, "models/v_woda.mdl") 

			entity_set_string(id, EV_SZ_weaponmodel, "models/p_woda.mdl") 

		} 

		if(get_user_weapon(id)==CSW_USP) client_cmd(id, "drop") 

		if(get_user_weapon(id)==CSW_GLOCK18) client_cmd(id, "drop") 

	} 

	

} 



public plugin_precache () { 

	precache_model("models/v_yamato.mdl") 

	precache_sound("misc/dmc.mp3") 

	precache_model("models/player/CT_da/CT_da.mdl") 

	precache_model("models/player/TT_d/TT_d.mdl") 

	precache_model("models/v_ebony.mdl") 

	precache_model("models/v_woda.mdl") 

	precache_model("models/p_woda.mdl") 

} 

public Hamspawn (id) { 

	new wlaczony = get_cvar_num("amx_dmc") 

	if (!wlaczony) { 

		client_cmd(id, "mp3 stop") 

		return PLUGIN_CONTINUE 

	} 

	client_cmd(id, "mp3 loop sound/misc/dmc.mp3")    

	set_user_gravity(id, 0.4) 

	set_user_health(id, 250) 

	set_user_armor(id, 200) 

	set_hudmessage(255, 0, 0, -1.0, 0.01) 

	show_hudmessage(id, "<Witamy w DEVIL MAY CRY Mod! Aby kupic Ebony & Ivory - wpisz /ebony, aby kupic Wode Swiecona - wpisz: /woda.  Milej Zabawy.>") 

	return PLUGIN_CONTINUE 

} 

public team_assign (id) { 

	new id=read_data(1) 

	new team[32] 

	new wlaczony = get_cvar_num("amx_dmc") 

	if (!wlaczony) return PLUGIN_CONTINUE 

	read_data(2,team,31) 

	if(equal("CT",team)) cs_set_user_model(id,"CT_da") 

	if(equal("TERRORIST",team)) cs_set_user_model(id,"TT_d") 

	return PLUGIN_CONTINUE 

} 

public ivory(id) { 

	new wlaczony = get_cvar_num("amx_dmc") 

	if (!wlaczony) 

		return PLUGIN_CONTINUE 

	new price = get_pcvar_num(ebony_cost); 

	new money = cs_get_user_money(id); 

	if(money < price) { 

		client_print(id,print_chat, "[DMC] Nie masz tyle krwi demona!") 

		return PLUGIN_HANDLED 

		} else { 

		give_item(id, "weapon_elite") 

		ebony[id] = true 

		cs_set_user_money(id, money - price) 

		client_print(id, print_chat, "[DMC] Kupiles Ebony & Ivory !") 

		bron[id] = true 

	} 

	

	return PLUGIN_CONTINUE 

} 

public client_connect (id) { 

	ebony[id] = false 

	blood[id] = false 

	bron[id] = false 

} 

public drop(id) return PLUGIN_CONTINUE 

public block(id) { 

	new wlaczony = get_cvar_num("amx_dmc") 

	if(wlaczony) { 

		return PLUGIN_HANDLED 

	} 

	return PLUGIN_CONTINUE 

} 

public he (id) { 

	new wlaczony = get_cvar_num("amx_dmc") 

	if (!wlaczony) 

		return PLUGIN_CONTINUE 

	new money = cs_get_user_money(id); 

	new blood = get_pcvar_num(woda_cost) 

	if(money < blood) { 

		client_print(id, print_chat, "[DMC] Nie masz tyle krwi demona!") 

		return PLUGIN_HANDLED 

		} else { 

		give_item(id, "weapon_hegrenade") 

		bron[id] = true 

		cs_set_user_money(id, money - blood) 

		client_print(id, print_chat, "[DMC] Kupiles Wode Swiecona !") 

	} 

	return PLUGIN_CONTINUE 

}

  • +
  • -
  • 0

#5 METALOWIEC

    Zaawansowany

  • Autor tematu
  • Użytkownik

Reputacja: 16
Początkujący

  • Postów:82
  • GG:
  • Lokalizacja:Szczecin
Offline

Napisano 08.12.2009 18:46

Dzięki :) Temat do Zamknięcia
  • +
  • -
  • 0




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych