AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   SEMICLIP (https://forums.alliedmods.net/showthread.php?t=324584)

Cirovic 05-20-2020 08:44

SEMICLIP
 
1 Attachment(s)
i need fix for THIS semiclip, dont tell me to try others, i want this, if u can fix it. do it.

Problem is:
You dont get player info when you aim on some player to see his name and hp...

Supremache 05-20-2020 10:51

Re: SEMICLIP
 
Quote:

Originally Posted by Cirovic (Post 2701214)
i need fix for THIS semiclip, dont tell me to try others, i want this, if u can fix it. do it.

Problem is:
You dont get player info when you aim on some player to see his name and hp...

This plugin didn't have hud message for aim player info.
If you want me add aim player info to this plugin tell me what you want in hud info ?
HP , Armor, name , ammo ?
Which mod do you use ?

Cirovic 05-20-2020 12:25

Re: SEMICLIP
 
sorry for confusion, i was thinking about classic player info.. when you play on bots example..

https://i.imgur.com/zkXvDEw.png

Supremache 05-20-2020 13:45

Re: SEMICLIP
 
Quote:

Originally Posted by Cirovic (Post 2701244)
sorry for confusion, i was thinking about classic player info.. when you play on bots example..

https://i.imgur.com/zkXvDEw.png

I dont understand ?????????
Give me more exmple for what you want...:nono:

Cirovic 05-20-2020 14:21

Re: SEMICLIP
 
When i started using semiclip plugin that i posted above, i am not able to see my teammates names and hp like before i added semiclip.. and it need to be fixed..
BEFORE SEMICLIP: https://i.imgur.com/zkXvDEw.png

Supremache 05-20-2020 15:16

Re: SEMICLIP
 
Quote:

Originally Posted by Cirovic (Post 2701263)
When i started using semiclip plugin that i posted above, i am not able to see my teammates names and hp like before i added semiclip.. and it need to be fixed..
BEFORE SEMICLIP: https://i.imgur.com/zkXvDEw.png

This plugin haven't work for this aim hud , This aim hud info made by cs 1.6 not by any plugin and i think you added mod didn't allowed that, But i can make plugin same hud for you.

Supremache 05-20-2020 15:19

Re: SEMICLIP
 
Quote:

Originally Posted by Cirovic (Post 2701263)
When i started using semiclip plugin that i posted above, i am not able to see my teammates names and hp like before i added semiclip.. and it need to be fixed..
BEFORE SEMICLIP: https://i.imgur.com/zkXvDEw.png

Try this plugin:
PHP Code:

#include <amxmodx>
#include <hamsandwich>
#include <cstrike>

#define IsPlayer(%1) (1 <= %1 <= g_players)

new const PLUGIN_VERSION[]  = "1.0";
new 
gRedgBlue;
new 
g_players;

public 
plugin_init() 
{
 
register_plugin("Aim Health"PLUGIN_VERSION,  "MaNiax");
 
RegisterHam(Ham_Player_PreThink"player""Player_PreThink");
 
g_players get_maxplayers();
}

public 
Player_PreThink(id)
{
 new 
iPlriBody;
 
get_user_aiming(idiPlriBody);
 
 if( 
IsPlayer(iPlr) && is_user_alive(iPlr) )
 {
  switch( 
cs_get_user_team(iPlr) )
  {
   case 
CS_TEAM_T:
   {
    
gRed 255;
    
gBlue 0;
   }
   case 
CS_TEAM_CT:
   {
    
gRed 0;
    
gBlue 255;
   }
  }
  
  new 
EnemyHealth get_user_health(iPlr);
  new 
EnemyName[33];
  
get_user_name(iPlrEnemyNamecharsmax(EnemyName));
  
set_hudmessage(gRedgBlue0, -1.0, -1.006.01.60.10.2, -1); 
  
show_hudmessage(id"[Name]: %s | [Health]: \%i"EnemyNameEnemyHealth);
 }  



Cirovic 05-20-2020 16:17

Re: SEMICLIP
 
That works only on ENEMY player, i cant get info on TEAMMATE BECAUSE OF SEMICLIP !!!!!!

Supremache 05-20-2020 17:56

Re: SEMICLIP
 
Quote:

Originally Posted by Cirovic (Post 2701293)
That works only on ENEMY player, i cant get info on TEAMMATE BECAUSE OF SEMICLIP !!!!!!

This is what you want :D enjoy
PHP Code:

#include <amxmodx>
#include <cstrike>
#include <hamsandwich>

#define NAME "show teammate's health"
#define VERSION "1.3.2"
#define AUTHOR "MrAbdoO"

new g_max_playersg_sync_creat_statustextg_sync_creat_list

new bool:g_teammate[33]

new 
cvar_plugin_on
new cvar_status_on

public plugin_init()
{
    
register_plugin(NAMEVERSIONAUTHOR)
    
    
RegisterHam(Ham_Spawn"player""player_spawn"1)
    
    
register_clcmd("say /health""clcmd_health")
    
    
register_event("StatusValue""show_teammate_head""be""1=2""2!0")
    
register_event("StatusValue""set_team""be""1=1")
    
    
cvar_plugin_on register_cvar("stm_on""1")
    
cvar_status_on register_cvar("stm_st_on""1")
    
    
g_max_players get_maxplayers()
    
g_sync_creat_statustext CreateHudSyncObj()
    
g_sync_creat_list CreateHudSyncObj()
}

public 
clcmd_health(client)
{
    if (!
get_pcvar_num(cvar_plugin_on))
    {
        
client_print(clientprint_chat"[AMXX]: Show Teammate's health was off.")
        return 
PLUGIN_HANDLED
    
}
    
show_health(client)
    return 
PLUGIN_CONTINUE
}

public 
player_spawn(client)
{
    
remove_task(client)
    if (
is_user_alive(client) && get_pcvar_num(cvar_plugin_on))
    {
        
set_task(1.0"show_health"client)
    }
}

public 
show_health(client)
{
    static 
message[1024];
    static 
name[32];
    
    new 
healthidlen;
    
    
len format(messagecharsmax(message), "The teammate's health:^n");
    for (
id 1id <= g_max_playersid++)
    {
        if (
id != client && is_user_connected(id) && cs_get_user_team(id) == cs_get_user_team(client))
        {
            
health get_user_health(id);
            
get_user_name(idname31);
            
len += format(message[len], charsmax(message) - len"%-22.22s: %d^n"namehealth);
        }
    }
    
set_hudmessage(10020000.050.3500.025.00.10.22);
    
ShowSyncHudMsg(clientg_sync_creat_listmessage);
}

public 
set_team(id)
    
g_teammate[id] = bool:(read_data(2) == 1);

public 
show_teammate_health(id)
{
    if (!
get_pcvar_num(cvar_plugin_on))
        return 
PLUGIN_HANDLED
    
if(!is_user_bot(id) && is_user_connected(id) && get_pcvar_num(cvar_status_on))
    {
        static 
name[32]
        
        new 
pid read_data(2)
        new 
red 0blue 0
        
        
if (cs_get_user_team(pid) == CS_TEAM_T)
            
red 255
        
else if(cs_get_user_team(pid) == CS_TEAM_CT)
            
blue 255
        
        get_user_name
(pidnamecharsmax(name))
        new 
health get_user_health(pid)
        if (
g_teammate[id])
        {
            
set_hudmessage(red50blue, -1.00.6010.010.60.010.018)
            
ShowSyncHudMsg(idg_sync_creat_statustext"Friend:%s -- health:%d"namehealth)
        }
        else {
            
set_hudmessage(red50blue, -1.00.6010.010.60.010.018)
            
ShowSyncHudMsg(idg_sync_creat_statustext"Enemy:%s -- health:%d"namehealth)
        }
    }
    return 
PLUGIN_CONTINUE
}

public 
client_disconnect(client)
{
    
remove_task(client)



Cirovic 05-20-2020 18:05

Re: SEMICLIP
 
Bro you dont understand, look my plugin above.. i use semiclip plugin, and bcs of that i cant get playerinfo when i aim on it, it need to be fixed ...

Supremache 05-20-2020 18:21

Re: SEMICLIP
 
Quote:

Originally Posted by Cirovic (Post 2701315)
Bro you dont understand, look my plugin above.. i use semiclip plugin, and bcs of that i cant get playerinfo when i aim on it, it need to be fixed ...

Hey dude, I think you didn't understand me i said this semiclip plugin have not any code for didn't allowed to show aim hud Try my plugin and it will be work with you.
You said want to show aim hud of team and enemy and i did plugin for you working for doing it.

PS: If this plugin didn't work, then there's another plugin do that problem.

Cirovic 05-20-2020 18:29

Re: SEMICLIP
 
Yes and i uploaded plugin, and it does not fix my problem .. no other plugins on server.

Mistrick 05-20-2020 18:39

Re: SEMICLIP
 
Quote:

Originally Posted by Supremache (Post 2701318)
Hey dude, I think you didn't understand me i said this semiclip plugin have not any code for didn't allowed to show aim hud Try my plugin and it will be work with you.
You said want to show aim hud of team and enemy and i did plugin for you working for doing it.

PS: If this plugin didn't work, then there's another plugin do that problem.

This semiclip sets SOLID_NOT and it breaks gamedll trace for detecting player, old bug for current semiclip method. It can't be fixed with this semiclip. Fix will transform current source code to 99% new code which contradicts with "i need fix for THIS semiclip".
https://forums.alliedmods.net/showthread.php?t=250891 - the best variant of semiclip but it can't be solution.

Cirovic 05-20-2020 19:23

Re: SEMICLIP
 
server crashes when i use this...

Mistrick 05-20-2020 21:42

Re: SEMICLIP
 
And we have zero info about your server.

DJEarthQuake 05-23-2020 01:15

Re: SEMICLIP
 
Code:
#include <amxmodx> #include <amxmisc> #include <engine> #include <fakemeta> #include <hamsandwich> #define NotDeadorHLTV "ah" const MAX_PLAYERS = 32 new g_iPlayers[MAX_PLAYERS], g_iNum, g_iPlayer, g_iSemiclip, i; new SzTeam[4], Players_team, Your_team; static Float:flDistance public plugin_init() {     register_plugin("Semiclip", "1.1", "ConnorMcLeod|SPiNX")     g_iSemiclip = register_cvar("sv_semiclip", "1");     register_forward(FM_AddToFullPack, "FM_client_AddToFullPack_Post", 1)     RegisterHam(Ham_Player_PreThink, "player", "Ham_CBasePlayer_PreThink_Post", 1) } public FM_client_AddToFullPack_Post(es, e, iEnt, id, hostflags, player, pSet) {     Players_team = get_user_team(iEnt, SzTeam, charsmax(SzTeam));     Your_team = get_user_team(id, SzTeam, charsmax(SzTeam));     if( player && id != iEnt && get_orig_retval() && is_user_alive(id) && Players_team == Your_team )     {         flDistance = entity_range(id, iEnt)         if( flDistance < 50.0 )         {             set_es(es, ES_RenderMode, kRenderTransAlpha)             set_es(es, ES_RenderAmt, floatround(flDistance)/2)         }     } } public Ham_CBasePlayer_PreThink_Post(id) {     if(!is_user_alive(id) || get_pcvar_num(g_iSemiclip) == 0)     {         return     }     if( is_user_bot(id) && is_user_connected(id) || !is_user_bot(id) && is_user_connected(id) ){     //'Some' bots are knife proof otherwise.     get_players(g_iPlayers, g_iNum, NotDeadorHLTV)     for(i = 0; i<g_iNum; i++)     {         g_iPlayer = g_iPlayers[i]         Players_team = get_user_team(g_iPlayer, SzTeam, charsmax(SzTeam));         Your_team = get_user_team(id, SzTeam, charsmax(SzTeam));         if( id != g_iPlayer && Your_team == Players_team  )         {             set_pev(g_iPlayer, pev_solid, SOLID_NOT)         }       }    } } public client_PostThink(id) {     if( !is_user_connected(id) )     {         return     }     get_players(g_iPlayers, g_iNum, NotDeadorHLTV)     for(i = 0; i<g_iNum; i++)     {         g_iPlayer = g_iPlayers[i]         if( g_iPlayer != id )         {             set_pev(g_iPlayer, pev_solid, SOLID_SLIDEBOX)         }     } }

Stefanos 05-23-2020 18:09

Re: SEMICLIP
 
bad semiclip plugin, on high movement speed it stops for a second when touch player..

DJEarthQuake 05-23-2020 19:45

Re: SEMICLIP
 
Thanks for testing/feedback. Refinements made.

Bazza8880 10-04-2020 18:30

Re: SEMICLIP
 
I have the same issues when using semiclip.amxx but as I have read, it is because that plugin can't be fixed. I'm to assume the above works to make semiclip work and allow seeing playerid and hp when centered on them, however I have zero knowledge of compiling a plugin. What do I do?

DJEarthQuake 10-04-2020 23:01

Re: SEMICLIP
 
Quote:

Originally Posted by Bazza8880 (Post 2720239)
I have the same issues when using semiclip.amxx but as I have read, it is because that plugin can't be fixed. I'm to assume the above works to make semiclip work and allow seeing playerid and hp when centered on them, however I have zero knowledge of compiling a plugin. What do I do?

  1. Copy, paste, and save code as a SMA file extension.
  2. This guides you through compiling.https://wiki.alliedmods.net/Compilin...ns_(AMX_Mod_X)
  3. Once compiled you will have the .AMXX file to install as usual.

Bazza8880 10-05-2020 11:30

Re: SEMICLIP
 
Thank you, you're a star.


All times are GMT -4. The time now is 09:00.

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