Raised This Month: $32 Target: $400
 8% 

About modifying radar


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SlaneR
Junior Member
Join Date: Jun 2011
Location: South Korea
Old 12-19-2012 , 01:37   About modifying radar
Reply With Quote #1

Code:
public OnPluginStart()
    SDKHook(FindEntityByClassname(0, "cs_player_manager"), SDKHook_ThinkPost, CSPM);

public CSPM(Ent)
{
    new iSpot = FindSendPropOffs("CCSPlayerResource" , "m_bPlayerSpotted");

    for ( new i = 1; i <= MaxClients; i++ )
    {
        // set spotted state
        SetEntData(Ent, iSpot + i, true, 4, true);
    }
}
If I use this code, all players radar is modified.
(all enemies can see my teammates / all teammates can see enemies)

How do I change this to only one player effect this?
(if A player call this, only A player's radar is changed)
SlaneR is offline
rhelgeby
Veteran Member
Join Date: Oct 2008
Location: 0x4E6F72776179
Old 12-19-2012 , 05:09   Re: About modifying radar
Reply With Quote #2

I don't know the details here so I can't give code examples. But I think you can modify or block certain radar updates ("UpdateRadar" user message) that are sent to clients.

Some also say it's partly client side (when players are close to you) where the client will update the radar locally. This cannot be blocked by a plugin, but perhaps overridden by sending another update.
__________________
Richard Helgeby

Zombie:Reloaded | PawnUnit | Object Library
(Please don't send private messages for support, they will be ignored. Use the forum.)

Last edited by rhelgeby; 12-19-2012 at 05:11.
rhelgeby is offline
Send a message via MSN to rhelgeby
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 12-19-2012 , 12:22   Re: About modifying radar
Reply With Quote #3

https://forums.alliedmods.net/showth...77#post1732677

Can't do.
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.

Franc1sco is offline
Send a message via MSN to Franc1sco
Reply


Thread Tools
Display Modes

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 10:02.


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