Raised This Month: $ Target: $400
 0% 

[REQ] Insurgency Forced prone position for legs damage.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KALASH NICOLE
Member
Join Date: Feb 2016
Old 07-06-2016 , 07:51   [REQ] Insurgency Forced prone position for legs damage.
Reply With Quote #1

I'm looking for a plugin able to force the player to stay in prone position (letting the possibility to crawl) when one of the legs hitbox has less than, let's say, 25% of the initial health point.

optional :

- a text message saying "You have a broken leg, you can't walk".
- bloody effect displayed on the player screen
- random pain scream.

Last edited by KALASH NICOLE; 08-17-2016 at 13:21.
KALASH NICOLE is offline
KALASH NICOLE
Member
Join Date: Feb 2016
Old 07-01-2017 , 16:35   Re: [REQ] Insurgency Forced prone position for legs damage.
Reply With Quote #2

links that can help : https://forums.alliedmods.net/showthread.php?t=201196
insurgency config.cfg have +prone and +jump binded stance :

PHP Code:
unbindall
bind 
"0" "slot0"
bind "1" "slot1"
bind "2" "slot2"
bind "3" "slot3"
bind "4" "slot4"
bind "5" "slot5"
bind "6" "slot6"
bind "7" "slot7"
bind "8" "slot8"
bind "b" "+use_accessory"
bind "f" "toggle_camera"
bind "h" "+flashlight"
bind "k" "+voicerecord"
bind "m" "changeinventory"
bind "n" "+tacticalmap"
bind "p" "jpeg"
bind "t" "impulse 201"
bind "u" "messagemode2"
bind "y" "messagemode"
bind "KP_INS" "+duck"
bind "KP_END" "+prone"
bind "KP_DOWNARROW" "+leanright"
bind "KP_LEFTARROW" "+leanleft"
bind "KP_HOME" "+firemode"
bind "," "changesquad"
bind "." "changeteam"
bind "/" "+toggle_sprint"
bind "ENTER" "+usereload"
bind "BACKSPACE" "+use"
bind "TAB" "+score"
bind "ESCAPE" "cancelselect"
bind "RSHIFT" "+sprint"
bind "ALT" "+toggle_walk"
bind "RCTRL" "+jump"
bind "UPARROW" "+forward"
bind "LEFTARROW" "+moveleft"
bind "DOWNARROW" "+back"
bind "RIGHTARROW" "+moveright"
bind "F3" "toggleconsole"
bind "F10" "quit"
bind "MOUSE1" "+attack"
bind "MOUSE2" "+toggle_zoom"
bind "MOUSE3" "+special1"
bind "MWHEELUP" "scrollup"
bind "MWHEELDOWN" "scrolldown"
bind "JOY1" "+jump"
bind "JOY2" "toggle_duck"
bind "JOY3" "+reload"
bind "JOY4" "+use"
bind "JOY5" "+firemode"
bind "JOY6" "+grenade"
bind "JOY7" "+score"
bind "JOY8" "pause"
bind "JOY9" "+speed"
bind "JOY10" "+prone"
bind "POV_UP" "scrollup"
bind "POV_RIGHT" "+leanright"
bind "POV_DOWN" "scrolldown"
bind "POV_LEFT" "+leanleft"
bind "Z AXIS POS" "+special2"
bind "Z AXIS NEG" "+attack"
adsp_debug "0"
budget_averages_window "30"
budget_background_alpha "128"
budget_bargraph_background_alpha "128"
budget_bargraph_range_ms "16.6666666667"
budget_history_numsamplesvisible "100"
budget_history_range_ms "66.666666667"
budget_panel_bottom_of_history_fraction ".25"
budget_panel_height "384"
budget_panel_width "512"
budget_panel_x "0"
budget_panel_y "50"
budget_peaks_window "30"
budget_show_averages "0"
budget_show_history "1"
budget_show_peaks "1"
bugreporter_uploadasync "0"
bugreporter_username ""
c_maxdistance "200"
c_maxpitch "90"
c_maxyaw "135"
c_mindistance "30"
c_minpitch "0"
c_minyaw "-135"
c_orthoheight "100"
c_orthowidth "100"
cam_collision "1"
cam_idealdelta "4.0"
cam_idealdist "150"
cam_idealdistright "0"
cam_idealdistup "0"
cam_ideallag "4.0"
cam_idealpitch "0"
cam_idealyaw "0"
cam_snapto "0"
cc_lang ""
cc_linger_time "1.0"
cc_predisplay_time "0.25"
cc_subtitles "0"
chet_debug_idle "0"
cl_ads_fov_scale "0"
cl_ads_weapon_fov_scale "1.3"
cl_allowdownload "1"
cl_allowupload "1"
cl_bipod_auto "0"
cl_camera_animation "1"
cl_chatfilter_version "1"
cl_chatfilters "63"
cl_clanid "0"
cl_class "default"
cl_cmdrate "64"
cl_config_version "2"
cl_debugrumble "0"
cl_detail_avoid_force "0"
cl_detail_avoid_radius "0"
cl_detail_avoid_recover_speed "0"
cl_detail_max_sway "0"
cl_developer_status "1"
cl_disablehtmlmotd "0"
cl_downloadfilter "0"
cl_ejectbrass_3p "1"
cl_event_sound_cues "1"
cl_forcepreload "1"
cl_grenade_auto_switch "0"
cl_hq_messages_enabled "1"
cl_hud_chat_subtitles "1"
cl_hud_compass_alpha "255"
cl_hud_compass_appear_enemy "2.0"
cl_hud_compass_bgalpha "0.85"
cl_hud_compass_fadetime "0.45"
cl_hud_compass_holdtime "0.2"
cl_hud_compass_inset "0"
cl_hud_compass_scale "1"
cl_hud_compass_show_ads "0"
cl_hud_compass_show_always "0"
cl_hud_compass_show_tacmap "0"
cl_hud_cp_docking_display "1"
cl_hud_cp_floating_ads_alpha "0.2"
cl_hud_cp_floating_display "1"
cl_hud_cp_floating_max_alpha "1.0"
cl_hud_cp_floating_min_alpha "0.8"
cl_hud_cp_floating_nontarget_alpha "0.2"
cl_hud_cp_main_display "0"
cl_hud_damageindicator_alpha "0.5"
cl_hud_damageindicator_scale "0.7"
cl_hud_damageindicator_time "1"
cl_hud_deathnotice_captures "1"
cl_hud_deathnotice_display "1"
cl_hud_deathnotice_show_demo "0"
cl_hud_draw_floating "1"
cl_hud_firemode_show_always "0"
cl_hud_radial_controls "1"
cl_hud_radial_fadein_delay "0.1"
cl_hud_radial_fadein_duration "0.1"
cl_hud_voices_show_local "0"
cl_hud_voices_show_names "1"
cl_idealpitchscale "0.8"
cl_interp "0.03125"
cl_interp_ratio "2.0"
cl_inventory_sorting_method "1"
cl_logofile "materials/vgui/logos/spray_bullseye.vtf"
cl_menu_stats_state "0"
cl_minimal_rtt_shadows "1"
cl_mouselook "1"
cl_mumble_positionalaudio "1"
cl_ragdoll_dismemberment "1"
cl_ragdoll_gib_shadows "1"
cl_rumblescale "1.0"
cl_showhelp "1"
cl_showpluginmessages "1"
cl_soundfile ""
cl_spec_mode "6"
cl_team "default"
cl_team_colors_relative "1"
cl_thirdperson_obstruct_color "0"
cl_thirdperson_obstruct_delay "0.25"
cl_thirdperson_obstruct_frac "0.75"
cl_thirdperson_obstruct_marker "1"
cl_thirdperson_reticle ""
cl_thirdperson_spectate_alpha "1.0"
cl_timeout "30"
cl_updaterate "64"
cl_use_opens_kit "0"
cl_vip_preference "1"
cl_zoom_sensitivity "1.069519"
cl_zoom_sensitivity_fov_scaled "1"
cl_zoom_sensitivity_fov_scope "1"
cl_zoom_sensitivity_scope "4.000000"
cl_zoom_sensitivity_scope_uses_irons_scale "0"
closecaption "1"
con_enable "1"
dsp_enhance_stereo "1"
force_audio_english "0"
fov_desired "75.000000"
func_break_max_pieces "15"
g15_update_msec "250"
gameinstructor_enable "1"
hq_radio_cooldown "2"
hud_classautokill "1"
hud_stream_friendly "0"
hud_takesshots "0"
hud_targetid_enabled "1"
hud_targetid_radial_duration "3.0"
ins_bot_count_checkpoint "41"
ins_bot_count_checkpoint_default "0"
ins_bot_count_checkpoint_max "48"
ins_bot_count_checkpoint_min "32"
ins_bot_count_conquer "0"
ins_bot_count_conquer_default "12"
ins_bot_count_conquer_solo "8"
ins_bot_count_hunt "42"
ins_bot_count_hunt_default "0"
ins_bot_count_hunt_max "48"
ins_bot_count_hunt_min "26"
ins_bot_count_hunt_solo "15"
ins_bot_count_outpost "0"
ins_bot_count_outpost_default "0"
ins_bot_count_outpost_level_multiplier "1.15"
ins_bot_count_outpost_max "24"
ins_bot_count_outpost_start_max "12"
ins_bot_count_outpost_start_min "6"
ins_bot_count_survival "0"
ins_bot_count_survival_day_start_max "19"
ins_bot_count_survival_day_start_min "14"
ins_bot_count_survival_default "0"
ins_bot_count_survival_level_multiplier "1.15"
ins_bot_count_survival_max "24"
ins_bot_count_survival_start_max "18"
ins_bot_count_survival_start_min "12"
ins_bot_quota "0"
joy_accelmax "1"
joy_accelscale "5"
joy_accelscalepoly "0.4"
joy_advanced "1"
joy_advaxisr "2"
joy_advaxisu "4"
joy_advaxisv "0"
joy_advaxisx "3"
joy_advaxisy "1"
joy_advaxisz "0"
joy_autoaimdampen "0.5"
joy_autoAimDampenMethod "0"
joy_autoaimdampenrange ".85"
joy_axisbutton_threshold "0.2"
joy_cfg_preset "1"
joy_circle_correct "0"
joy_cursor_emulation "1"
joy_curvepoint_1 "0.001"
joy_curvepoint_2 "0.4"
joy_curvepoint_3 "0.75"
joy_curvepoint_4 "1"
joy_curvepoint_end "2"
joy_diagonalpov "0"
joy_display_input "0"
joy_forwardsensitivity "-1.2"
joy_forwardthreshold ".5"
joy_gamma "0.2"
joy_invertx "1"
joy_inverty "0"
joy_lowend "0.65"
joy_lowend_linear "0.55"
joy_lowmap "0.15"
joy_movement_stick "0"
joy_name "Xbox360 controller"
joy_no_accel_jump "0"
joy_pitchsensitivity "-0.100000"
joy_pitchthreshold ".15"
joy_remap_player_for_controller1 "0"
joy_remap_player_for_controller2 "0"
joy_remap_player_for_controller3 "0"
joy_remap_player_for_controller4 "0"
joy_response_look "1"
joy_response_look_pitch "1"
joy_response_move "5"
joy_sensitive_step0 "0.1"
joy_sensitive_step1 "0.4"
joy_sensitive_step2 "0.90"
joy_sidesensitivity "1.2"
joy_sidethreshold ".15"
joy_vibration "1"
joy_wingmanwarrior_centerhack "0"
joy_wingmanwarrior_turnhack "0"
joy_yawsensitivity "-0.100000"
joy_yawthreshold ".15"
joystick "1"
joystick_force_disabled "0"
joystick_force_disabled_set "0"
lookspring "0"
lookstrafe "0"
m_customaccel "0"
m_customaccel_exponent "1.05"
m_customaccel_max "0"
m_customaccel_scale "0.04"
m_forward "1"
m_mouseaccel1 "0"
m_mouseaccel2 "0"
m_mousespeed "1"
m_pitch "0.022"
m_rawinput "1"
m_side "0.8"
m_yaw "0.022"
mat_hbao "0"
mat_insdof "0"
mat_insdof_focaldistance_override "0"
mat_insdof_focallength "35"
mat_insdof_focalspeed "3.0"
mat_insdof_fstop "22"
mat_lensfx "1"
mat_managedtextures "1"
mat_monitorgamma "1.8"
mat_monitorgamma_tv_enabled "0"
mat_powersavingsmode "0"
mat_rgbfilmgrain "0"
mat_rgbfilmgrain_falloff "8.0"
mat_rgbfilmgrain_intensity "1.75"
mat_rgbfilmgrain_size "256.0"
mat_rgbfilmgrain_spectatoronly "0"
mat_rgbfilmgrain_speed "2.5"
mat_scope_fancy "1"
mat_scope_render_quality "3"
mat_spewalloc "0"
mat_texture_list_content_path ""
mat_viewportscale "1.0"
mat_water_phong "1"
mc_accel_band_size "0.5"
mc_dead_zone_radius "0.06"
mc_max_pitchrate "100.0"
mc_max_yawrate "230.0"
mm_csgo_community_search_players_min "3"
mm_server_search_lan_ports "27015,27016,27017,27018,27019,27020"
mp_ambush_single_point_max "10"
mp_coop_max_bots "48"
mp_coop_min_bots "32"
mp_extract_point "0"
mp_invasion_capture_time_extension "480"
mp_push_capture_time_extension "300"
mp_searchdestroy_capture_time_extension "120"
mp_searchdestroy_single_cache_max "12"
mp_spectator_allow_chase "1"
mp_strike_capture_time_extension "180"
mp_strike_capture_wave_decrement "1"
muzzleflash_light "1"
name "|NADES| KALASH NICOLE"
net_allow_multicast "1"
net_graph "4"
net_graphheight "64"
net_graphmsecs "400"
net_graphpos "1"
net_graphproportionalfont "1"
net_graphshowinterp "1"
net_graphshowlatency "1"
net_graphshowsvframerate "0"
net_graphsolid "1"
net_graphtext "1"
net_maxroutable "1200"
net_scale "5"
net_steamcnx_allowrelay "1"
npc_height_adjust "1"
option_duck_method "0"
option_speed_method "0"
overview_alpha "1.0"
overview_bounds_alpha "1.0"
overview_health "1"
overview_locked "1"
overview_names "1"
overview_tracks "1"
password ""
play_distance "1"
r_drawmodelstatsoverlaymax "1.5"
r_drawmodelstatsoverlaymin "0.1"
r_drawtracers_firstperson "1"
r_eyegloss "1"
r_eyemove "1"
r_eyeshift_x "0"
r_eyeshift_y "0"
r_eyeshift_z "0"
r_eyesize "0"
rate "80000"
sc_autoaimdampen_enable "1"
sc_debug_sets "0"
sc_enable "1.0"
sc_joystick_inner_deadzone_scale "1"
sc_joystick_map "1"
sc_joystick_outer_deadzone_scale "0.75"
sc_pitch_sensitivity "0.9"
sc_yaw_sensitivity "1.0"
scene_showlook "0"
scene_showmoveto "0"
scene_showunlock "0"
sensitivity "7.909091"
sk_autoaim_mode "1"
skill "1.000000"
snd_duckerattacktime "0.5"
snd_duckerreleasetime "2.5"
snd_duckerthreshold "0.15"
snd_ducking_off "1"
snd_ducktovolume "0.55"
snd_legacy_surround "0"
snd_mixahead "0.1"
snd_musicvolume "0.000000"
snd_mute_losefocus "1"
snd_pitchquality "1"
snd_radio_filter "0"
spec_bank "0"
spec_bank_angle "4"
spec_bank_override "0"
spec_bank_speed "0.9"
spec_focaldistance_delta "8"
spec_fov "0"
spec_fov_angle "167.000000"
spec_fov_delta "2"
spec_fov_lockdoftofov "0"
spec_fov_maximum "130"
spec_fov_minimum "20"
spec_fov_smoothing "0.96"
spec_handheld "0"
spec_handheld_amplitude "0.2"
spec_handheld_frequency "1"
spec_interpolate "0"
spec_interpolate_position "0"
spec_interpolate_position_smoothing "0.9"
spec_interpolate_smoothing "0.9"
spec_scoreboard "0"
spec_xray "1"
spec_xray_demo "0"
suitvolume "0.25"
sv_forcepreload "0"
sv_log_onefile "1"
sv_logbans "1"
sv_logecho "1"
sv_logfile "1"
sv_logflush "0"
sv_logsdir "logs"
sv_noclipaccelerate "5"
sv_noclipspeed "5"
sv_pvsskipanimation "1"
sv_skyname "mino_sky01"
sv_specaccelerate "5"
sv_specnoclip "1"
sv_specspeed "3"
sv_unlockedchapters "1"
sv_voiceenable "1"
texture_budget_background_alpha "128"
texture_budget_panel_bottom_of_history_fraction ".25"
texture_budget_panel_height "284"
texture_budget_panel_width "512"
texture_budget_panel_x "0"
texture_budget_panel_y "450"
tv_nochat "0"
viewmodel_offset_x "0.0"
viewmodel_offset_y "0.0"
viewmodel_offset_z "0.0"
voice_enable "1"
voice_forcemicrecord "1"
voice_modenable "1"
voice_scale "0.598930"
voice_threshold "2000"
volume "0.165775"
vprof_graph_averagingwindow "32"
vprof_graphheight "256"
vprof_graphwidth "512"
vprof_unaccounted_limit "0.3"
vprof_verbose "1"
vprof_warningmsec "10"
windows_speaker_config "1"
xbox_autothrottle "1"
xbox_throttlebias "100"
xbox_throttlespoof "200"
zoom_sensitivity_ratio_joystick "1.0"
zoom_sensitivity_ratio_mouse "1.0"
cmd1 +jlook 


https://github.com/Daimyo21/Insurgen...redux_naong.sp (this one have hitgroup list)
hitgroup :
leftLeg = 6
rightLeg = 7

ideally once the plugin has forced the player to go prone after a damaged leg it should then disable the +prone and +jump action until the player respawn to prevent the player the stand up again.

Last edited by KALASH NICOLE; 07-01-2017 at 16:38.
KALASH NICOLE is offline
KALASH NICOLE
Member
Join Date: Feb 2016
Old 07-03-2017 , 15:07   Re: [REQ] Insurgency Forced prone position for legs damage.
Reply With Quote #3

One of my friend gave me this code but it doesn't make the player to go prone. i only see the hint message :

PHP Code:
#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
 
bool ProneModeDisabled[MAXPLAYERS+1];
 
public 
void OnPluginStart()
{
    
AddCommandListener(OnProne"+prone");
}
 
public 
void OnClientPostAdminCheck(int client)
{
    
ProneModeDisabled[client] = false;
    
HookEvent("player_spawn"Event_PlayerSpawn);
    
HookEvent("player_death"Event_PlayerDeath);
    
HookEvent("player_hurt"Event_PlayerHurt);
    
HookEvent("player_jump"Event_PlayerJumpEventHookMode_Pre);
}
 
public 
Action Event_PlayerSpawn(Event event, const char[] namebool dontBroadcast)
{
    
int client GetClientOfUserId(event.GetInt("userid"));
    if(
IsValidClient(client) && ProneModeDisabled[client])
    {
        
ProneModeDisabled[client] = false;
    }
    return 
Plugin_Continue;
}
 
public 
Action Event_PlayerDeath(Event event, const char[] namebool dontBroadcast)
{
    
int client GetClientOfUserId(event.GetInt("userid"));
    if(
IsValidClient(client) && ProneModeDisabled[client])
    {
        
ProneModeDisabled[client] = false;
    }
    return 
Plugin_Continue;
}
 
public 
Action Event_PlayerHurt(Event event, const char[] namebool dontBroadcast)
{
    
int client GetClientOfUserId(event.GetInt("userid"));
    if(
IsValidClient(client))
    {
        
int hitgroup GetEventInt(event"hitgroup"); //Get hitgroup
        
if(hitgroup == || hitgroup == 7//If hitgroup 6 or 7
        
{
            if(!
ProneModeDisabled[client] && GetClientHealth(client) <= 25//If not in prone and health is below 26
            
{
                
ClientCommand(client"+prone");
             
ProneModeDisabled[client] = true//activate +prone blocking
                
PrintHintText(client"You have a broken leg! You can't walk!");
            }
        }
    }
    return 
Plugin_Continue;
}
 
public 
Action Event_PlayerJump(Event event, const char[] namebool dontBroadcast)
{
    
int client GetClientOfUserId(event.GetInt("userid"));
    if(
IsValidClient(client) && ProneModeDisabled[client])
        return 
Plugin_Handled;
   
    return 
Plugin_Continue;
}
 
public 
Action OnProne(int client, const char[] cmdint argc)
{
    if(
ProneModeDisabled[client])
        return 
Plugin_Handled;
   
    return 
Plugin_Continue;
}
 
stock bool IsValidClient(int client)
{
    return (
<= client <= MaxClients && IsClientInGame(client));

KALASH NICOLE 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:59.


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