Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

Błędy przy kompilacji vipa


  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
Brak odpowiedzi do tego tematu

#1 cajmert

    Zaawansowany

  • Użytkownik

Reputacja: 21
Życzliwy

  • Postów:87
  • Imię:Dawid
  • Lokalizacja:Katowice
Offline

Napisano 29.04.2012 13:08

Witam, prosiłbym o skompilowanie mi tego pluginu, albo danie mi sma poprawnego

Nie wiem czemu ale nie da się skompilować, a za bardzo nie ogarniam dobrze pisania :)


taki błąd mi sie pokazuje:

error 026: no matching "#if..."


proszę o pomoc


PS. nie dodało mi w załączniku nie wiem czemu ;/

o to sma
#include <amxmodx>
#include <cstrike>
#include <fakemeta_util>
#include <hamsandwich>



new const gPluginName[] = "V.i.P PB";
new const gPluginVersion[] = "1.0";
new const gPluginAuthor[] = "MisieQ";

/*
Podziękowania:
Sn!ff3r(Seba) - za plugin Advanced Bullet Damage
Ludzią z AlliedMods - za status VIP w scoreboard oraz za kilka stockow ;)
AMXX.pl - za dokumentacje :P
Skromny - za pomysł na V.i.P :)
cajmert - za pomysł z dodaniem listy V.i.P jak rowniez motd z informacjami o nim ;)
Edycja na potrzeby CSBydgoszcz.Pl przez cajmerta
*/

/* -=[ Dodatkowa Konfiguracja ]=- */

/* -=[ Flaga V.i.P ] =- */
#define VIP ADMIN_LEVEL_H

/* -=[ Informacje na Temat Wlacz / wyłącz ]=-
*
* Aby wylaczyc dana opcje dodaje przed
* #define znak //
* aby wygladalo to tak
* //#define
* aby ja ponownie wlaczyc po prostu usun te znaczki
*/

/* -=[ Podwojny Skok - Wlacz / wyłącz ]=- */
//#define PODWOJNY_SKOK
/* -=[ Advanced Bullet Damage - Wlacz / wyłącz ]=- */
#define ADVENCED_BULLET_DAMAGE
/* -=[ Status V.i.P w ScoreBoard - Wlacz / wyłącz ]=- */
#define STATUS_VIP
/* -=[ Dodatkowe HP za zabicie - Wlacz / wyłącz ]=- */
//#define DODATKOWE_HP
/* -=[ Ciche chodzenie - Wlacz / wyłącz ]=- */
//#define CICHE CHODZENIE
/* -=[ Modele V.i.P - Wlacz / wyłącz ]=- */
#define MODELE_VIP
/* -=[ Powitanie V.i.P - Wlacz / wyłącz ]=- */
#define POWITANIE_VIP
/* -=[ Dodatki V.i.P - Wlacz / wyłącz ]=- */
#define DODATKI_VIP
/* -=[ MOTD z informacja o V.i.P - Wlacz / wyłącz ]=- */
#define INFO_VIP
/* -=[ Lista graczy ktorzy posiadaja status V.i.P - Wlacz / wyłącz ]=- */
#define LISTA_VIP

/* -=[ Dodatkowa Konfiguracja ]=- */

/* -=[ Skoki ] =- */
#if defined PODWOJNY_SKOK
new bool:moze_skoczyc[33];
#endif

#if defined ADVENCED_BULLET_DAMAGE
/* -=[ BulletDamage V.i.P ]=- */
new g_type, g_enabled, g_recieved, bool:g_showrecieved, g_hudmsg1, g_hudmsg2
#endif

#if defined DODATKOWE_HP
/* -=[ Dodatkowe HP za Zabicie & HS V.i.P ]=- */
new health_add, health_hs_add, health_max, nKiller, nKiller_hp, nHp_add, nHp_max
#endif

#if defined CICHE CHODZENIE
/* -=[ Ciche Chodzenie V.i.P #2 ]=- */
#define STANDARDTIMESTEPSOUND 400
new bool:g_silent[33]
#endif

#if defined LISTA_VIP
/* -=[ Lista graczy ktorzy posiadaja status V.i.P */
new gMaxPlayers, gMSGSayText;
static const COLOR[] = "^x04" // ^x01 - Info wyswietlane jest na zolto | ^x03 - Info wyswietlane jest na zielono | ^x04 - Info wyswietlane jest na kolor teamu (czerwono - TT / niebiesko - CT)
#endif

public plugin_init()
{
register_plugin(gPluginName, gPluginVersion, gPluginAuthor)

#if defined STATUS_VIP
/* -=[ Status V.i.P w Tabeli ]=- */
register_message(get_user_msgid("ScoreAttrib"), "msgScoreAttrib");
#endif

#if defined PODWOJNY_SKOK
/* -=[ Podwojny Skok V.i.P ]=- */
register_forward(FM_CmdStart, "CmdStart");
#endif

#if defined DODATKI_VIP
/* -=[ Dodatki V.i.P ]=- */
RegisterHam(Ham_Spawn, "player", "fwSpawn", 1);
#endif

#if defined ADVENCED_BULLET_DAMAGE
/* -=[ BulletDamage V.i.P ]=- */
register_event("Damage", "on_damage", "b", "2!0", "3=0", "4!0")
register_event("HLTV", "on_new_round", "a", "1=0", "2=0")
g_hudmsg1 = CreateHudSyncObj()
g_hudmsg2 = CreateHudSyncObj()
g_type = register_cvar("vip_bulletdamage","1")
g_recieved = register_cvar("vip_bulletdamage_recieved","1")
#endif

#if defined DODATKOWE_HP
/* -=[ Dodatkowe HP za Zabicie & HS V.i.P ]=- */
register_event("DeathMsg", "hook_death", "a", "1>0")
health_add = register_cvar("vip_hp", "20")
health_hs_add = register_cvar("vip_hp_hs", "30")
health_max = register_cvar("vip_max_hp", "100")
#endif

#if defined CICHE CHODZENIE
/* -=[ Ciche Chodzenie V.i.P #2 ]=- */
register_forward(FM_PlayerPreThink, "forward_player_prethink")
#endif

#if defined INFO_VIP
/* -=[ MOTD z informacja o V.i.P ]=- */
register_clcmd("say /vip","ViPInfo")
register_clcmd("say_team /vip","ViPInfo")
#endif

#if defined INFO_VIP
/* -=[ Lista graczy ktorzy posiadaja status V.i.P ]=- */
register_clcmd("say /vips","ViPLista")
register_clcmd("say_team /vips","ViPLista")
gMaxPlayers = get_maxplayers();
gMSGSayText = get_user_msgid("SayText")
#endif
}

#if defined STATUS_VIP
/* -=[ Status V.i.P w Tabeli ]=- */
public msgScoreAttrib( const MsgId, const MsgType, const MsgDest )
{
static id;
id = get_msg_arg_int( 1 );

if( ( get_user_flags( id ) & VIP ) && !get_msg_arg_int( 2 ))
{
set_msg_arg_int( 2, ARG_BYTE, ( 1 << 2 ) );
}
}
/* -=[ Status V.i.P w Tabeli ]=- */
#endif

#if defined MODELE_VIP
/* -=[ Dodatkowe Modele V.i.P ]=- */
public plugin_precache()
{
precache_model("models/player/vip_ct/vip_ct.mdl")
precache_model("models/player/vip_tt/vip_tt.mdl")

return PLUGIN_CONTINUE
}
/* -=[ Dodatkowe Modele V.i.P ]=- */
#endif

#if defined POWITANIE_VIP
/* -=[ Info o wchodzeniu gracza V.i.P ]=- */
public client_putinserver(id)
{
new name[32];
get_user_name(id, name, 31)
if(get_user_flags(id) & VIP)
{
set_hudmessage(200, 0, 0, 0.05, 0.65, 2, 0.02, 30.0, 0.03, 0.3, 2)
show_hudmessage(0, "VIP %s wszedl na serwer", name)
}
return PLUGIN_CONTINUE
}

public client_connect(id)
{
new name[32];
get_user_name(id, name, 31)
if(get_user_flags(id) & VIP)
{
set_hudmessage(200, 0, 0, 0.05, 0.65, 2, 0.02, 30.0, 0.03, 0.3, 2)
show_hudmessage(0, "VIP %s wszedl na serwer", name)
}
return PLUGIN_CONTINUE
}
/* -=[ Info o wchodzeniu gracza V.i.P ]=- */
#endif

#if defined PODWOJNY_SKOK
/* -=[ Podwojny Skok V.i.P ]=- */
public CmdStart(id, uc_handle)
{
if ( !is_user_alive(id) ) return HAM_IGNORED;

new flags = pev(id, pev_flags);

if((get_uc(uc_handle, UC_Buttons) & IN_JUMP) && !(flags & FL_ONGROUND) && !(pev(id, pev_oldbuttons) & IN_JUMP) && moze_skoczyc[id] && (get_user_flags(id) & VIP))
{
moze_skoczyc[id] = false;
new Float:velocity[3];
pev(id, pev_velocity,velocity);
velocity[2] = random_float(265.0,285.0);
set_pev(id, pev_velocity,velocity);
}
else if(flags & FL_ONGROUND)
{
moze_skoczyc[id] = true;
}

return HAM_IGNORED;
}
/* -=[ Podwojny Skok V.i.P ]=- */
#endif

#if defined ADVENCED_BULLET_DAMAGE
/* -=[ BulletDamage V.i.P ]=- */
public on_new_round(id)
{
g_enabled = get_pcvar_num(g_type)
if(get_pcvar_num(g_recieved) && get_user_flags(id) & VIP)
{
g_showrecieved = true
}
}

public on_damage(id)
{
if(g_enabled)
{
static attacker; attacker = get_user_attacker(id)
static damage; damage = read_data(2)
if(g_showrecieved)
{
set_hudmessage(255, 0, 0, 0.45, 0.50, 2, 0.1, 4.0, 0.1, 0.1, -1)
ShowSyncHudMsg(id, g_hudmsg2, "%i^n", damage)
}
if(is_user_connected(attacker) && get_user_flags(attacker) & VIP)
{
switch(g_enabled)
{
case 1:
{
set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1)
ShowSyncHudMsg(attacker, g_hudmsg1, "%i^n", damage)
}
case 2:
{
if(fm_is_ent_visible(attacker,id))// && get_user_flags(attacker) & VIP)
{
set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1)
ShowSyncHudMsg(attacker, g_hudmsg1, "%i^n", damage)
}
}
}
}
}
return PLUGIN_CONTINUE
}
/* -=[ BulletDamage V.i.P ]=- */
#endif

#if defined DODATKOWE_HP
/* -=[ Dodatkowe HP za Zabicie & HS V.i.P ]=- */
public hook_death()
{
nKiller = read_data(1)

if ( (read_data(3) == 1) && (read_data(5) == 0) )
{
nHp_add = get_pcvar_num (health_hs_add)
}
else
{
nHp_add = get_pcvar_num (health_add)
}
nHp_max = get_pcvar_num (health_max)
if(!(get_user_flags(nKiller) & ADMIN_LEVEL_H))
return;

nKiller_hp = get_user_health(nKiller)
nKiller_hp += nHp_add
if (nKiller_hp > nHp_max) nKiller_hp = nHp_max
fm_set_user_health(nKiller, nKiller_hp)
set_hudmessage(0, 255, 0, -1.0, 0.15, 0, 1.0, 1.0, 0.1, 0.1, -1)
show_hudmessage(nKiller, "Dostales +%d hp", nHp_add)
message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, nKiller)
write_short(1<<10)
write_short(1<<10)
write_short(0x0000)
write_byte(0)
write_byte(0)
write_byte(200)
write_byte(75)
message_end()
}
/* -=[ Dodatkowe HP za Zabicie & HS V.i.P ]=- */
#endif

#if defined DODATKI_VIP
/* -=[ Dodatki V.i.P ]=- */
public fwSpawn(id)
{
if ( !is_user_alive(id) ) return HAM_IGNORED;

#if defined MODELE_VIP
new CsTeams:userTeam = cs_get_user_team(id)
#endif

if(get_user_flags(id) & VIP)
{
fm_give_item(id, "item_thighpack");
client_print(id, print_chat, "Modyfikacja VIP'a dla CSBydgoszcz.Pl przez Cajmerta!");
fm_set_user_health(id, 110)
#endif

#if defined MODELE_VIP
if (userTeam == CS_TEAM_T)
{
cs_set_user_model(id, "vip_tt")
}
else if(userTeam == CS_TEAM_CT)
{
cs_set_user_model(id, "vip_ct")
}
else
{
cs_reset_user_model(id)
}
#endif
}
return HAM_IGNORED;
}
/* -=[ Dodatki V.i.P ]=- */
#endif

#if defined CICHE CHODZENIE
/* -=[ Ciche Chodzenie V.i.P #2 ]=- */
public forward_player_prethink(index)
{
if (g_silent[index])
{
set_pev(index, pev_flTimeStepSound, 999)
}
}

public client_disconnect(index)
{
g_silent[index] = false
}

stock fm_set_user_footsteps(index, set = 1)
{
if (set)
{
set_pev(index, pev_flTimeStepSound, 999)
g_silent[index] = true
}
else
{
set_pev(index, pev_flTimeStepSound, STANDARDTIMESTEPSOUND)
g_silent[index] = false
}
return 1
}

stock fm_get_user_footsteps(index)
{
return g_silent[index]
}
/* -=[ Ciche Chodzenie V.i.P #2 ]=- */
#endif

#if defined INFO_VIP
/* -=[ MOTD z informacja o V.i.P ]=- */
public ViPInfo(id)
{
show_motd(id, "vip.txt")
}
/* -=[ MOTD z informacja o V.i.P ]=- */
#endif

#if defined LISTA_VIP
/* -=[ Lista graczy ktorzy posiadaja status V.i.P ]=- */
public ViPLista(id)
{
new nazwy_vip[33][32]
new message[256]
new count, x, len

for(new i = 1 ; i <= gMaxPlayers ; i++)
{
if(is_user_connected(i))
{
if(get_user_flags(i) & VIP)
{
get_user_name(i, nazwy_vip[count++], 31)
}
}
}

len = format(message, 255, "%s ViP'y ONLINE: ",COLOR)
if(count > 0)
{
for(x = 0 ; x < count ; x++)
{
len += format(message[len], 255-len, "%s%s%s ", COLOR, nazwy_vip[x], x < (count-1) ? "^x01, ":"")
if(len > 96 )
{
print_message(id, message)
len = format(message, 255, "%s ",COLOR)
}
}
print_message(id, message)
}
else
{
len += format(message[len], 255-len, "Brak ViP'ow Online")
print_message(id, message)
}
return PLUGIN_HANDLED;
}

print_message(id, msg[])
{
message_begin(MSG_ONE, gMSGSayText, {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}
/* -=[ Lista graczy ktorzy posiadaja status V.i.P ]=- */
#endif

Użytkownik cajmert edytował ten post 29.04.2012 13:29

  • +
  • -
  • 0




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych