I nie chce skompilować. Mógłby ktoś poprawić kod żeby szło skompilować a zarazem wszystko działało jak należy.?
SS z Errorami w Załączniku
Kompilowałem lokalnie bo na http://amxx.pl/kompilator wyskakiwał mi taki błąd:
prezenty.sma(5) : fatal error 100: cannot read from file: "prezenty"
Plugin:
#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <prezenty>
#define PLUGIN "Lista prezentow"
#define VERSION "1.0"
#define AUTHOR "R3X"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_gift("Prezent#1", "Prezent_Numer1");
register_gift("Prezent#2", "Prezent_Numer2");
register_gift("Prezent#3", "Prezent_Numer3");
register_gift("Prezent#4", "Prezent_Numer4");
//Na poczatku rundy
register_event("HLTV", "eventRoundInit", "a", "1=0", "2=0");
}
public eventRoundInit()
{
gifts_clear_map();
set_task(60.0, "taskSpawnGift", 2368);
}
public taskSpawnGift()
{
gift_spawn();
}
public Prezent_Numer1(id)
{
client_print(id, print_chat, "Podniosles prezent");
new ile = random_num(10, 100)*10;
cod_set_user_xp(id, cod_get_user_xp(id)+ile);
client_print(id, print_chat, "Dostales %d expa", ile);
}
public Prezent_Numer2(id)
{
client_print(id, print_chat, "Podniosles prezent");
new ile = random_num(1, 10)*10;
if(nowe_zdrowie < maxzdrowie);
{
set_user_health(id, nowe_zdrowie);
client_print(id, print_chat, "Uleczono Cie o %d hp", ile);
}
if(nowe_zdrowie > maxzdrowie && zdrowie != maxzdrowie);
{
set_user_health(id, maxzdrowie);
client_print(id, print_chat, "Jestes w pelni uleczony!");
}
}
public Prezent_Numer3(id)
{
client_print(id, print_chat, "Podniosles prezent");
new ile = random_num(100, 500)*10;
cs_set_user_money(id, kasa+ile);
client_print(id, print_chat, "Otrzymales %d kasy", ile);
}
public Prezent_Numer4(id)
{
client_print(id, print_chat, "Podniosles prezent");
cod_set_user_perk(id, -1, -1, 1);
client_print(id, print_chat, "Dostales %d");
}
Użytkownik Wojo edytował ten post 30.11.2011 13:32