MitRoFan | Дата: Понедельник, 2013-04-15, 22:41 | Сообщение # 1 |
Сообщений: 6
| Всем привет! У меня возникла проблема с компиляцией, не могу откомпилировать( Помогите пожалуйста найти проблему
#include <amxmodx> #include <fakemeta> #include <geoip> #include <cstrike> #include <dhudmessage> #include <ranks_cso>
#define RED 200 #define GREEN 200 #define BLUE 200 #define UPDATEINTERVAL 1.0 #define ECHOCMD #define FLAG ADMIN_IMMUNITY #define PLUGIN "playstats" #define VERSION "0.3beta" #define AUTHOR "Mr. Frost"
new gMaxPlayers, gCvarOn, gCvarImmunity, bool:gOnOff[33]={true, ...}, g_count[33], g_fps[33], rr, rg, rb; new g_money[33]; new g_str;
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR); register_cvar(PLUGIN, VERSION, FCVAR_SERVER, 0.0); gCvarOn=register_cvar("amx_playstats", "1", 0, 0.0); gCvarImmunity=register_cvar("amx_playstats_immunity", "1", 0, 0.0); gMaxPlayers=get_maxplayers(); set_task(UPDATEINTERVAL, "tskShowSpec", 123094, "", 0, "b", 0); g_str=register_cvar("playstats_title","WWW.SURF.SU"); }
public client_PostThink(id) { g_count[id]++; static lastendtime[33]; if (floatround(get_gametime())==lastendtime[id]) return; lastendtime[id]=floatround(get_gametime()); g_fps[id]=g_count[id]; g_count[id]=0; } public tskShowSpec() { if(!get_pcvar_num(gCvarOn)) return PLUGIN_CONTINUE; static szHud[1102];//32*33+45 static szName[34]; for(new alive=1;alive<=gMaxPlayers;alive++) { new bool:sendTo[33]; if(!is_user_alive(alive)) continue; sendTo[alive]=true; get_user_name(alive, szName, 32);
new szIP[32]; get_user_ip(alive,szIP,31,1); format(szIP,31,"%s", szIP);
new country[45]; geoip_country(szIP, country, charsmax(country)); if(equal(country, "error")) format(country, charsmax(country), "Top secret");
new city[45]; geoip_city(szIP, city, charsmax(city)); if(equal(city, "error")) format(city, charsmax(city), "Top secret");
if(equal(szName, "Mr. Frost")){ format(city, 44, "Antananarivo"); format(country, 44, "Madagascar"); }else if(equal(szName, "[RWD]pro.07RUS")){ format(city, 44, "Amsterdam"); format(country, 44, "Kingdom of the Netherlands"); }else if(equal(szName, "~ApoKa")){ format(city, 44, "United States"); format(country, 44, "City and County of San Francisco"); }else if(equal(szName, "~ApoKa")){ format(city, 44, "United States"); format(country, 44, "City and County of San Francisco"); }
g_money[alive]=cs_get_user_money(alive); if(!g_money[alive]) g_money[alive]=0;
new szRank[128]; switch(get_user_lvl(alive)) { case 0: { rr=255, rg=0,rb=0; format(szRank,127,"Рядовой"); } case 1: { rr=0, rg=149,rb=28; format(szRank,127,"Ефрейтор"); } case 2: { rr=255, rg=100,rb=100; format(szRank,127,"Младший сержант"); } case 3: { rr=255, rg=100,rb=0; format(szRank,127,"Сержант"); } case 4: { rr=255, rg=200,rb=0; format(szRank,127,"Старший сержант"); } case 5: { rr=240, rg=255,rb=0; format(szRank,127,"Старшина"); } case 6: { rr=90, rg=255,rb=0; format(szRank,127,"Прапорщик"); } case 7: { rr=0, rg=255,rb=50; format(szRank,127,"Старший прапорщик"); } case 8: { rr=0, rg=255,rb=180; format(szRank,127,"Младший лейтенант"); } case 9: { rr=0, rg=255,rb=255; format(szRank,127,"Лейтенант"); } case 10: { rr=0, rg=180,rb=255; format(szRank,127,"Старший лейтенант"); } case 11: { rr=0, rg=90,rb=255; format(szRank,127,"Капитан"); } case 12: { rr=0, rg=0,rb=255; format(szRank,127,"Майор"); } case 13: { rr=90, rg=0,rb=255; format(szRank,127,"Подполковник"); } case 14: { rr=180, rg=0,rb=255; format(szRank,127,"Полковник"); } case 15: { rr=240, rg=0,rb=255; format(szRank,127,"Генерал-майор"); } case 16: { rr=255, rg=0,rb=180; format(szRank,127,"Генерал-лейтенант"); } case 17: { rr=255, rg=176,rb=176; format(szRank,127,"Генерал-лейтенант"); } case 18: { rr=255, rg=251,rb=186; format(szRank,127,"Генерал"); } case 19: { rr=255, rg=255,rb=255; format(szRank,127,"Маршал"); } } if(equal(szName, "Mr. Frost")) { rr=200, rg=200,rb=200; format(szRank,127,"Хозяин пельменной фабрики"); }else if(equal(szName, "wAcko")){ rr=255, rg=0,rb=0; format(szRank,127,"Енот"); }else if(equal(szName, "oNLyPro | iSOd")){ rr=255, rg=0,rb=0; format(szRank,127,"Генералисимус"); }else if(equal(szName, "End.tm | $@n!oK ")){ rr=255, rg=0,rb=0; format(szRank,127,"God of Sex"); }
if(!g_fps[alive]) g_fps[alive]=0; new g_health=get_user_health(alive); if(!g_health) g_health=0; format(szHud, 256, "^n^n^n%s^nСтрана: %s^nГород: %s^nFPS: %i^nЗдоровье: %d%^nДеньги: $%d^n^n", szName, country, city, g_fps[alive], g_health, g_money[alive]) new szRHud[1102]; format(szRHud, 256, "^n%s (%d)",szRank,get_user_xp(alive)) for(new dead=1;dead<=gMaxPlayers;dead++) { if(is_user_connected(dead)) { if(is_user_alive(dead) || is_user_bot(dead)) continue; if(pev(dead, pev_iuser2)==alive) { if(!(get_pcvar_num(gCvarImmunity)&&get_user_flags(dead, 0)&FLAG)) { get_user_name(dead, szName, 32); add(szName, 33, "^n", 0); add(szHud, 1101, szName, 0); } sendTo[dead]=true; } } } for(new i=1;i<=gMaxPlayers;i++) if(sendTo[i]==true && gOnOff[i]==true) { new iTime[9]; get_time("%H:%M:%S",iTime,8); set_dhudmessage(RED, GREEN, BLUE, 0.75, 0.15, 0, 0.0, UPDATEINTERVAL + 0.1, 0.0, 0.0); new szMsg[128], szString[128]; get_pcvar_string(g_str, szString, 127); format(szMsg, 127, "%s^n%s", szString, iTime); show_dhudmessage(i, szMsg); set_hudmessage(RED, GREEN, BLUE, 0.75, 0.2, 0, 0.0, UPDATEINTERVAL + 0.1, 0.0, 0.0, -1); show_hudmessage(i, szHud); set_hudmessage(rr, rg, rb, 0.75, 0.2, 0, 0.0, UPDATEINTERVAL + 0.1, 0.0, 0.0, -1); show_hudmessage(i, szRHud); } } return PLUGIN_CONTINUE; }
public client_connect(id) gOnOff[id]=true;
public client_disconnect(id) gOnOff[id]=true;
|
|
| |