Error z klasami =(
Pawliniak
01.09.2011
Witam prosił bym o pomoc
Pozdrawiam i dziękuje bardzo
L 09/01/2011 - 17:24:27: [AMXX] Invalid Plugin (plugin "codclass_Kamikadze.amxx")
L 09/01/2011 - 17:24:27: Function "DeathMsg" was not found
L 09/01/2011 - 17:24:27: [AMXX] Displaying debug trace (plugin "codclass_Marszalek.amxx")
L 09/01/2011 - 17:24:27: [AMXX] Run time error 19: function not found
L 09/01/2011 - 17:24:27: [AMXX] [0] codclass_Marszalek_115377.sma::plugin_init (line 28)
L 09/01/2011 - 17:24:27: Function "DeathMsg" was not found
L 09/01/2011 - 17:24:27: [AMXX] Displaying debug trace (plugin "codclass_Mauser.amxx")
L 09/01/2011 - 17:24:27: [AMXX] Run time error 19: function not found
L 09/01/2011 - 17:24:27: [AMXX] [0] codclass_Mauser_115600.sma::plugin_init (line 30)
Pozdrawiam i dziękuje bardzo
Załączone pliki
Jak się nazwać
01.09.2011
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <codmod>
#include <fakemeta>
new const nazwa[] = "Marszalek";
new const opis[] = "Przy zabiciu z M3 dostaje dodatkowy exp || Dostaje Deagle ";
new const bronie = 1<<CSW_M3 | 1<<CSW_DEAGLE;
new const zdrowie = 30;
new const kondycja = 38;
new const inteligencja = 0;
new const wytrzymalosc = 20;
new bool:ma_klase[33];
new bool:moze_skoczyc[33];
new const maxClip[31] = { -1, 13, -1, 10, 1, 7, 1, 30, 30, 1, 30, 20, 25, 30, 35, 25, 12, 20,
10, 30, 100, 8, 30, 30, 20, 2, 7, 30, 30, -1, 50 };
public plugin_init() {
register_plugin(nazwa, "1.0", "QTM_Peyote");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
register_forward(FM_CmdStart, "CmdStart");
register_event("DeathMsg", "DeathMsg", "ade");
}
public cod_class_disabled(id)
ma_klase[id] = false;
public DeathMsg(id) //Oto nasz event
{
new attacker = read_data(1);
if(!is_user_connected(attacker))
return PLUGIN_CONTINUE;
if(!ma_klase[attacker])
return PLUGIN_CONTINUE;
cod_set_user_xp(id, cod_get_user_xp(id)+20); //20 czyli za fraga dostaniemy 20expa możemy to zmienić
return PLUGIN_CONTINUE;
}
Up to maraszałek jak znajdęczas dodam resztę
Użytkownik Jak się nazwać edytował ten post 01.09.2011 18:08
Hajtowy 02.09.2011
Kamikadze jest dobry
Tylko ten codmod cały psuje sprawe -.-
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: "codmod" on line 4 Compilation aborted. 1 Error. Could not locate output file C:\Users\Krystian\Desktop\codclass_Kamikadze.amx (compile failed).
Tylko ten codmod cały psuje sprawe -.-
Kolar`. 03.09.2011
Nie, nie będzie się crashowało.hmm... czyli nie powinno się crashować przez tą klasę ?
Hajtowy 07.09.2011
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright © 1997-2006 ITB CompuPhase, AMX Mod X Team
Warning: Symbol is never used: "maxClip" on line 56
Warning: Symbol is never used: "moze_skoczyc" on line 56
Header size: 700 bytes
Code size: 1568 bytes
Data size: 660 bytes
Stack/heap size: 16384 bytes; estimated max. usage=44 cells (176 bytes)
Total requirements: 19312 bytes
2 Warnings.
Done.
Skompliowało się, tylko te 2 warningsy mnie dobijają -.-
Copyright © 1997-2006 ITB CompuPhase, AMX Mod X Team
Warning: Symbol is never used: "maxClip" on line 56
Warning: Symbol is never used: "moze_skoczyc" on line 56
Header size: 700 bytes
Code size: 1568 bytes
Data size: 660 bytes
Stack/heap size: 16384 bytes; estimated max. usage=44 cells (176 bytes)
Total requirements: 19312 bytes
2 Warnings.
Done.
Skompliowało się, tylko te 2 warningsy mnie dobijają -.-
Załączone pliki
Jak się nazwać
07.09.2011
@@up co ty gadasz będą crashe tu masz poprawną wersję
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <codmod>
#include <fakemeta>
#include <hamsandwich>
#define DMG_BULLET (1<<1)
new const nazwa[] = "Mauser";
new const opis[] = "Natychmiastowo zabija,ma na to szans: 3% ||";
new const bronie = 1<<CSW_FAMAS;
new const zdrowie = 30;
new const kondycja = 38;
new const inteligencja = 0;
new const wytrzymalosc = 20;
new bool:ma_klase[33];
new const maxClip[31] = { -1, 13, -1, 10, 1, 7, 1, 30, 30, 1, 30, 20, 25, 30, 35, 25, 12, 20,
10, 30, 100, 8, 30, 30, 20, 2, 7, 30, 30, -1, 50 };
public plugin_init() {
register_plugin(nazwa, "1.0", "QTM_Peyote");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
RegisterHam(Ham_TakeDamage, "player", "TakeDamage");
}
public cod_class_enabled(id)
ma_klase[id] = true;
public cod_class_disabled(id)
ma_klase[id] = false;
public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)
{
if(!is_user_connected(idattacker))
return HAM_IGNORED;
if(!ma_klase[idattacker])
return HAM_IGNORED;
if(damagebits & DMG_BULLET)
{
new weapon = get_user_weapon(idattacker);
if(weapon == CSW_FAMAS && random_num(1,30) == 1)
cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
}
return HAM_IGNORED;
}