User
Pass
2FA
 
 

Cerere modificare plugin!

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Resources
Author Message798
RoCoFeLu

[Mentally Stable]



Status: Offline
(since 26-06-2012 21:13)
Joined: 27 Jul 2011
Posts: 6, Topics: 2
Location: Romania

Reputation: 56.2
Votes: 2

Post Posted: 22-12-2011, 16:33:07 | Translate post to: ... (Click for more languages)

Buna ziua, am si eu un plugin care ma supara rau si anume HitBox Manipulation!
Cu ce ma supara? Ei bine, pai pluginul acesta este HeadShot Only , dar se pare ca are bug-uri! Merge sa faci frag cu cutitul si cu grenada! Ei bine daca puteti voi si aveti timp sa ma ajutati si pe mine sa repar aceste 2 bug-uri, adica sa NU ia HP atunci cand lovesti cu lama sau cand dai cu HE! Va multumesc mult.

Link Official Plugin: CLICK AICI

Sursa Plugin:
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <regex>
#define MAX_PLAYERS 32
#define MAXINPUT 7
#define SANITARY "abcdefg"
new bool:g_restart_attempt[MAX_PLAYERS + 1]
new amx_show_activity
//new hitbox_allow_knife
//new hitbox_allow_he
new hitbox_bit
public plugin_init(){
   register_plugin("Hitbox Manipulator", "1.00", "Migs Davis")
   register_event("ResetHUD", "event_hud_reset", "be")
   register_event("TextMsg", "event_restart_attempt", "a", "2=#Game_will_restart_in")
   register_clcmd("fullupdate", "clcmd_fullupdate")
   register_concmd("amx_hitbox", "admin_set_hitbox", ADMIN_KICK, "<0|a|b|c|d|e|f|g> - Set hitboxes. Letters equal the body part, can combine letters.")
   //hitbox_allow_knife = register_cvar("hitbox_allow_knife", "1")
   //hitbox_allow_he = register_cvar("hitbox_allow_he", "1")
   hitbox_bit = register_cvar("hitbox_bit", "255")
   amx_show_activity = get_cvar_pointer("amx_show_activity")
}
public clcmd_fullupdate() {
   return PLUGIN_HANDLED
}
public event_restart_attempt(){
   new players[32], num
   get_players(players, num, "a")
   for ( new i; i < num; ++i )
      g_restart_attempt[players[i]] = true
}
public event_hud_reset(id){
   if (g_restart_attempt[id]) {
      g_restart_attempt[id] = false
      return
   }
   set_properties(id)
}
public set_properties(id){
   set_user_hitzones(0, 0, get_pcvar_num(hitbox_bit))
}
public admin_set_hitbox(id, level, cid){
   new flags[MAXINPUT+1], name[32], error[128], result_code, bit = 1
   if ( !cmd_access(id, level, cid, 2) )
      return PLUGIN_HANDLED
   read_argv(1, flags, MAXINPUT)
   strtolower(flags)
   new Regex:re = regex_match(flags, "0", result_code, error, 127)
   if (re >= REGEX_OK) { //This if/else will detect strange syntax, even if it doesn't need to
      regex_free(re)
      if (flags[0] == '0') {
         if (flags[1] == '^0'){
            bit = 0;
         } else {
            bit = 0; //they have a 0 followed by unnecessary characters
         }
      } else{
         bit =  1 // there is a 0 mixed in with other characters
      }
   } else {
      new buf[2] = {0,0}
      for (new i = 0; i<MAXINPUT; i++){
         buf[0] = flags[i];
         re = regex_match(SANITARY, buf[0], result_code, error, 127)
         if (re >= REGEX_OK){
            regex_free(re)
         } else {
            flags[i] = 0 //They have weird characters in here
         }
      }
   }
   if (bit) {
      new buf2[2] = {97,0} //97 = a.
      for (new j = 2; j <= 128; j*=2, buf2[0]++){
         re = regex_match(flags, buf2, result_code, error, 127)
         if (re >= REGEX_OK){
            regex_free(re)
            bit += j
         }
      }
   }
   if (bit == 1){
      //They didn't type any valid flags at all
   }
   set_pcvar_num(hitbox_bit, bit)
   get_user_name(id, name, 31)
   switch ( get_pcvar_num(amx_show_activity) ){
      case 2:   client_print(0, print_chat, "[AMXX] ADMIN %s has manipulated the hitboxes!", name)
      case 1:   client_print(0, print_chat, "[AMXX] ADMIN has manipulated the hitboxes!")
   }
   set_properties(0)
   log_amx("[AMXX] ADMIN %s: set hitboxes to %d", name, bit)
   return PLUGIN_HANDLED
}

0 0
  
Back to top
View user's profile Send private message

  Topic locked


Topic is closed, you cannot post any messages in it anymore




 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Resources  


The time now is 10-08-2025, 12:53:24
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password