Skocz do zawartości

  • Zaloguj korzystając z Facebooka Zaloguj korzystając z Twittera Zaloguj przez Steam Zaloguj poprzez Google      Logowanie »   
  • Rejestracja

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
BattleField2

kompilacja pluginu + bład

BattleField2

  • Zamknięty Temat jest zamknięty
7 odpowiedzi w tym temacie

#1 Narkoman1

    Początkujący

  • Użytkownik

Reputacja: 0
zer0.

  • Postów:19
  • Lokalizacja:Polska
Offline

Napisano 16.03.2011 15:08

Witam skompilowałem nowe bf2 bez możliwości resetu , te z 32 odznakami



Robiłem Komplitacje bez moż resetu i mam 5 błędów


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

bf2/check.inl(725) : error 021: symbol already defined: "ShowColorMessage"
bf2/check.inl(726) : error 017: undefined symbol "gmsgSayText"
bf2/check.inl(726) : error 029: invalid expression, assumed zero
bf2/check.inl(726) : error 029: invalid expression, assumed zero
bf2/check.inl(726) : fatal error 107: too many error messages on one line

Compilation aborted.
5 Errors.


Proszę o pomoc:)
  • +
  • -
  • 0
Dołączona grafika

#2 Misiaczek ;c

    /dev/null

  • Moderator

Reputacja: 1662
Godlike

  • Postów:2495
  • GG:
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Halemba
Offline

Napisano 18.03.2011 11:21

pokaż plik check.inl :P
  • +
  • -
  • 0

#3 Narkoman1

    Początkujący

  • Autor tematu
  • Użytkownik

Reputacja: 0
zer0.

  • Postów:19
  • Lokalizacja:Polska
Offline

Napisano 18.03.2011 14:52

Proszę : D



/Bf2 Rank Mod check File
//Contains all the badge/rank etc checking functions.

#if defined bf2_check_included
#endinput
#endif
#define bf2_check_included

public check_level(id)
{
if ( gStatsLoaded[id] < 2 ) return;

new stats[8], bodyhits[8], prevrank;
new ranked = get_user_stats(id, stats, bodyhits);

prevrank = g_PlayerRank[id];
new newrank, counter;

for (counter = 0; counter < MAX_RANKS; counter++)
{
if ( totalkills[id] >= floatround(gRankXP[counter]*get_pcvar_float(gPcvarXpMultiplier)) )
{
newrank = counter;
}
else break;
}

g_PlayerRank[id] = newrank;

numofbadges[id] = 0;
for (counter = 0; counter < MAX_BADGES; counter++)
{
numofbadges[id] += g_PlayerBadges[id][counter];
}

//These ranks depend on badges, what if badges are turned off? what should we do?
switch(newrank)
{
case 7:
if ( numofbadges[id] >= MAX_BADGES )
g_PlayerRank[id] = 17;
case 8:
if ( numofbadges[id] >= (MAX_BADGES*2) )
g_PlayerRank[id] = 18;
case 15:
if ( numofbadges[id] == (MAX_BADGES*3) )
g_PlayerRank[id] = 19;
case 16:
if ( numofbadges[id] != (MAX_BADGES*4) )
g_PlayerRank[id] = 15; //If they don't have all badges demote back to brigadier Gen
else if ( ranked == 2 )
g_PlayerRank[id] = 20; //Promote to General if Number 2 ranked.
else if ( ranked == 1 )
g_PlayerRank[id] = 21; //Promote to Marszalek Polski if Number 1 ranked.
}

if ( newplayer[id] )
{
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Twoja ranga ^x04%s ^x01zostala zaladowana",gRankName[g_PlayerRank[id]]);
#else
client_print(id, print_chat, "[BF2] Twoja ranga: %s zostala zaladowana", gRankName[g_PlayerRank[id]]);
#endif
client_cmd(id, "spk %s", gSoundRank);
ranking_officer_check(id);
newplayer[id] = false;
}
else if ( is_ranked_higher(g_PlayerRank[id], prevrank) )
{
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Gratulacje! awanasowales do rangi ^x04%s", gRankName[g_PlayerRank[id]]);
#else
client_print(id, print_chat, "[BF2] Gratulacje! awanasowales do rangi %s", gRankName[g_PlayerRank[id]]);
#endif
client_cmd(id, "spk %s", gSoundRank);
ranking_officer_check(id);
}
else if ( g_PlayerRank[id] != prevrank && !is_ranked_higher(g_PlayerRank[id], prevrank) )
{
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zostales zdegradowany do rangi ^x04%s", gRankName[g_PlayerRank[id]]);
#else
client_print(id, print_chat, "[BF2] Zostales zdegradowany do rangi %s", gRankName[g_PlayerRank[id]]);
#endif
}

if ( is_ranked_higher(g_PlayerRank[id], highestrankserver) )
{
highestrankserver = g_PlayerRank[id];
new line[100], name[32];
get_user_name(id, name, charsmax(name));
line[0] = 0x04;
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Gracz ^x04%s ^x01ma najwyzsza range na serwerze. Jego ranga to ^x04%s", name, gRankName[highestrankserver]);
#else
formatex(line[1], 98, "[BF2] Gracz %s ma najwyzsza range na serwerze. Jego ranga to %s", name, gRankName[highestrankserver]);
formatex(highestrankservername, charsmax(highestrankservername), name);
ShowColorMessage(id, MSG_BROADCAST, line);
#endif
}
}

public badge_check_loop()
{
//This gets run at round end, only check alive players since
//check_badges is run on death.
new players[32], num;
get_players(players, num, "ah");

for ( new counter = 0; counter < num; counter++)
{
check_badges(players[counter]);
}
}

public check_badges(id)
{
if ( !get_pcvar_num(gPcvarBF2Active) || !get_pcvar_num(gPcvarBadgesActive) ) return;

new bool:badgegained;
new weaponkillsround;
new weaponhsround;
new wroundstats[8], wroundbodyhits[8], wstats[8], wbodyhits[8];
new currentbadge;
new kills;

new roundkills[8];

wroundstats[0] = 0;
wroundstats[2] = 0;
get_user_rstats(id, roundkills, wroundbodyhits);

//only check for new badges if the user got a kill. Will save lots of wasted processing time.
//Exception is explosives badge. May have been earned without kill. Ah well they can wait till they next get a kill
if ( roundkills[0] )
{
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Sprawdzanie zdobytych odznak...");
#else
client_print(id, print_chat, "[BF2] Sprawdzanie zdobytych odznak...");
#endif

//knife badge section
currentbadge=g_PlayerBadges[id][BADGE_KNIFE];
wroundstats[0]=0;
wroundstats[2]=0;
get_user_wrstats(id,CSW_KNIFE,wroundstats,wroundbodyhits);

kills=knifekills[id];

switch (currentbadge)
{
case LEVEL_NONE:
{

if (wroundstats[0]>1)
{
g_PlayerBadges[id][BADGE_KNIFE]=LEVEL_BASIC; //Basic Knife Badge
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_KNIFE][LEVEL_BASIC]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_KNIFE][LEVEL_BASIC]);
#endif
badgegained=true;
}
}
case LEVEL_BASIC:
{
if (kills>49)
{
g_PlayerBadges[id][BADGE_KNIFE]=LEVEL_VETERAN; //Veteran Knife Badge
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_KNIFE][LEVEL_VETERAN]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_KNIFE][LEVEL_VETERAN]);
#endif
badgegained=true;
}
}
case LEVEL_VETERAN:
{
if ((wroundstats[0]>2) && (wroundstats[2]>0) && (kills>99))
{
g_PlayerBadges[id][BADGE_KNIFE]=LEVEL_EXPERT; //Expert Knife Badge
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_KNIFE][LEVEL_EXPERT]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_KNIFE][LEVEL_EXPERT]);
#endif
badgegained=true;
}
}
case LEVEL_EXPERT:
{
if ((wroundstats[0]>4) && (wroundstats[2]>1) && (kills>199))
{
g_PlayerBadges[id][BADGE_KNIFE]=LEVEL_PROFESIONAL; //Profesjonalista Knife Badge
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_KNIFE][LEVEL_PROFESIONAL]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_KNIFE][LEVEL_PROFESIONAL]);
#endif
badgegained=true;
}
}
}
//End knife section

//Pistol badge section
currentbadge=g_PlayerBadges[id][BADGE_PISTOL];

if (currentbadge!=LEVEL_BASIC) //don't bother getting round stats if badge = 1 because no round based checks needed for level 2
{

weaponkillsround=0;
weaponhsround=0;

wroundstats[0]=0;
wroundstats[2]=0;
get_user_wrstats(id,CSW_DEAGLE,wroundstats,wroundbodyhits);
weaponkillsround=wroundstats[0];
weaponhsround=wroundstats[2];

wroundstats[0]=0;
wroundstats[2]=0;
get_user_wrstats(id,CSW_ELITE,wroundstats,wroundbodyhits);
weaponkillsround+=wroundstats[0];
weaponhsround+=wroundstats[2];

wroundstats[0]=0;
wroundstats[2]=0;
get_user_wrstats(id,CSW_P228,wroundstats,wroundbodyhits);
weaponkillsround+=wroundstats[0];
weaponhsround+=wroundstats[2];

wroundstats[0]=0;
wroundstats[2]=0;
get_user_wrstats(id,CSW_FIVESEVEN,wroundstats,wroundbodyhits);
weaponkillsround+=wroundstats[0];
weaponhsround+=wroundstats[2];

wroundstats[0]=0;
wroundstats[2]=0;
get_user_wrstats(id,CSW_USP,wroundstats,wroundbodyhits);
weaponkillsround+=wroundstats[0];
weaponhsround+=wroundstats[2];

wroundstats[0]=0;
wroundstats[2]=0;
get_user_wrstats(id,CSW_GLOCK18,wroundstats,wroundbodyhits);
weaponkillsround+=wroundstats[0];
weaponhsround+=wroundstats[2];
}

kills=pistolkills[id];

switch (currentbadge)
{
case LEVEL_NONE:
{

if (weaponkillsround>2)
{
g_PlayerBadges[id][BADGE_PISTOL]=LEVEL_BASIC; //Basic Pistol Badge
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_PISTOL][LEVEL_BASIC]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_PISTOL][LEVEL_BASIC]);
#endif
badgegained=true;
}
}
case LEVEL_BASIC:
{
if (kills>99)
{
g_PlayerBadges[id][BADGE_PISTOL]=LEVEL_VETERAN; //Veteran Pistol Badge
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_PISTOL][LEVEL_VETERAN]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_PISTOL][LEVEL_VETERAN]);
#endif
badgegained=true;
}
}
case LEVEL_VETERAN:
{
if ((weaponkillsround>3) && (weaponhsround>1) && (kills>199))
{
g_PlayerBadges[id][BADGE_PISTOL]=LEVEL_EXPERT; //Expert Pistol Badge
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_PISTOL][LEVEL_EXPERT]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_PISTOL][LEVEL_EXPERT]);
#endif
badgegained=true;
}
}
case LEVEL_EXPERT:
{
if ((weaponkillsround>5) && (weaponhsround>2) && (kills>399))
{
g_PlayerBadges[id][BADGE_PISTOL]=LEVEL_PROFESIONAL; //Profesjonalista Pistol Badge
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_PISTOL][LEVEL_PROFESIONAL]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_PISTOL][LEVEL_PROFESIONAL]);
#endif
badgegained=true;
}
}
}
//End Pistol section


//Assault badge section
currentbadge=g_PlayerBadges[id][BADGE_ASSAULT];
wstats[0]=0;
wstats[4]=0;
wstats[5]=0;
wroundstats[0]=0;

get_user_stats(id,wstats,wbodyhits);

new acc = floatround((float(wstats[5])/float(wstats[4]))*100);
accuracy[id]=acc;

switch (currentbadge)
{
case LEVEL_NONE:
{
if (roundkills[0]>3)
{
g_PlayerBadges[id][BADGE_ASSAULT]=LEVEL_BASIC; //Basic Assault Badge
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_ASSAULT][LEVEL_BASIC]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_ASSAULT][LEVEL_BASIC]);
#endif
badgegained=true;
}
}
case LEVEL_BASIC:
{
if (acc>24)
{
g_PlayerBadges[id][BADGE_ASSAULT]=LEVEL_VETERAN; //Veteran Assault Badge
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_ASSAULT][LEVEL_VETERAN]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_ASSAULT][LEVEL_VETERAN]);
#endif
badgegained=true;
}
}
case LEVEL_VETERAN:
{
if ((roundkills[0]>4) && (roundkills[2]>2) && (totalkills[id]>1999))
{
g_PlayerBadges[id][BADGE_ASSAULT]=LEVEL_EXPERT; //Expert Assault Badge
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_ASSAULT][LEVEL_VETERAN]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_ASSAULT][LEVEL_VETERAN]);
#endif
badgegained=true;
}
}
case LEVEL_EXPERT:
{
if ((roundkills[0]>6) && (roundkills[2]>4) && (totalkills[id]>3999))
{
g_PlayerBadges[id][BADGE_ASSAULT]=LEVEL_PROFESIONAL; //Profesjonalista Assault Badge
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_ASSAULT][LEVEL_PROFESIONAL]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_ASSAULT][LEVEL_PROFESIONAL]);
#endif
badgegained=true;
}
}
}
//End Assault section


//Sniper badge section
currentbadge=g_PlayerBadges[id][BADGE_SNIPER];


if (currentbadge!=LEVEL_BASIC) //don't bother getting round stats if badge = 1 because no round based checks needed for level 2
{
weaponkillsround=0;
weaponhsround=0;

wroundstats[0]=0;
wroundstats[2]=0;
get_user_wrstats(id,CSW_AWP,wroundstats,wroundbodyhits);
weaponkillsround=wroundstats[0];
weaponhsround=wroundstats[2];

wroundstats[0]=0;
wroundstats[2]=0;
get_user_wrstats(id,CSW_SCOUT,wroundstats,wroundbodyhits);
weaponkillsround+=wroundstats[0];
weaponhsround+=wroundstats[2];

wroundstats[0]=0;
wroundstats[2]=0;
get_user_wrstats(id,CSW_G3SG1,wroundstats,wroundbodyhits);
weaponkillsround+=wroundstats[0];
weaponhsround+=wroundstats[2];

wroundstats[0]=0;
wroundstats[2]=0;
get_user_wrstats(id,CSW_SG550,wroundstats,wroundbodyhits);
weaponkillsround+=wroundstats[0];
weaponhsround+=wroundstats[2];
}

kills=sniperkills[id];

switch (currentbadge)
{
case LEVEL_NONE:
{
if (weaponkillsround>2)
{
g_PlayerBadges[id][BADGE_SNIPER]=LEVEL_BASIC; //Basic Sniper Badge
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_SNIPER][LEVEL_BASIC]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_SNIPER][LEVEL_BASIC]);
#endif
badgegained=true;
}
}
case LEVEL_BASIC:
{
if (kills>99)
{
g_PlayerBadges[id][BADGE_SNIPER]=LEVEL_VETERAN; //Veteran Sniper Badge
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_SNIPER][LEVEL_VETERAN]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_SNIPER][LEVEL_VETERAN]);
#endif
badgegained=true;
}
}
case LEVEL_VETERAN:
{
if ((weaponkillsround>3) && (weaponhsround>0) && (kills>199))
{
g_PlayerBadges[id][BADGE_SNIPER]=LEVEL_EXPERT; //Expert Sniper Badge
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_SNIPER][LEVEL_EXPERT]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_SNIPER][LEVEL_EXPERT]);
#endif
badgegained=true;
}
}
case LEVEL_EXPERT:
{
if ((weaponkillsround>5) && (weaponhsround>2) && (kills>399))
{
g_PlayerBadges[id][BADGE_SNIPER]=LEVEL_PROFESIONAL; //Profesjonalista Sniper Badge
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_SNIPER][LEVEL_PROFESIONAL]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_SNIPER][LEVEL_PROFESIONAL]);
#endif
badgegained=true;
}
}
}
//End Sniper section

//Support badge section
currentbadge=g_PlayerBadges[id][BADGE_SUPPORT];
wroundstats[0]=0;
wroundstats[2]=0;
get_user_wrstats(id,CSW_M249,wroundstats,wroundbodyhits);

kills=parakills[id];

switch (currentbadge)
{
case LEVEL_NONE:
{
if (wroundstats[0]>1)
{
g_PlayerBadges[id][BADGE_SUPPORT]=LEVEL_BASIC; //Basic Support Badge
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_SUPPORT][LEVEL_BASIC]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_SUPPORT][LEVEL_BASIC]);
#endif
badgegained=true;
}
}
case LEVEL_BASIC:
{
if (kills>99)
{
g_PlayerBadges[id][BADGE_SUPPORT]=LEVEL_VETERAN; //Veteran Support Badge
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_SUPPORT][LEVEL_VETERAN]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_SUPPORT][LEVEL_VETERAN]);
#endif
badgegained=true;
}
}
case LEVEL_VETERAN:
{
if ((wroundstats[0]>3) && (wroundstats[2]>0) && (kills>199))
{
g_PlayerBadges[id][BADGE_SUPPORT]=LEVEL_EXPERT; //Expert Support Badge
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_SUPPORT][LEVEL_EXPERT]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_SUPPORT][LEVEL_EXPERT]);
#endif
badgegained=true;
}
}
case LEVEL_EXPERT:
{
if ((wroundstats[0]>5) && (wroundstats[2]>2) && (kills>399))
{
g_PlayerBadges[id][BADGE_SUPPORT]=LEVEL_PROFESIONAL; //Profesjonalista Support Badge
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_SUPPORT][LEVEL_PROFESIONAL]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_SUPPORT][LEVEL_PROFESIONAL]);
#endif
badgegained=true;
}
}
}
//End support section

//Explosives badge section
currentbadge=g_PlayerBadges[id][BADGE_EXPLOSIVES];

switch (currentbadge)
{
case LEVEL_NONE:
{
if (grenadekills[id]>29)
{
g_PlayerBadges[id][BADGE_EXPLOSIVES]=LEVEL_BASIC; //Basic Explosives Badge
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_EXPLOSIVES][LEVEL_BASIC]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_EXPLOSIVES][LEVEL_BASIC]);
#endif
badgegained=true;
}
}
case LEVEL_BASIC:
{
if (grenadekills[id]>99)
{
g_PlayerBadges[id][BADGE_EXPLOSIVES]=LEVEL_VETERAN; //Veteran Explosives Badge
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_EXPLOSIVES][LEVEL_VETERAN]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_EXPLOSIVES][LEVEL_VETERAN]);
#endif
badgegained=true;
}
}
case LEVEL_VETERAN:
{
if (grenadekills[id]>199)
{
g_PlayerBadges[id][BADGE_EXPLOSIVES]=LEVEL_EXPERT; //Expert Explosives Badge
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_EXPLOSIVES][LEVEL_EXPERT]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_EXPLOSIVES][LEVEL_EXPERT]);
#endif
badgegained=true;
}
}
case LEVEL_EXPERT:
{
if (grenadekills[id]>499)
{
g_PlayerBadges[id][BADGE_EXPLOSIVES]=LEVEL_PROFESIONAL; //Profesjonalista Explosives Badge
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_EXPLOSIVES][LEVEL_PROFESIONAL]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_EXPLOSIVES][LEVEL_PROFESIONAL]);
#endif
badgegained=true;
}
}
}
//End Explosives section

//Shotgun badge section
currentbadge=g_PlayerBadges[id][BADGE_SHOTGUN];


if (currentbadge!=LEVEL_BASIC) //don't bother getting round stats if badge = 1 because no round based checks needed for level 2
{
weaponkillsround=0;
weaponhsround=0;

wroundstats[0]=0;
wroundstats[2]=0;
get_user_wrstats(id,CSW_XM1014,wroundstats,wroundbodyhits);
weaponkillsround=wroundstats[0];
weaponhsround=wroundstats[2];

wroundstats[0]=0;
wroundstats[2]=0;
get_user_wrstats(id,CSW_M3,wroundstats,wroundbodyhits);
weaponkillsround+=wroundstats[0];
weaponhsround+=wroundstats[2];
}

kills=shotgunkills[id];

switch (currentbadge)
{
case LEVEL_NONE:
{
if (weaponkillsround>2)
{
g_PlayerBadges[id][BADGE_SHOTGUN]=LEVEL_BASIC;
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_SHOTGUN][LEVEL_BASIC]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_SHOTGUN][LEVEL_BASIC]);
#endif
badgegained=true;
}
}
case LEVEL_BASIC:
{
if (kills>99)
{
g_PlayerBadges[id][BADGE_SHOTGUN]=LEVEL_VETERAN;
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_SHOTGUN][LEVEL_VETERAN]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_SHOTGUN][LEVEL_VETERAN]);
#endif
badgegained=true;
}
}
case LEVEL_VETERAN:
{
if ((weaponkillsround>3) && (weaponhsround>0) && (kills>199))
{
g_PlayerBadges[id][BADGE_SHOTGUN]=LEVEL_EXPERT;
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_SHOTGUN][LEVEL_EXPERT]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_SHOTGUN][LEVEL_EXPERT]);
#endif
badgegained=true;
}
}
case LEVEL_EXPERT:
{
if ((weaponkillsround>5) && (weaponhsround>2) && (kills>499))
{
g_PlayerBadges[id][BADGE_SHOTGUN]=LEVEL_PROFESIONAL;
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_SHOTGUN][LEVEL_PROFESIONAL]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_SHOTGUN][LEVEL_PROFESIONAL]);
#endif
badgegained=true;
}
}
}
//End Shotgun section


//SMG badge section
currentbadge=g_PlayerBadges[id][BADGE_SMG];


if (currentbadge!=LEVEL_BASIC) //don't bother getting round stats if badge = 1 because no round based checks needed for level 2
{
weaponkillsround=0;
weaponhsround=0;

wroundstats[0]=0;
wroundstats[2]=0;
get_user_wrstats(id,CSW_MAC10,wroundstats,wroundbodyhits);
weaponkillsround=wroundstats[0];
weaponhsround=wroundstats[2];

wroundstats[0]=0;
wroundstats[2]=0;
get_user_wrstats(id,CSW_UMP45,wroundstats,wroundbodyhits);
weaponkillsround+=wroundstats[0];
weaponhsround+=wroundstats[2];

wroundstats[0]=0;
wroundstats[2]=0;
get_user_wrstats(id,CSW_MP5NAVY,wroundstats,wroundbodyhits);
weaponkillsround+=wroundstats[0];
weaponhsround+=wroundstats[2];

wroundstats[0]=0;
wroundstats[2]=0;
get_user_wrstats(id,CSW_TMP,wroundstats,wroundbodyhits);
weaponkillsround+=wroundstats[0];
weaponhsround+=wroundstats[2];

wroundstats[0]=0;
wroundstats[2]=0;
get_user_wrstats(id,CSW_P90,wroundstats,wroundbodyhits);
weaponkillsround+=wroundstats[0];
weaponhsround+=wroundstats[2];
}

kills=smgkills[id];

switch (currentbadge)
{
case LEVEL_NONE:
{
if (weaponkillsround>2)
{
g_PlayerBadges[id][BADGE_SMG]=LEVEL_BASIC;
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_SMG][LEVEL_BASIC]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_SMG][LEVEL_BASIC]);
#endif
badgegained=true;
}
}
case LEVEL_BASIC:
{
if (kills>99)
{
g_PlayerBadges[id][BADGE_SMG]=LEVEL_VETERAN;
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_SMG][LEVEL_VETERAN]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_SMG][LEVEL_VETERAN]);
#endif
badgegained=true;
}
}
case LEVEL_VETERAN:
{
if ((weaponkillsround>3) && (weaponhsround>0) && (kills>199))
{
g_PlayerBadges[id][BADGE_SMG]=LEVEL_EXPERT;
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_SMG][LEVEL_EXPERT]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_SMG][LEVEL_EXPERT]);
#endif
badgegained=true;
}
}
case LEVEL_EXPERT:
{
if ((weaponkillsround>5) && (weaponhsround>2) && (kills>449))
{
g_PlayerBadges[id][BADGE_SMG]=LEVEL_PROFESIONAL;
#if defined KOLOROWY_SAY
ColorChat(id,TEAM_COLOR,"^x04[BF2] ^x01Zdobyles odznake: ^x04%s",gBadgeName[BADGE_SMG][LEVEL_PROFESIONAL]);
#else
client_print(id,print_chat,"[BF2] Zdobyles odznake: %s",gBadgeName[BADGE_SMG][LEVEL_PROFESIONAL]);
#endif
badgegained=true;
}
}
}
//End SMG section

if (badgegained)
{
client_cmd(id, "spk %s", gSoundBadge);
save_badges(id);
}
}
}

bool:is_ranked_higher(rank1, rank2)
{
return (gRankOrder[rank1] > gRankOrder[rank2]) ? true : false;
}

public ranking_officer_check(id)
{
new idRank = g_PlayerRank[id];

if ( !is_ranked_higher(idRank, highestrank) ) return;

highestrank = idRank;
highestrankid = id;
new name[32];
get_user_name(id, name, charsmax(name));
new line[100];
line[0] = 0x04;
#if defined KOLOROWY_SAY
ColorChat(0,TEAM_COLOR,"^x04[BF2] ^x01Gracz ^x04%s ^x01jest obecnie Liderem rankingu oficerskiego z ranga ^x04%s", name, gRankName[idRank]);
#else
formatex(line[1], 98, "[BF2] Gracz %s jest obecnie Liderem rankingu oficerskiego z ranga %s", name, gRankName[idRank]);
ShowColorMessage(id, MSG_BROADCAST, line);
#endif
}

public ranking_officer_disconnect()
{
new players[32], num, player;
get_players(players, num, "h");

highestrank = 0;
highestrankid = 0;

for (new i = 0; i < num; i++)
{
player = players[i];
if ( is_ranked_higher(g_PlayerRank[player], highestrank) )
{
highestrank = g_PlayerRank[player];
highestrankid = player;
}
}

if ( !highestrank )
return;

new name[32];
get_user_name(highestrankid, name, charsmax(name));
new line[100];
line[0] = 0x04;
#if defined KOLOROWY_SAY
for (new i = 0; i < num; i++)
ColorChat(0,TEAM_COLOR,"^x04[BF2] ^x01Gracz ^x04%s ^x01jest obecnie Liderem rankingu oficerskiego z ranga ^x04%s", name, gRankName[highestrank]);
#else
formatex(line[1], 98, "[BF2] Gracz %s jest obecnie Liderem rankingu oficerskiego z ranga %s", name, gRankName[highestrank]);
ShowColorMessage(highestrankid, MSG_BROADCAST, line);
ShowColorMessage(highestrankid, MSG_BROADCAST, line);
#endif
}

public award_check()
{
new players[32], num;
get_players(players, num, "h");

new tempfrags, id;

new swapfrags, swapid;

new starfrags[3]; //0 - Bronze / 1 - Silver / 2 - Gold
new starid[3];

for (new i = 0; i < num; i++)
{
id = players[i];
tempfrags = get_user_frags(id);
if ( tempfrags > starfrags[0] )
{
starfrags[0] = tempfrags;
starid[0] = id;
if ( tempfrags > starfrags[1] )
{
swapfrags = starfrags[1];
swapid = starid[1];
starfrags[1] = tempfrags;
starid[1] = id;
starfrags[0] = swapfrags;
starid[0] = swapid;

if ( tempfrags > starfrags[2] )
{
swapfrags = starfrags[2];
swapid = starid[2];
starfrags[2] = tempfrags;
starid[2] = id;
starfrags[1] = swapfrags;
starid[1] = swapid;
}
}
}
//save_badges(id);
}

new winner = starid[2];
new bool:newleader = false;

if ( !winner )
return;

//We now should have our three awards

bronze[starid[0]]++;
silver[starid[1]]++;
gold[winner]++;

new name[32];
get_user_name(starid[2], name, charsmax(name));

if ( gold[winner] > mostwins )
{
mostwins = gold[winner];
newleader = true;
formatex(mostwinsname, charsmax(mostwinsname), name);
}

//server_save();

new line[100];
line[0] = 0x04;
#if defined KOLOROWY_SAY
ColorChat(0,TEAM_COLOR,"^x04[BF2] ^x01Gratulacje dla Zwyciezcow!");
#else
formatex(line[1], 98, "[BF2] Gratulacje dla Zwyciezcow!");
ShowColorMessage(starid[2], MSG_BROADCAST, line);
#endif

line[0] = 0x04;

get_user_name(starid[0], name, charsmax(name));
line[0] = 0x04;
#if defined KOLOROWY_SAY
ColorChat(0,TEAM_COLOR,"^x04[BF2] ^x03%s ^x01- Brazowy Medal - ^x03%i ^x01Zabojstw", name, starfrags[0]);
#else
formatex(line[1], 98, "[BF2] %s - Brazowy Medal - %i Zabojstw", name, starfrags[0]);
ShowColorMessage(starid[2], MSG_BROADCAST, line);
#endif

get_user_name(starid[1], name, charsmax(name));
line[0] = 0x04;
#if defined KOLOROWY_SAY
ColorChat(0,TEAM_COLOR,"^x04[BF2] ^x03%s ^x01- Srebrny Medal -^x03%i ^x01Zabojstw", name, starfrags[1]);
#else
formatex(line[1], 98, "%s - Srebrny Medal - %i Zabojstw", name, starfrags[1]);
ShowColorMessage(starid[2], MSG_BROADCAST, line);
#endif

get_user_name(starid[2], name, charsmax(name));

if (newleader)
formatex(line[1], 98, "%s - Zloty Medal - %i Zabojstw - Wygrywa", name, starfrags[2]);
else
formatex(line[1], 98, "%s - Zloty Medal - %i Zabojstw", name, starfrags[2]);

ShowColorMessage(starid[2], MSG_BROADCAST, line);
}

#if defined KOLOROWY_SAY
/*
ShowColorMessage(id, type, message[])
{
message_begin(type, gmsgSayText, _, id);
write_byte(id);
write_string(message);
message_end();
}
*/
#else
ShowColorMessage(id, type, message[])
{
message_begin(type, gmsgSayText, _, id);
write_byte(id);
write_string(message);
message_end();
}
#endif
  • +
  • -
  • 0
Dołączona grafika

#4 Misiaczek ;c

    /dev/null

  • Moderator

Reputacja: 1662
Godlike

  • Postów:2495
  • GG:
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Halemba
Offline

Napisano 18.03.2011 15:32

dodaj jako załącznik...
  • +
  • -
  • 0

#5 Narkoman1

    Początkujący

  • Autor tematu
  • Użytkownik

Reputacja: 0
zer0.

  • Postów:19
  • Lokalizacja:Polska
Offline

Napisano 18.03.2011 15:43

Proszę :D

Załączone pliki

  • Załączony plik  check.inl   28,88 KB  16 Ilość pobrań

  • +
  • -
  • 0
Dołączona grafika

#6 Misiaczek ;c

    /dev/null

  • Moderator

Reputacja: 1662
Godlike

  • Postów:2495
  • GG:
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Halemba
Offline

Napisano 18.03.2011 16:07

Proszę :D


sprawdź ten mój z załącznika :P

Załączone pliki

  • Załączony plik  check.inl   28,53 KB  11 Ilość pobrań

  • +
  • -
  • 0

#7 Narkoman1

    Początkujący

  • Autor tematu
  • Użytkownik

Reputacja: 0
zer0.

  • Postów:19
  • Lokalizacja:Polska
Offline

Napisano 18.03.2011 16:22

Nadal mam błędy przy kompilacji


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

bf2/check.inl(725) : error 021: symbol already defined: "ShowColorMessage"
bf2/check.inl(726) : error 017: undefined symbol "gmsgSayText"
bf2/check.inl(726) : error 029: invalid expression, assumed zero
bf2/check.inl(726) : error 029: invalid expression, assumed zero
bf2/check.inl(726) : fatal error 107: too many error messages on one line

Compilation aborted.
5 Errors.
  • +
  • -
  • 0
Dołączona grafika

#8 Misiaczek ;c

    /dev/null

  • Moderator

Reputacja: 1662
Godlike

  • Postów:2495
  • GG:
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Halemba
Offline

Napisano 18.03.2011 20:15

Nadal mam błędy przy kompilacji


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

bf2/check.inl(725) : error 021: symbol already defined: "ShowColorMessage"
bf2/check.inl(726) : error 017: undefined symbol "gmsgSayText"
bf2/check.inl(726) : error 029: invalid expression, assumed zero
bf2/check.inl(726) : error 029: invalid expression, assumed zero
bf2/check.inl(726) : fatal error 107: too many error messages on one line

Compilation aborted.
5 Errors.



Podeślij na PW całe twoje sma zmienione i kazdy include to Ci to naprawie ;P
  • +
  • -
  • 0





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

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