User
Pass
2FA
 
 

[rezolvat]Drop Robot hands

 
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) -> Plugins - Help / Support
Author Message1031
zp.Bodo

[Creep]



Status: Offline
(since 17-11-2019 13:51)
Joined: 15 Jun 2014
Posts: 663, Topics: 166
Location: Romania

Reputation: 548.2
Votes: 20

       
Post Posted: 20-02-2015, 10:15:01 | Translate post to: ... (Click for more languages)

Cand e infectat vreau ca urmatoarea runda sa nu mai primeasca mainile acelea, sa le piarda

Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <zombieplague>
#include <xs>
#include <zmvip>

#define NAME      "Robot Hands"
#define VERSION      "1.0"
#define AUTHOR      "yellow47reg"


#define KNIFE_NAME   "Robot Hands"
#define KNIFE_COST   30

#define KNIFE_GRAVITY    0.4
//#define KNIFE_SPEED   450.0
#define SEC_DMG      1.5
#define PRIM_DMG   2.5
#define SEC_HEAD_DMG   3.5
#define PRIM_HEAD_DMG    4.0
#define   KNIFE_KNOCK   6
#define BLOOD      3

static const v_knife[] = "models/knife/v_spknife.mdl"
static const p_knife[] = "models/knife/p_spknife.mdl"

static const SoundList[][] =
{
   "yellow/deploy1.wav",   // 0
   "yellow/spknife_wall.wav",   // 1
   "yellow/spknife_slasha1_1.wav",   // 2
   "yellow/stab.wav",   // 3
   "yellow/knife.wav",   // 4
   "yellow/knife1.wav"   // 5
}

static const Blood[][] =
{
   "sprites/blood.spr",
   "sprites/bloodspray.spr"
}
static g_Blood[sizeof Blood]
static g_Item_Knife
static bool:Knife[33]


public plugin_init()
{
   register_plugin(NAME, VERSION, AUTHOR)
   
   g_Item_Knife = zv_register_extra_item(KNIFE_NAME, "Mana de fier", KNIFE_COST, ZV_TEAM_HUMAN)
   
   register_event("CurWeapon", "ChangeModel", "be", "1=1")
   RegisterHam(Ham_TakeDamage, "player", "TakeDamage_Pre", 0)
   RegisterHam(Ham_TakeDamage, "player", "TakeDamage_Post", 1)
   RegisterHam(Ham_Player_PreThink, "player", "PreThink")
   register_forward(FM_EmitSound, "KnifeSound")
}
public zp_user_infected_post(id) Knife[id] = false
public zv_extra_item_selected(id, itemid)
{
   if(itemid == g_Item_Knife)

      engclient_cmd(id, "weapon_knife")
      Knife[id] = true
      change(id)
   }


public ChangeModel(id)
{
   if(!is_user_alive(id) || zp_get_user_zombie(id))
      return
      
   static weaponid
   weaponid = read_data(2)
   
   if(!Knife[id] || weaponid != CSW_KNIFE)
      return
      
   change(id)
}

public KnifeSound(id, channel, sample[], Float:volume, Float:attn, flags, pitch)
{
   if(!equal(sample, "weapons/knife_", 14) || !Knife[id])
      return FMRES_IGNORED
         
   if(equal(sample[8], "knife_hitwall", 13))
      PlaySound(id, 1)   
   else
   if(equal(sample[8], "knife_hit", 9))
      switch(random(2))
      {
         case 0:PlaySound(id, 4)
         case 1:PlaySound(id, 5)
      }      
   if(equal(sample[8], "knife_slash", 11)) PlaySound(id, 2)
   if(equal(sample[8], "knife_stab", 10)) PlaySound(id, 3)
   if(equal(sample[8], "knife_deploy", 12)) PlaySound(id, 0)
   return FMRES_SUPERCEDE
}

public TakeDamage_Pre(victim, inflictor, attacker, Float:damage, damagetype)
{
   if(!is_user_alive(attacker))
   return HAM_IGNORED
      
   if(!Knife[attacker] || get_user_weapon(attacker) != CSW_KNIFE)
    return HAM_IGNORED
   
   new hit, target
   get_user_aiming(attacker, target, hit)

   new bool:head = (hit == HIT_HEAD)
   new Float:mult_dmg = 1.0
   if(pev(attacker, pev_button, IN_ATTACK))
      mult_dmg = head ? PRIM_HEAD_DMG : PRIM_DMG
   else
      mult_dmg = head ? SEC_HEAD_DMG : SEC_DMG
   SetHamParamFloat(4, damage * mult_dmg)
   return HAM_HANDLED
}

public TakeDamage_Post(victim, inflictor, attacker, Float:damage, damagetype)
{
   if(!is_user_alive(attacker) || !is_user_alive(victim))
   return HAM_IGNORED
      
   if(!Knife[attacker] || get_user_weapon(attacker) != CSW_KNIFE)
    return HAM_IGNORED
      
   new Float:Origin[3], Float:Origin2[3], Float:Velocity[3]
   pev(attacker, pev_origin, Origin)
   pev(victim, pev_origin, Origin2)
   xs_vec_sub(Origin2, Origin, Velocity)
   xs_vec_normalize(Velocity, Velocity)
   xs_vec_mul_scalar(Velocity, (KNIFE_KNOCK * 100.0), Velocity)
   if(Velocity[2] <= 100.0)
      Velocity[2] = random_float(150.0, 250.0)
   message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
   write_byte(TE_BLOODSPRITE);
   engfunc(EngFunc_WriteCoord, Origin2[0])
   engfunc(EngFunc_WriteCoord, Origin2[1])
   engfunc(EngFunc_WriteCoord, Origin2[2])
   write_short(g_Blood[0])
   write_short(g_Blood[1])
   write_byte(77)
   write_byte(BLOOD)
   message_end()
   set_pev(victim, pev_velocity, Velocity)
   return HAM_HANDLED
}

public PreThink(id)
{
   if(!is_user_alive(id)) return HAM_IGNORED
   if(!Knife[id]) return HAM_IGNORED
   if(get_user_weapon(id) != CSW_KNIFE)
   {
      set_pev(id, pev_gravity, get_cvar_float("zp_human_gravity"))
      return HAM_IGNORED
   }
   set_pev(id, pev_gravity, KNIFE_GRAVITY)
   return HAM_HANDLED
}

public plugin_precache()
{
   precache_model(v_knife)
   precache_model(p_knife)
   
   static i
   for(i = 0; i <= charsmax(SoundList); i++)
      precache_sound(SoundList[i])
      
   for(i = 0; i <= charsmax(Blood); i++)
      g_Blood[i] = precache_model(Blood[i])
}

change(id)
{
   set_pev(id, pev_viewmodel2, v_knife)
   set_pev(id, pev_weaponmodel2, p_knife)
}


stock PlaySound(Ent, Sound)
   engfunc(EngFunc_EmitSound, Ent, CHAN_WEAPON, SoundList[_:Sound], VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
   
stock is_user_admin(id)
{
   new __flags=get_user_flags(id);
   return (__flags>0 && !(__flags&ADMIN_USER));
}


 
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
*/


Contact Skype | zm.bodo
Grup Facebook | CSRO 2k17+
0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
destroi112

[DEV]



Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042, Topics: 119
Location: ---------

Reputation: 515.9
Votes: 118

   
Post Posted: 20-02-2015, 14:13:52 | Translate post to: ... (Click for more languages)

Done
Spoiler:



Retired from Amxmodx

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

[1+1=69]



Status: Offline
(since 22-04-2022 11:29)
Joined: 03 Jun 2014
Posts: 1620, Topics: 213
Location: Bucuresti

Reputation: 87.1
Votes: 276

   
Post Posted: 20-02-2015, 15:02:02 | Translate post to: ... (Click for more languages)

nu o sa-ti mearga pluginu,l-am avut si eu mai de mult si nu aparea...
0 0
  
Back to top
View user's profile Send private message
zp.Bodo

[Creep]



Status: Offline
(since 17-11-2019 13:51)
Joined: 15 Jun 2014
Posts: 663, Topics: 166
Location: Romania

Reputation: 548.2
Votes: 20

       
Post Posted: 20-02-2015, 15:26:09 | Translate post to: ... (Click for more languages)

nu dispare...
daca se poate sa puneti un cvar sa fie o singura runda sau cumva cand te infecteaza sa iti dispare


Contact Skype | zm.bodo
Grup Facebook | CSRO 2k17+
0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
destroi112

[DEV]



Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042, Topics: 119
Location: ---------

Reputation: 515.9
Votes: 118

   
Post Posted: 20-02-2015, 16:35:07 | Translate post to: ... (Click for more languages)

Try -->
Spoiler:



Retired from Amxmodx



Last edited by destroi112 on 20-02-2015, 19:34:45; edited 1 time in total
0 0
  
Back to top
View user's profile Send private message
zp.Bodo

[Creep]



Status: Offline
(since 17-11-2019 13:51)
Joined: 15 Jun 2014
Posts: 663, Topics: 166
Location: Romania

Reputation: 548.2
Votes: 20

       
Post Posted: 20-02-2015, 19:29:24 | Translate post to: ... (Click for more languages)

nu merge destroi, acum nu mai merge arma, nu mai arata nici model si nu mai da nici damage

Contact Skype | zm.bodo
Grup Facebook | CSRO 2k17+
0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
destroi112

[DEV]



Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042, Topics: 119
Location: ---------

Reputation: 515.9
Votes: 118

   
Post Posted: 20-02-2015, 19:35:18 | Translate post to: ... (Click for more languages)

Greseala mea ...
Spoiler:

Acum ar trebui la spawn sa ii stearga arma



Retired from Amxmodx

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

[Creep]



Status: Offline
(since 17-11-2019 13:51)
Joined: 15 Jun 2014
Posts: 663, Topics: 166
Location: Romania

Reputation: 548.2
Votes: 20

       
Post Posted: 20-02-2015, 20:02:18 | Translate post to: ... (Click for more languages)

Respect destroi, functioneaza -
Multumesc. Puteti da T/c


Contact Skype | zm.bodo
Grup Facebook | CSRO 2k17+
0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
destroi112

[DEV]



Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042, Topics: 119
Location: ---------

Reputation: 515.9
Votes: 118

   
Post Posted: 20-02-2015, 20:09:12 | Translate post to: ... (Click for more languages)

God Bless Roumania ,mai aveam putin si ma bateam singur !


Retired from Amxmodx

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

Locked by -P!C@-, 21 February 2015 07:19



 
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) -> Plugins - Help / Support  


The time now is 03-08-2025, 11:49:41
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password