←  Problemy

AMXX.pl: Support AMX Mod X i SourceMod

»

[Ct i TT razem + 1 inny]Prosze o pomoc

Locked

grs4's Photo grs4 10.06.2011

Siemka mam 2 tyg na napisanie pluginu nemesis

mam tyle

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Nemesis"
#define VERSION "1.0"
#define AUTHOR "striker"

new nazwa_nemesisa[33]
new hp_nemesisa
new grawitacja_nemesisa

new co_ile_rund

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

/////////////////////////////////////
////////////////CVARY////////////////
/////////////////////////////////////
co_ile_rund = register_cvar("nemesis_runds", "5")
hp_nemesisa = register_cvar("nemesis_health", "50000")
grawitacja_nemesisa = register_cvar("nemesis_gravity", "100")
/////////////////////////////////////
////////////////TEKST////////////////
/////////////////////////////////////
set_task(0.1, "Iformacje", _, _, _, "b")


}

public plugin_cfg()
{
server_cmd("sv_maxspeed 400")
}

public plugin_precache()
{
precache_model("player/nemesisek/nemesisek.mdl")
precache_sound("muza_nemesisa/1.wav")
precache_sound("muza_nemesisa/2.wav")
}

public Informacje(id)
{
set_hudmessage(255, 255, 255, 0.03, 0.20, 0, 6.0, 1.0)
show_hudmessage(id, "[Nemesis: %s]^n [HP: %i]", nazwa_nemesisa[id], hp_nemesisa[id])
}


Oczywiscie robie dalej ale mam

logi

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright © 1997-2006 ITB CompuPhase, AMX Mod X Team

Error: Invalid subscript (not an array or too many subscripts): "get_user_name" on line 47
Warning: Expression has no effect on line 47
Error: Expected token: ";", but found "]" on line 47
Error: Invalid expression, assumed zero on line 47
Error: Too many error messages on one line on line 47

Compilation aborted.
4 Errors.
Could not locate output file D:\Documents and Settings\strikerek\Pulpit\Pluginy\nemesis.amx (compile failed).


wiem ze jest blad na pewno bo nie zdefiniowalem nazwa_nemesisa i te


Ale jak zrobic zeby CT i TT bylo razem,
{
zeby ct i tt sie nie moglo zabijac
}

Zeby tekst wyswietla sie caly czas


[SRY ZA ORTOGRAFIE}

Dodano 10 czerwiec 2011 - 23:01:
Zalezy mi na szybkiej odpowiedzi

Dodano 11 czerwiec 2011 - 11:43:
odpisze ktos

Dodano 11 czerwiec 2011 - 17:16:
Odpisze?

Dodano 11 czerwiec 2011 - 19:04:
ODPISZCIE Jezus....
Edited by grs4, 10.06.2011 22:49.
Quote

  • +
  • -
phoeniX's Photo phoeniX 12.06.2011

Zobacz czy będzie działać to:

#include <amxmodx>
#include <amxmisc>

#include <fakemeta>

#define PLUGIN "Nemesis"
#define VERSION "1.0"
#define AUTHOR "striker"

new nazwa_nemesisa[33]
new hp_nemesisa
new grawitacja_nemesisa

new co_ile_rund

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

/////////////////////////////////////
////////////////CVARY////////////////
/////////////////////////////////////
co_ile_rund = register_cvar("nemesis_runds", "5")
hp_nemesisa = register_cvar("nemesis_health", "50000")
grawitacja_nemesisa = register_cvar("nemesis_gravity", "100")
/////////////////////////////////////
////////////////TEKST////////////////
/////////////////////////////////////
set_task(0.1, "Informacje", _, _, _, "b")

register_forward(FM_Touch, "AntyKill");


}

public plugin_cfg()
{
server_cmd("sv_maxspeed 400")
}

public plugin_precache()
{
precache_model("player/nemesisek/nemesisek.mdl")
precache_sound("muza_nemesisa/1.wav")
precache_sound("muza_nemesisa/2.wav")
}

public Informacje(id)
{
set_hudmessage(255, 255, 255, 0.03, 0.20, 0, 6.0, 1.0)
show_hudmessage(id, "[Nemesis: %s]^n [HP: %i]", nazwa_nemesisa[id], get_pcvar_num(hp_nemesisa))
}

public AntyKill(id, target)
{
if(!is_user_alive(id) || !is_user_alive(target))
return;
if(get_user_team(id) == get_user_team(target) && !get_cvar_num("mp_friendlyfire"))
return;
}
Quote
Locked