Chciałbym zrobić, aby zniknął celownik dla danego teamu, dobra działa to, lecz zrobiłem też tak, aby ten celownik się przywracał (bo to jest plugin na zombie) i wywala błąd taki:
FATAL ERROR (shutting down): MSG_ONE or MSG_ONE_UNRELIABLE with no target entity
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <biohazard>
#define PLUGIN "No crosshair for zombies"
#define VERSION "1.0"
#define AUTHOR "Nenczoks"
new HideWeapon;
new uzywa;
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("CurWeapon", "CurWeapon", "be", "1!0")
register_logevent("logevent_round_start", 2, "1=Round_Start")
HideWeapon = get_user_msgid("HideWeapon")
}
public CurWeapon(id)
{
if(is_user_zombie(id))
{
message_begin(MSG_ONE, HideWeapon, _, id)
write_byte(1<<6)
message_end()
uzywa = true
}
}
public logevent_round_start()
{
for(new id=1;id<=32;id++)
if(uzywa){
draw_crosshair(id)
}
}
draw_crosshair(id)
{
message_begin(MSG_ONE, HideWeapon, _, id)
write_byte(0)
message_end()
}
Proszę o pomoc.
Użytkownik Nenczoks edytował ten post 25.07.2012 17:39