.Metrix 31 Posted January 11, 2017 Share Posted January 11, 2017 Server :zmp.rangfort.ro Nick :.Metrix.Grad server : Manager La ce doriţi ajutor? : am un plugin care arata viata la moduri si cati zombie/humman sunt in viata dar imi da eroare la compilare Poză cu problema (Nu este obligatoriu) :nu este nevoie #include amxmodx #include hamsandwich #include fakemeta #include zombieplague #define ID 666666666 new gs public plugin_init() { set_task(25.0, "rem", _, _, _, "b") RegisterHam(Ham_Killed, "player", "playerk",1) gs=CreateHudSyncObj() register_forward(FM_ClientDisconnect,"disco") set_task(60.0 * 4.0, "AddAmmo", .flags="b") } public AddAmmo() { for (new i = 1; i <= get_maxplayers(); i++) { if (!is_user_connected(i)) continue zp_set_user_ammo_packs(i, zp_get_user_ammo_packs(i) + 4) client_print_color(i, i, "^x04[ZP]^x01 Because you are^x03 active^x01 on the server, you got^x03 +4 ammo packs^x01.") } } public zp_user_infected_post(id, infector, nemesis) { if (!task_exists(ID)) set_task(0.72, "inforem", ID) } public zp_user_humanized_post(id, survivor) { if (!task_exists(ID)) set_task(0.72, "inforem", ID) } public playerk(victim,killer,gibs) { if (!task_exists(ID)) set_task(0.72, "inforem", ID) } public spawn(id) { if (!is_user_alive(id)) return if (!task_exists(ID)) set_task(0.72, "inforem", ID) } public disco(id) { if (!task_exists(ID) && zp_has_round_started()) set_task(0.72, "inforem", ID) } getlasthuman() { for (new i = 1;i<=get_maxplayers();i++) { if (is_user_alive(i)&&!zp_get_user_zombie(i)) return i } return -1 } getlastzombie() { for (new i = 1;i<=get_maxplayers();i++) { if (is_user_alive(i)&&zp_get_user_zombie(i)) return i } return -1 } public inforem() { if (!zp_has_round_started()) return new z = zp_get_zombie_count() new h = zp_get_human_count() if (z == 1 && h == 1) { new lasthuman = getlasthuman() new lastzombie = getlastzombie() if (lasthuman != -1 && lastzombie != -1) { new zname[32], hname[32] new zhp[32], hhp[32] get_user_name(lasthuman, hname, 31) get_user_name(lastzombie, zname, 31) AddCommas(get_user_health(lasthuman), hhp, 31) AddCommas(get_user_health(lastzombie), zhp, 31) set_hudmessage(150, 150, 150, 0.69, 0.68, 0, 6.0, 2.0, 0.1, 0.2, -1) ShowSyncHudMsg(0, gs, "%s (%s HP) VS %s (%s HP)", hname, hhp, zname, zhp) } return } if (z == h || !z || !h) return if (z < h) { if (z <= 8) { set_hudmessage(150, 150, 150, 0.78, 0.68, 2, 6.0, 1.0, 0.1, 0.2, -1) ShowSyncHudMsg(0, gs, "%d zombie%s remaining...", z, z==1?"":"s") } } else if (z > h) { if (h <= 8) { set_hudmessage(150, 150, 150, 0.78, 0.68, 2, 6.0, 1.0, 0.1, 0.2, -1) ShowSyncHudMsg(0, gs, "%d human%s remaining...", h, h==1?"":"s") } } } public rem() { static hp[32],id new n = zp_get_nemesis_count() new a = zp_get_assassin_count() new s = zp_get_sniper_count() new v = zp_get_survivor_count() if (n == 1 && !a && !s && !v) { id = getnemesis() if (id!=-1) { AddCommas(get_user_health(id),hp,31) client_print_color(0,id,"^x04[ZP]^x01 A^x03 Rapture^x01 reminder^x04 @^x03 Nemesis^x01 still has^x04 %s health points^x01.", hp) } } if (!n && a==1 && !s && !v) { id = getassassin() if (id!=-1) { AddCommas(get_user_health(id),hp,31) client_print_color(0,id,"^x04[ZP]^x01 A^x03 Rapture^x01 reminder^x04 @^x03 Assassin^x01 still has^x04 %s health points^x01.", hp) } } if (!n && !a && 1==s && !v) { id = getsniper() if (id!=-1) { AddCommas(get_user_health(id),hp,31) client_print_color(0,id,"^x04[ZP]^x01 A^x03 Rapture^x01 reminder^x04 @^x03 Sniper^x01 still has^x04 %s health points^x01.", hp) } } if (!n && !a && !s && v==1) { id = getsurvivor() if (id!=-1) { AddCommas(get_user_health(id),hp,31) client_print_color(0,id,"^x04[ZP]^x01 A^x03 Rapture^x01 reminder^x04 @^x03 Survivor^x01 still has^x04 %s health points^x01.", hp) } } } getnemesis() { for (new i = 1;i<=get_maxplayers();i++) { if(is_user_alive(i)&&zp_get_user_nemesis(i)) return i } return -1 } getassassin() { for (new i = 1;i<=get_maxplayers();i++) { if(is_user_alive(i)&&zp_get_user_assassin(i)) return i } return -1 } getsniper() { for (new i = 1;i<=get_maxplayers();i++) { if(is_user_alive(i)&&zp_get_user_sniper(i)) return i } return -1 } getsurvivor() { for (new i = 1;i<=get_maxplayers();i++) { if(is_user_alive(i)&&zp_get_user_survivor(i)) return i } return -1 } public AddCommas( iNum , szOutput[] , iLen ) { new szTmp[ 15 ] , iOutputPos , iNumPos , iNumLen; if ( iNum < 0 ) { szOutput[ iOutputPos++ ] = '-'; iNum = abs( iNum ); } iNumLen = num_to_str( iNum , szTmp , charsmax( szTmp ) ); if ( iNumLen <= 3 ) { iOutputPos += copy( szOutput[ iOutputPos ] , iLen , szTmp ); } else { while ( ( iNumPos < iNumLen ) && ( iOutputPos < iLen ) ) { szOutput[ iOutputPos++ ] = szTmp[ iNumPos++ ]; if( ( iNumLen - iNumPos ) && !( ( iNumLen - iNumPos ) % 3 ) ) szOutput[ iOutputPos++ ] = ','; } szOutput[ iOutputPos ] = EOS; } return iOutputPos; } eroare zp_rapture_reminder.sma(27) : error 017: undefined symbol "client_print_color" zp_rapture_reminder.sma(137) : error 017: undefined symbol "zp_get_assassin_count" zp_rapture_reminder.sma(138) : error 017: undefined symbol "zp_get_sniper_count" zp_rapture_reminder.sma(147) : error 017: undefined symbol "client_print_color" zp_rapture_reminder.sma(157) : error 017: undefined symbol "client_print_color" zp_rapture_reminder.sma(167) : error 017: undefined symbol "client_print_color" zp_rapture_reminder.sma(177) : error 017: undefined symbol "client_print_color" zp_rapture_reminder.sma(196) : error 017: undefined symbol "zp_get_user_assassin" zp_rapture_reminder.sma(206) : error 017: undefined symbol "zp_get_user_sniper" 9 Errors. Compilarea a esuat! Link to comment Share on other sites More sharing options...
marvel_team 278 Posted January 12, 2017 Share Posted January 12, 2017 Eroarea asta de la : Trebuiesc definite cuvintele alea .. client_print_color si asa mai departe... Link to comment Share on other sites More sharing options...
.Metrix 31 Posted January 12, 2017 Author Share Posted January 12, 2017 Eroarea asta de la : Trebuiesc definite cuvintele alea .. client_print_color si asa mai departe... multumesc dar nu stiu ce inseamna asta...daca stiam probabil nu mai ceream ajutor EDIT: am adaugat #define client_print_color si s-a compilat cu avertisment...cand ma uit in amx_plugins vad ca ruleaza dar nu are efect, adica nu arata mesajele pe server si restu... hp_test.sma(27 -- 28) : warning 215: expression has no effect hp_test.sma(147 -- 148) : warning 215: expression has no effect hp_test.sma(157 -- 158) : warning 215: expression has no effect hp_test.sma(167 -- 168) : warning 215: expression has no effect hp_test.sma(177 -- 178) : warning 215: expression has no effect Header size: 1236 bytes Code size: 7352 bytes Data size: 2248 bytes Stack/heap size: 16384 bytes; estimated max. usage=174 cells (696 bytes) Total requirements: 27220 bytes 5 Warnings. Done. Link to comment Share on other sites More sharing options...
Recommended Posts