Mała poprawka
loleN
07.03.2009
#include <amxmodx> #include <amxmisc> #include <fun> #include <cstrike> #include <fakemeta> #include <hamsandwich> #include <cstrike> #define PLUGIN "DeathRun Extras" #define VERSION "1.0" #define AUTHOR "loleN~" new bool: uzyl[33] = false public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_event("HLTV", "wyczysc", "a", "1=0", "2=0"); register_clcmd("say /heal", "heal") register_clcmd("say /bron","usp") register_clcmd("say /usp","usp") register_clcmd("say_team /bron","usp") register_clcmd("say_team /usp","usp") RegisterHam(Ham_Spawn, "player", "starthp", 1) register_clcmd("say /kill","kill") log_amx("DeathRun Extras v%s by loleN[www.pjs-cs.eu] zostal wlaczony.", VERSION) } public wyczysc() { new players[32], pnum get_players(players, pnum); uzyl[players[pnum]] = false } public heal(id) { new CsTeams:userTeam = cs_get_user_team(id) switch(CsTeams:userTeam) { case 2: { set_user_health (id, 50) } case 1: { set_user_health (id, 100) } } } public usp(id) { new CsTeams:userTeam = cs_get_user_team(id) switch(CsTeams:userTeam) { case 2: { give_item(id, "weapon_usp") give_item(id, "ammo_45acp") give_item(id, "ammo_45acp") give_item(id, "ammo_45acp") give_item(id, "ammo_45acp") give_item(id, "ammo_45acp") give_item(id, "ammo_45acp") give_item(id, "ammo_45acp") } case 1: { client_print(id, print_chat,"Jestes terrorysta nie mozesz posiadac broni!") } } } public starthp(id) { new CsTeams:userTeam = cs_get_user_team(id) switch(CsTeams:userTeam) { case 2: { set_pev(id, pev_health, 50.0) } case 1: { set_user_health (id, 100) } } } public kill(player) { user_silentkill(player) }
Może ktoś mi poprawić, plugin działa ale są błędy.
loleN
07.03.2009
L 03/07/2009 - 02:11:29: Start of error session. L 03/07/2009 - 02:11:29: Info (map "de_nuke") (file "addons/amxmodx/logs/error_20090307.log") L 03/07/2009 - 02:11:29: [CSTRIKE] Invalid player 1 L 03/07/2009 - 02:11:29: [AMXX] Displaying debug trace (plugin "drex.amxx") L 03/07/2009 - 02:11:29: [AMXX] Run time error 10: native error (native "cs_get_user_team") L 03/07/2009 - 02:11:29: [AMXX] [0] drex.sma::starthp (line 78)
bakul. <3
07.03.2009
L 03/07/2009 - 02:11:29: [AMXX] Displaying debug trace (plugin "drex.amxx")Masz taki plugin jak drex.amxx?
mgr inż. Pavulon
07.03.2009
Kod:
L 03/07/2009 - 02:11:29: [AMXX] Displaying debug trace (plugin "drex.amxx")
Masz taki plugin jak drex.amxx?
omfg, hahaha
no nie wiem czy jesteś autorem tego pluginu(chociaż podpisałeś się pod nim) że poprawić go nie potrafisz, ale spróbuj tego:
#include <amxmodx> #include <fun> #include <cstrike> #include <fakemeta> #include <hamsandwich> #define PLUGIN "DeathRun Extras" #define VERSION "1.0" #define AUTHOR "loleN~" new bool: uzyl[33] = false public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_event("HLTV", "wyczysc", "a", "1=0", "2=0"); register_clcmd("say /heal", "heal") register_clcmd("say /bron","usp") register_clcmd("say /usp","usp") register_clcmd("say_team /bron","usp") register_clcmd("say_team /usp","usp") RegisterHam(Ham_Spawn, "player", "starthp", 1) register_clcmd("say /kill","kill") log_amx("DeathRun Extras v%s by loleN[www.pjs-cs.eu] zostal wlaczony.", VERSION) } public wyczysc() { new players[32], pnum get_players(players, pnum); uzyl[players[pnum]] = false } public heal(id) { new CsTeams:userTeam = cs_get_user_team(id) switch(CsTeams:userTeam) { case 2: { set_user_health (id, 50) } case 1: { set_user_health (id, 100) } } } public usp(id) { new CsTeams:userTeam = cs_get_user_team(id) switch(CsTeams:userTeam) { case 2: { give_item(id, "weapon_usp") give_item(id, "ammo_45acp") give_item(id, "ammo_45acp") give_item(id, "ammo_45acp") give_item(id, "ammo_45acp") give_item(id, "ammo_45acp") give_item(id, "ammo_45acp") give_item(id, "ammo_45acp") } case 1: { client_print(id, print_chat,"Jestes terrorysta nie mozesz posiadac broni!") } } } public starthp(id) { if (pev_valid(id)) { new CsTeams:userTeam = cs_get_user_team(id) switch(CsTeams:userTeam) { case 2: { set_pev(id, pev_health, 50.0) } case 1: { set_user_health (id, 100) } } } } public kill(player) { user_silentkill(player) }
loleN
07.03.2009
Napisałem go na tutach z innych stron.
@Edit
Dalej to samo!
@Edit
Dalej to samo!
L 03/07/2009 - 14:43:05: Start of error session. L 03/07/2009 - 14:43:05: Info (map "de_cbble") (file "addons/amxmodx/logs/error_20090307.log") L 03/07/2009 - 14:43:05: [CSTRIKE] Invalid player 1 L 03/07/2009 - 14:43:06: [AMXX] Displaying debug trace (plugin "drex.amxx") L 03/07/2009 - 14:43:06: [AMXX] Run time error 10: native error (native "cs_get_user_team") L 03/07/2009 - 14:43:06: [AMXX] [0] drex.sma::starthp (line 78)
Miczu
07.03.2009
Zamiast cstrike uzyj...hmm... fakemeta?
new userTeam = pev(id,pev_team);
Powinno dac 1 dla tt i 2 dla ct 0 dla spec czy cos
new userTeam = pev(id,pev_team);
Powinno dac 1 dla tt i 2 dla ct 0 dla spec czy cos
mgr inż. Pavulon
07.03.2009
Ta funkcja wyczyść nie do końca jest raczej taka jak być powinna.
Spróbuj może tego:
Spróbuj może tego:
#include <amxmodx> #include <fun> #include <fakemeta> #include <hamsandwich> #define PLUGIN "DeathRun Extras" #define VERSION "1.0" #define AUTHOR "loleN~" new bool: uzyl[33] = false public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_event("HLTV", "wyczysc", "a", "1=0", "2=0"); register_clcmd("say /heal", "heal") register_clcmd("say /bron","usp") register_clcmd("say /usp","usp") register_clcmd("say_team /bron","usp") register_clcmd("say_team /usp","usp") RegisterHam(Ham_Spawn, "player", "starthp", 1) register_clcmd("say /kill","kill") log_amx("DeathRun Extras v%s by loleN[www.pjs-cs.eu] zostal wlaczony.", VERSION) } public wyczysc() { new players[32], pnum get_players(players, pnum); for (new i; i<pnum; i++) uzyl[players[i]] = false } public heal(id) { new userTeam = get_user_team(id) switch(userTeam) { case 1: { set_user_health (id, 50) } case 2: { set_user_health (id, 100) } } } public usp(id) { new userTeam = get_user_team(id) switch(userTeam) { case 1: { give_item(id, "weapon_usp") give_item(id, "ammo_45acp") give_item(id, "ammo_45acp") give_item(id, "ammo_45acp") give_item(id, "ammo_45acp") give_item(id, "ammo_45acp") give_item(id, "ammo_45acp") give_item(id, "ammo_45acp") } case 2: { client_print(id, print_chat,"Jestes terrorysta nie mozesz posiadac broni!") } } } public starthp(id) { new userTeam = get_user_team(id) switch(userTeam) { case 1: { set_pev(id, pev_health, 50.0) } case 2: { set_user_health (id, 100) } } } public kill(player) { user_silentkill(player) }
mgr inż. Pavulon
07.03.2009
jakie znów literki ?okk działa tylko literki trzeba przestawić