Raised This Month: $ Target: $400
 0% 

how to remove the sprities from the map?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
access
Junior Member
Join Date: Mar 2007
Location: Рос
Old 04-16-2007 , 10:52   how to remove the sprities from the map?
Reply With Quote #1

help me please..
access is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 04-17-2007 , 09:20   Re: how to remove the sprities from the map?
Reply With Quote #2

env_sprite or cycler_sprite entities or what?
VEN is offline
access
Junior Member
Join Date: Mar 2007
Location: Рос
Old 04-18-2007 , 06:16   Re: how to remove the sprities from the map?
Reply With Quote #3

sorry my bad english..

I want to remove some sprites.. (if user alive)

for example, sprite of RADAR (radar640.spr)
access is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 04-18-2007 , 07:51   Re: how to remove the sprities from the map?
Reply With Quote #4

With AMX Mod X you can't actually remove radar640.spr on a client as well as any other client file. You can execute "hideradar" command on a client but he is able to restore it back with "drawradar" command at any time.
Also you can hide radar+health+armor by sending HideWeapon user message with argument (1<<3), i.e 8.
VEN is offline
access
Junior Member
Join Date: Mar 2007
Location: Рос
Old 04-18-2007 , 08:06   Re: how to remove the sprities from the map?
Reply With Quote #5

Quote:
Originally Posted by VEN View Post
Also you can hide radar+health+armor by sending HideWeapon user message with argument (1<<3), i.e 8.
cl_cmd HideWeapon ?
access is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 04-18-2007 , 10:51   Re: how to remove the sprities from the map?
Reply With Quote #6

No. User message.

Code:
 message_begin(MSG_ONE, get_user_msgid("HideWeapon"), _, id)  write_byte((1<<3))  message_end()
As i said this will hide radar+health+armor.
VEN is offline
access
Junior Member
Join Date: Mar 2007
Location: Рос
Old 04-18-2007 , 11:37   Re: how to remove the sprities from the map?
Reply With Quote #7

mmm... no effect

can you give me full code of plugin?
access is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 04-18-2007 , 15:29   Re: how to remove the sprities from the map?
Reply With Quote #8

Do you need a scripting help or a plugin? If you need a plugin you better go to the suggestions / requests section.
VEN is offline
access
Junior Member
Join Date: Mar 2007
Location: Рос
Old 04-19-2007 , 04:56   Re: how to remove the sprities from the map?
Reply With Quote #9

Я не знал, что ты и по-русски говорить умеешь
Просто нужен плагин (или код плагина, желательно), чтобы убрать во время игры (когда игрок приконнекчен на сервер) спрайты радара, хелсов и брони.
Я имею ввиду не удаление физически файлов у клиента, а временное (до ухода с сервера) "отключение" вышеуказанных спрайтов..
Заранее благодарен, если поможешь
access is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 04-19-2007 , 07:00   Re: how to remove the sprities from the map?
Reply With Quote #10

Code:
/* AMX Mod X *   Hide Radar, Health, Armor * * (c) Copyright 2007 by VEN * * This file is provided as is (no warranties) * *       NOTE *               This plugin was written in especial manner in try to be "friendly" to other plugins. *               HideWeapon message non-conflict scripting quite problematic for a number of reasons. */ #include <amxmodx> #include <amxmisc> #include <fakemeta> // comment to not hide radar, health, armor for all clients by default #define HIDE_HEALTH_ARMOR_RADAR_FOR_ALL // amx_hideradar command access level #define COMMAND_ACCESS ADMIN_SLAY // comment to make amx_hideradar command to not obey immunity #define OBEY_IMMUNITY // symbol + mean that additional small crosshair will be drawn #define HIDEHUD_CROSSHAIR_AMMO_WEAPLIST (1<<0) // a #define HIDEHUD_FLASHLIGHT (1<<1)              // b + #define HIDEHUD_ALL (1<<2)                     // c #define HIDEHUD_HEALTH_ARMOR_RADAR (1<<3)      // d + #define HIDEHUD_ROUND_TIMER (1<<4)             // e + #define HIDEHUD_MONEY (1<<5)                   // f + #define HIDEHUD_CROSSHAIR (1<<6)               // g #define HIDEHUD_NONE (1<<7)                    // h + #define HIDE_HUD_ELEMENTS HIDEHUD_HEALTH_ARMOR_RADAR #define MAX_CLIENTS 32 #if defined HIDE_HEALTH_ARMOR_RADAR_FOR_ALL         new g_hide_hud_elements[MAX_CLIENTS + 1] = {HIDE_HUD_ELEMENTS, ...} #else         new g_hide_hud_elements[MAX_CLIENTS + 1] = {0, ...} #endif new g_msgid_resethud new g_msgid_hideweapon new g_msgid_crosshair new bool:g_skip_msg = false new g_hide_hud = 0 new g_hide_crosshair = 0 public plugin_init() {         register_plugin("Hide Radar, Health, Armor", "0.1", "VEN")         g_msgid_resethud = get_user_msgid("ResetHUD")         g_msgid_hideweapon = get_user_msgid("HideWeapon")         g_msgid_crosshair = get_user_msgid("Crosshair")         // some hidden hud elements will be redrawn on HUD reset so we use this         // emessage execution in hook from register_event("XXX", "ev_XXX", "b")         // causing stack error/recursion (core bug?) so we need this workaround         register_forward(FM_MessageBegin, "forward_message_begin", 1)         register_forward(FM_MessageEnd, "forward_message_end", 1) // important: post hook         register_message(g_msgid_hideweapon, "message_hide_weapon")         register_concmd("amx_hideradar", "cmd_hideradar", COMMAND_ACCESS, "<name or #userid> [0|1] - hides/unhides radar, health, armor") } public cmd_hideradar(caller, level, cid) {         if (!cmd_access(caller, level, cid, 2))                 return PLUGIN_HANDLED         static arg[32], id         read_argv(1, arg, sizeof arg - 1) #if defined OBEY_IMMUNITY         id = cmd_target(caller, arg, 1) #else         id = cmd_target(caller, arg, 0) #endif         if (!id)                 return PLUGIN_HANDLED         read_argv(2, arg, 1)         switch (arg[0]) {                 case '1': hide_hud_elements(id, HIDE_HUD_ELEMENTS)                 case '0': hide_hud_elements(id, 0)                 default: console_print(caller, "User's radar, health, armor is %s", g_hide_hud_elements[id] ? "hidden" : "displayed")         }         return PLUGIN_HANDLED }   public forward_message_begin(msg_dest, msg_id, const Float:origin[3], id) {         if (!g_skip_msg && msg_dest == MSG_ONE && g_hide_hud_elements[id]) {                 if (msg_id == g_msgid_resethud)                         g_hide_hud = id                 else if (msg_id == g_msgid_hideweapon)                         g_hide_crosshair = id         }         return FMRES_IGNORED } public forward_message_end() {         if (g_skip_msg)                 return FMRES_IGNORED         static id         if (g_hide_hud) {                 id = g_hide_hud                 g_hide_hud = 0                 if (g_hide_hud_elements[id] && is_user_connected(id))                         hide_hud_elements(id, g_hide_hud_elements[id])         }         else if (g_hide_crosshair) {                 id = g_hide_crosshair                 g_hide_crosshair = 0                 if (g_hide_hud_elements[id] && is_user_connected(id))                         hide_crosshair(id)         }         return FMRES_IGNORED } hide_hud_elements(id, flags) {         g_hide_hud_elements[id] = flags         g_skip_msg = true         emessage_begin(MSG_ONE, g_msgid_hideweapon, _, id)         ewrite_byte(flags)         emessage_end()         hide_crosshair(id)         g_skip_msg = false } public message_hide_weapon(msg_dest, msg_id, id) {         if (g_hide_hud_elements[id]) {                 static arg                 arg = get_msg_arg_int(1)                 if (!(arg & HIDE_HUD_ELEMENTS))                         set_msg_arg_int(1, ARG_BYTE, arg | HIDE_HUD_ELEMENTS)         } } hide_crosshair(id) {         emessage_begin(MSG_ONE, g_msgid_crosshair, _, id)         ewrite_byte(0)         emessage_end() } public client_disconnect(id) {         #if defined HIDE_HEALTH_ARMOR_RADAR_FOR_ALL                 g_hide_hud_elements[id] = HIDE_HUD_ELEMENTS         #else                 g_hide_hud_elements[id] = 0         #endif }
Attached Files
File Type: sma Get Plugin or Get Source (hide_health_armor_radar.sma - 861 views - 4.4 KB)
VEN is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:53.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode