←  Problemy

AMXX.pl: Support AMX Mod X i SourceMod

»

Problem z ColorChat

Zablokowany

hardbot - zdjęcie hardbot 15.04.2010

Chcę już sobie skonwertowac Plugin a tu nagle erorr?? Proszę was o pomoc bo nie wiem gdzie błąd? Jęczy cały czas

Error: Cannot read from file: "colorchat" on line 3 ??

I jak to nie może z czytac proszę tutaj SMA :]


#include <amxmodx>
#include <amxmisc>
#include <colorchat>

#define PLUGIN "HeadShot Info"
#define VERSION "1.0"
#define AUTHOR "sbstn"

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("DeathMsg","Death","ae")
register_cvar("amx_hs_on","1")
register_cvar("amx_hs_info","1")
register_cvar("amx_hs_info_style","1")
register_cvar("amx_hs_sound","1")
register_cvar("amx_hs_sound_style","1")
set_hudmessage(212, 255, 127, 0.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(id, "")
register_cvar("amx_hs_hud","1")
}

public plugin_precache()
{
precache_sound("AK/hs1.wav")
precache_sound("AK/hs2.wav")
precache_sound("AK/hs3.wav")
precache_sound("AK/hs4.wav")
precache_sound("AK/hs5.wav")
precache_sound("AK/hs6.wav")
precache_sound("AK/hs7.wav")
}

public Death()
{
new killer = read_data(1)
new victim = read_data(2)
new hs = read_data(3)
new killer_hp = get_user_health(killer)
new hs_info = get_cvar_num("amx_hs_info")
new hs_info_style = get_cvar_num("amx_hs_info_style")
new hs_on = get_cvar_num("amx_hs_on")
new killer_name[32]
new victim_name[32]
new weapon[32]
get_user_name(killer,killer_name,31)
get_user_name(victim,victim_name,31)
read_data(4, weapon, 31)

if(hs && hs_on==1)
{
Sound()
HUD(killer)

if(hs_info==1 && hs_info_style==1)
{
ColorChat(0, YELLOW, "# ^x04%s^x01 strzelil headshota ^x04%s^x01",killer_name,victim_name)
return PLUGIN_CONTINUE
}else if(hs_info==1 && hs_info_style==2)
{
ColorChat(0, YELLOW, "# ^x04%s^x01 strzelil headshota ^x04%s^x01 z ^x03%s^x01",killer_name,victim_name,weapon)
return PLUGIN_CONTINUE
}else if(hs_info==1 && hs_info_style==3)
{
ColorChat(0, YELLOW, "# ^x04%s^x01 strzelil headshota ^x04%s^x01 i nadal ma ^x03%dHP^x01!",killer_name,victim_name,killer_hp)
return PLUGIN_CONTINUE
}else if(hs_info==1 && hs_info_style==4)
{
ColorChat(0, YELLOW, "# ^x04%s^x01 strzelil headshota ^x04%s^x01 z ^x03%s^x01 i nadal ma ^x03%dHP^x01!",killer_name,victim_name,weapon,killer_hp)
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}
return PLUGIN_HANDLED
}

public Sound()
{
new hs_on = get_cvar_num("amx_hs_on")
new hs_sound = get_cvar_num("amx_hs_sound")
new hs_sound_style = get_cvar_num("amx_hs_sound_style")

if(hs_on==1 && hs_sound==1 && hs_sound_style==2)
{

new rand
rand = random_num(0,6)
switch (rand)
{
case 0:
{
client_cmd(0,"spk AK/hs1")
}
case 1:
{
client_cmd(0,"spk AK/hs2")
}
case 2:
{
client_cmd(0,"spk AK/hs3")
}
case 3:
{
client_cmd(0,"spk AK/hs4")
}
case 4:
{
client_cmd(0,"spk AK/hs5")
}
case 5:
{
client_cmd(0,"spk AK/hs6")
}
case 6:
{
client_cmd(0,"spk AK/hs7")
}
}
return PLUGIN_CONTINUE

}else if(hs_on==1 && hs_sound==1 && hs_sound_style==1)
{
client_cmd(0,"spk AK/hs1")
return PLUGIN_CONTINUE
}

return PLUGIN_CONTINUE
}

public HUD(killer)
{
new hs_on = get_cvar_num("amx_hs_on")
new hs_hud = get_cvar_num("amx_hs_hud")

if(hs_on==1 && hs_hud==1)
{
set_hudmessage(212,255,42,-1.0,-1.0,0,6.0,2.0)
show_hudmessage(killer,"O Kur** Jaki^nDUPSZOT!")
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}
Odpowiedz

Screeaam... - zdjęcie Screeaam... 15.04.2010

Spróbuj zamiast YELLOW na GREEN.
Odpowiedz

  • +
  • -
Abes Mapper - zdjęcie Abes Mapper 15.04.2010

Musisz kompilować lokalnie czyli na kompie. Także musisz posiadać plik colorchat.inc
Odpowiedz

  • +
  • -
kasza - zdjęcie kasza 15.04.2010

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

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

Compilation aborted.
4 Errors.
Could not locate output file C:\Program Files\AMX Mod X\amxxstudio\Untitled.amx (compile failed).

Odpowiedz

  • +
  • -
DarkGL - zdjęcie DarkGL 15.04.2010

usuń
 set_hudmessage(212, 255, 127, 0.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(id, "")

w plugin_init
Odpowiedz

hardbot - zdjęcie hardbot 16.04.2010

to tak :] zrobiłem all jak pisaliście i kupa nic nie pomogło mi wyskakuje cały czas w konsoli powiadomień

Welcome to the AMX Mod X 1.8.1-300 Compiler
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Error: Cannot read from file: "colorchat" on line 3

Compilation aborted

To mi wyskakuje po naciśnięciu Compile

PS: Kompiluje na kompie w AMXX-Studio??
Odpowiedz

  • +
  • -
DarkGL - zdjęcie DarkGL 16.04.2010

Także musisz posiadać plik colorchat.inc

do folderu include kompilatora

Załączone pliki

Odpowiedz

hardbot - zdjęcie hardbot 16.04.2010

Dobra problem rozwiązany Thx Abes Mapper plus gibon leci

@UP

jedna problemos dalej jest gdyż pliki się sciągły ale na serwie nic nie słychać udeżyłem z 3 hs'y pod rząd i dalej nic ocb
Użytkownik hardbot edytował ten post 16.04.2010 15:03
Odpowiedz

  • +
  • -
sbstn - zdjęcie sbstn 16.04.2010

Dźwięki dodałeś do sound/AK ?
(Widzę mój kod :rolleyes: )

EDIT:
set_hudmessage(212, 255, 127, 0.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(id, "")
Co to robi w plugin_init? :blink:
Użytkownik sbstn edytował ten post 16.04.2010 15:33
Odpowiedz

hardbot - zdjęcie hardbot 16.04.2010

to wiem sam przecież zmieniałem ścierzke o_O do Sound/AK
po 2 sam pisałeś plugin a się pytasz po co to o_O ogarnij się chłopie
ja tu tylko pytam dlaczego to nie działa
wrzuciłem jak pisał Abes Mapper i skompilowało się ale przed tym wyskoczyły 4 errory patrz co pisze kasza
Użytkownik hardbot edytował ten post 16.04.2010 15:40
Odpowiedz

  • +
  • -
sbstn - zdjęcie sbstn 16.04.2010

1. Kompiluj to i dalej wg instrukcji instalacji. [KLIK]
#include <amxmodx>
#include <amxmisc>
#include <colorchat>

#define PLUGIN "HeadShot Info"
#define VERSION "1.0"
#define AUTHOR "sbstn"

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("DeathMsg","Death","ae")
register_cvar("amx_hs_on","1")
register_cvar("amx_hs_info","1")
register_cvar("amx_hs_info_style","1")
register_cvar("amx_hs_sound","1")
register_cvar("amx_hs_sound_style","1")
register_cvar("amx_hs_hud","1")
}

public plugin_precache()
{
precache_sound("AK/hs1.wav")
precache_sound("AK/hs2.wav")
precache_sound("AK/hs3.wav")
precache_sound("AK/hs4.wav")
precache_sound("AK/hs5.wav")
precache_sound("AK/hs6.wav")
precache_sound("AK/hs7.wav")
}

public Death()
{
new killer = read_data(1)
new victim = read_data(2)
new hs = read_data(3)
new killer_hp = get_user_health(killer)
new hs_info = get_cvar_num("amx_hs_info")
new hs_info_style = get_cvar_num("amx_hs_info_style")
new hs_on = get_cvar_num("amx_hs_on")
new killer_name[32]
new victim_name[32]
new weapon[32]
get_user_name(killer,killer_name,31)
get_user_name(victim,victim_name,31)
read_data(4, weapon, 31)

if(hs && hs_on==1)
{
Sound()
HUD(killer)

if(hs_info==1 && hs_info_style==1)
{
ColorChat(0, YELLOW, "# ^x04%s^x01 strzelil headshota ^x04%s^x01",killer_name,victim_name)
return PLUGIN_CONTINUE
}else if(hs_info==1 && hs_info_style==2)
{
ColorChat(0, YELLOW, "# ^x04%s^x01 strzelil headshota ^x04%s^x01 z ^x03%s^x01",killer_name,victim_name,weapon)
return PLUGIN_CONTINUE
}else if(hs_info==1 && hs_info_style==3)
{
ColorChat(0, YELLOW, "# ^x04%s^x01 strzelil headshota ^x04%s^x01 i nadal ma ^x03%dHP^x01!",killer_name,victim_name,killer_hp)
return PLUGIN_CONTINUE
}else if(hs_info==1 && hs_info_style==4)
{
ColorChat(0, YELLOW, "# ^x04%s^x01 strzelil headshota ^x04%s^x01 z ^x03%s^x01 i nadal ma ^x03%dHP^x01!",killer_name,victim_name,weapon,killer_hp)
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}
return PLUGIN_HANDLED
}

public Sound()
{
new hs_on = get_cvar_num("amx_hs_on")
new hs_sound = get_cvar_num("amx_hs_sound")
new hs_sound_style = get_cvar_num("amx_hs_sound_style")

if(hs_on==1 && hs_sound==1 && hs_sound_style==2)
{

new rand
rand = random_num(0,6)
switch (rand)
{
case 0:
{
client_cmd(0,"spk AK/hs1")
}
case 1:
{
client_cmd(0,"spk AK/hs2")
}
case 2:
{
client_cmd(0,"spk AK/hs3")
}
case 3:
{
client_cmd(0,"spk AK/hs4")
}
case 4:
{
client_cmd(0,"spk AK/hs5")
}
case 5:
{
client_cmd(0,"spk AK/hs6")
}
case 6:
{
client_cmd(0,"spk AK/hs7")
}
}
return PLUGIN_CONTINUE

}else if(hs_on==1 && hs_sound==1 && hs_sound_style==1)
{
client_cmd(0,"spk AK/hs1")
return PLUGIN_CONTINUE
}

return PLUGIN_CONTINUE
}

public HUD(killer)
{
new hs_on = get_cvar_num("amx_hs_on")
new hs_hud = get_cvar_num("amx_hs_hud")

if(hs_on==1 && hs_hud==1)
{
set_hudmessage(212,255,42,-1.0,-1.0,0,6.0,2.0)
show_hudmessage(killer,"O Kur** Jaki^nDUPSZOT!")
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}


2. Wiem co to jest, tylko pytam się po kiego żeś tam to wrzucił.
3. All działa, coś źle robisz. Sam dojdź do tego co robisz niepoprawnie.

@EDIT: Specjalnie dla Ciebie jeszcze raz plugin dokładnie sprawdziłem i przetestowałem. Wszystko jest ok.

Pozdrawiam, sbstn.
Użytkownik sbstn edytował ten post 16.04.2010 16:00
Odpowiedz

hardbot - zdjęcie hardbot 17.04.2010

Temat do zamknięcia problem rozwiązany ;]
Odpowiedz

Adminek AMXX.PL - zdjęcie Adminek AMXX.PL 18.04.2010

Wiadomość wygenerowana automatycznie


Ten temat został zamknięty przez moderatora.

Powód: Problem rozwiązany

Jeśli się z tym nie zgadzasz, Dołączona grafika raportuj ten post, a moderator lub administrator rozpatrzy go ponownie.


Z pozdrowieniami,
Zespół AMXX.PL
Odpowiedz
Zablokowany