RSSy MYGO.pl Opublikowano Grudzień 18, 2020 o 09:52 RSSy Udostępnij Opublikowano Grudzień 18, 2020 o 09:52 Hello! I have error when compile, symbol is never used: "zp_colored_print" Someone can fix it? Code: #include <amxmodx> #include <amxmisc> #include <fakemeta> #include <hamsandwich> #include <dhudmessage> #include <engine> #include <fun> #include <zombieplague> #include <cstrike> new Float:g_fLastUse[33] #define TASK_COOLDOWN 4578 #define TASK_END 457845 #define ID_COOLDOWN (taskid - TASK_COOLDOWN) #define ID_END (taskid - TASK_END) new g_zcLight, g_msgSayText, g_msgScreenFade, g_maxplayers new const zclass_name[] = "Zombie Light" new const zclass_info[] = "\r| \dInvisible \y(G) \r|" new const zclass_model[] = "light_model" new const zclass_clawmodel[] = "zombie_light.mdl" new const zclass_bmodel[] = "bomb_light.mdl" const zclass_health = 5000 const zclass_speed = 250 const Float:zclass_gravity = 0.67 const Float:zclass_knockback = 0.43 new const sound_invis_in[] = "royal_zclass/invisup.wav" new const sound_invis_out[] = "royal_zclass/invisdown.wav" #define COOLDOWN_INVIS 18.0 #define TIME_RUN 7.0 new bool:g_SkillActive[33] public plugin_precache() { g_zcLight = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_bmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback) precache_sound(sound_invis_in) precache_sound(sound_invis_out) } public plugin_init() { register_clcmd("drop", "use_ability_one") RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage_Post", 1) g_msgScreenFade = get_user_msgid("ScreenFade") g_msgSayText = get_user_msgid("SayText") g_maxplayers = get_maxplayers() } public use_ability_one(id) { if (is_user_alive(id) && zp_get_user_zombie_class(id) == g_zcLight && zp_get_user_zombie(id) && !zp_get_user_nemesis(id)) { if(g_fLastUse[id]+COOLDOWN_INVIS > get_gametime()) return PLUGIN_HANDLED g_SkillActive[id] = true fm_set_rendering(id, kRenderFxNone, 100, 100, 100, kRenderTransAlpha, 10) emit_sound(id, CHAN_VOICE, sound_invis_in, 1.0, ATTN_NORM, 0, PITCH_NORM) message_begin(MSG_ONE, g_msgScreenFade, _, id) write_short(4) write_short(4) write_short(0x0004) write_byte(120) write_byte(120) write_byte(120) write_byte(120) message_end() g_fLastUse[id]=get_gametime() set_task(1.0, "task_ShowCooldown", id+TASK_COOLDOWN, _, _, "b") set_task(TIME_RUN, "task_RemoveSpeed", id+TASK_END) return PLUGIN_HANDLED } return PLUGIN_CONTINUE } public fw_TakeDamage_Post(victim) { if(is_user_alive(victim)&&zp_get_user_zombie(victim)&&g_SkillActive[victim]) set_pdata_float(victim, 108, 1.0, 5) } public task_RemoveSpeed(taskid) { if (is_user_alive(ID_END) && zp_get_user_zombie_class(ID_END) == g_zcLight && zp_get_user_zombie(ID_END) && !zp_get_user_nemesis(ID_END)) { g_SkillActive[ID_END] = false if(pev(ID_END, pev_rendermode)==kRenderTransAlpha) fm_set_rendering(ID_END) message_begin(MSG_ONE, g_msgScreenFade, _, ID_END) write_short(1<<12) write_short(0) write_short(0x0000) write_byte(120) write_byte(120) write_byte(120) write_byte(120) message_end() emit_sound(ID_END, CHAN_VOICE, sound_invis_out, 1.0, ATTN_NORM, 0, PITCH_NORM) } } public task_ShowCooldown(taskid) { if(!is_user_connected(ID_COOLDOWN) || !is_user_alive(ID_COOLDOWN) || !zp_get_user_zombie(ID_COOLDOWN) || zp_get_user_nemesis(ID_COOLDOWN)) { remove_task(taskid) return } if(get_gametime()-g_fLastUse[ID_COOLDOWN]>=COOLDOWN_INVIS) { remove_task(taskid) return } set_hudmessage(200, 100, 0, 0.59, 0.94, 0, 6.0, 1.1, 0.0, 0.0, -1) show_hudmessage(ID_COOLDOWN, "[Remaining: %d]", floatround(get_gametime()-COOLDOWN_INVIS-g_fLastUse[ID_COOLDOWN])*-1) } public zp_user_infected_post(id, infector) { if ((zp_get_user_zombie_class(id) == g_zcLight) && !zp_get_user_nemesis(id)) { g_SkillActive[id] = false g_fLastUse[id] = 0.0 show_message(id, {255, 0, 0}, -1.0, 0.7, "Press [G] to be invisible!") } } stock fm_set_rendering(entity, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16) { static Float:color[3] color[0] = float(r) color[1] = float(g) color[2] = float(b) set_pev(entity, pev_renderfx, fx) set_pev(entity, pev_rendercolor, color) set_pev(entity, pev_rendermode, render) set_pev(entity, pev_renderamt, float(amount)) } zp_colored_print(target, const message[], any:...) { static buffer[512], i, argscount argscount = numargs() vformat(buffer, charsmax(buffer), message, 3) // Send to everyone if (!target) { static player for (player = 1; player <= g_maxplayers; player++) { // Not connected if (!is_user_connected(player)) continue; // Remember changed arguments static changed[5], changedcount // [5] = max LANG_PLAYER occurencies changedcount = 0 // Replace LANG_PLAYER with player id for (i = 2; i < argscount; i++) { if (getarg(i) == LANG_PLAYER) { setarg(i, 0, player) changed[changedcount] = i changedcount++ } } // Send it message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, player) write_byte(player) write_string(buffer) message_end() // Replace back player id's with LANG_PLAYER for (i = 0; i < changedcount; i++) setarg(changed[i], 0, LANG_PLAYER) } } // Send to specific target else { // Send it message_begin(MSG_ONE, g_msgSayText, _, target) write_byte(target) write_string(buffer) message_end() } } show_message(id, const rgb[3], Float:x, Float:y, const message[]) { set_dhudmessage(rgb[0],rgb[1] ,rgb[2], x, y , 0) show_dhudmessage(id, message) show_dhudmessage(id, message) } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par } */ Przeczytaj cały wpis Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi