Raised This Month: $51 Target: $400
 12% 

[ZP] Extra Item : No Recoil


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MilisyaTechlo
Member
Join Date: Feb 2011
Location: South Korea
Old 03-07-2011 , 09:21   [ZP] Extra Item : No Recoil
Reply With Quote #1

If this is already exits, i will delete this post if it is possible.

PHP Code:
/*
[ZP] 추가 아이템 : 무반동
가격: 5 Point
팀 : 인간
Credit:
Stewie! : 무반동 코드 참조했습니다.
MeRcyLeZZ : 예제참고
*/
 
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <zombieplague>
#define NO_RECOIL_WEAPONS_BITSUM (1<<2|1<<CSW_KNIFE|1<<CSW_HEGRENADE|1<<CSW_FLASHBANG|1<<CSW_SMOKEGRENADE|1<<CSW_C4)
 
new g_itemcode
 
public plugin_init()
{
 
register_plugin("[ZP] Extra Items : No Recoil""0.1""BW-Chocolate")
 
 
g_itemcode zp_register_extra_item("No Recoil"5ZP_TEAM_HUMAN)
     new 
szWeapon[33];
     for(new 
i=CSW_P228i<=CSW_P90i++)
     {
         if(!(
NO_RECOIL_WEAPONS_BITSUM & (1<<i)) && get_weaponname(iszWeapon19))
         {
             
RegisterHam(Ham_Weapon_PrimaryAttackszWeapon"fwdPrimaryAttack"1);
         }
    }
}
 
public 
zp_extra_item_selected(playeritemid)
{
 
 if (
itemid == g_itemcode)
 
  
client_print(playerprint_chat"[ZP] You are now No Recoil!")
}
 
public 
fwdPrimaryAttack(ent)
{
     static 
id;
     
id pev(entpev_owner);
 
     
set_pev(idpev_punchangleFloat:{0.00.00.0});


Last edited by MilisyaTechlo; 03-07-2011 at 10:33.
MilisyaTechlo is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 03-07-2011 , 09:37   Re: [ZP] Extra Item : No Recoil
Reply With Quote #2

this is already exits And you cant delete post
Also WTF
client_print(player, print_chat, "[ZP] 지금 무반동 상태입니다!!")
.Dare Devil. is offline
MilisyaTechlo
Member
Join Date: Feb 2011
Location: South Korea
Old 03-07-2011 , 10:33   Re: [ZP] Extra Item : No Recoil
Reply With Quote #3

Quote:
Originally Posted by .Dare Devil. View Post
this is already exits And you cant delete post
Also WTF
client_print(player, print_chat, "[ZP] 지금 무반동 상태입니다!!")
Sorry to that. I will translation to english now.
MilisyaTechlo is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 03-07-2011 , 10:58   Re: [ZP] Extra Item : No Recoil
Reply With Quote #4

Quote:
Originally Posted by MilisyaTechlo View Post
Sorry to that. I will translation to english now.
Thanks.
.Dare Devil. is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 03-08-2011 , 18:23   Re: [ZP] Extra Item : No Recoil
Reply With Quote #5

Actually that doesn't give you No-Recoil.

It gives No-Recoil for everybody.
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
MilisyaTechlo
Member
Join Date: Feb 2011
Location: South Korea
Old 03-08-2011 , 23:05   Re: [ZP] Extra Item : No Recoil
Reply With Quote #6

Quote:
Originally Posted by meTaLiCroSS View Post
Actually that doesn't give you No-Recoil.

It gives No-Recoil for everybody.
so do i this?

PHP Code:
public zp_extra_item_selected(playeritemid)
{
 
 if (
itemid == g_itemcode)
 
  
client_print(playerprint_chat"[ZP] You are now No Recoil!")
}
 
public 
fwdPrimaryAttack(ent)
{
     
set_pev(playerpev_punchangleFloat:{0.00.00.0});


Last edited by MilisyaTechlo; 03-08-2011 at 23:08.
MilisyaTechlo is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 03-09-2011 , 10:29   Re: [ZP] Extra Item : No Recoil
Reply With Quote #7

PHP Code:
public zp_extra_item_selected(playeritemid)
{
 
 if (
itemid == g_itemcode)
 
  
client_print(playerprint_chat"[ZP] You are now No Recoil!")
}
 
public 
fwdPrimaryAttack(ent)
{
     
set_pev(playerpev_punchangleFloat:{0.00.00.0});


PHP Code:
public zp_extra_item_selected(playeritemid)
{
 
if (
itemid == g_itemcode)
 
client_print(playerprint_chat"[ZP] You are now No Recoil!")
}
 
public 
fwdPrimaryAttack(ent)
{
if (
itemid == g_itemcode)
 
set_pev(playerpev_punchangleFloat:{0.00.00.0});

.Dare Devil. is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 03-09-2011 , 15:17   Re: [ZP] Extra Item : No Recoil
Reply With Quote #8

Quote:
Originally Posted by .Dare Devil. View Post
PHP Code:
public zp_extra_item_selected(playeritemid)
{
 
 if (
itemid == g_itemcode)
 
  
client_print(playerprint_chat"[ZP] You are now No Recoil!")
}
 
public 
fwdPrimaryAttack(ent)
{
     
set_pev(playerpev_punchangleFloat:{0.00.00.0});


PHP Code:
public zp_extra_item_selected(playeritemid)
{
 
if (
itemid == g_itemcode)
 
client_print(playerprint_chat"[ZP] You are now No Recoil!")
}
 
public 
fwdPrimaryAttack(ent)
{
if (
itemid == g_itemcode)
 
set_pev(playerpev_punchangleFloat:{0.00.00.0});

No lol, you should create an array, why did you think that wil works? Gimme a reason and I will correct you.
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 03-09-2011 , 15:41   Re: [ZP] Extra Item : No Recoil
Reply With Quote #9

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <zombieplague>
#define MAXPLAYERS  32
 
new g_itemcode
new bool:g_HasRecoil[33]
new 
g_MaxPlayers
new Float:gPAngle[3] = { 0.00.00.0 }
 
public 
plugin_init()
{
 
register_plugin("[ZP] Extra Items : No Recoil""0.1""BW-Chocolate")
 
 
g_itemcode zp_register_extra_item("No Recoil"5ZP_TEAM_HUMAN)
 
g_MaxPlayers get_maxplayers()
 
public 
zp_extra_item_selected(playeritemid)
{
 
 if (
itemid == g_itemcode)
 
 
client_print(playerprint_chat"[ZP] You are now No Recoil!")
 
g_HasRecoil[player] = true;
}
 
public 
server_frame()
{
    for ( new 
id 1id <= g_MaxPlayersid++ )         
    {
        if ( 
is_user_alive(id) && g_HasRecoil[id] )
            
set_pev(idpev_punchanglegPAngle);
 }

.Dare Devil. is offline
AfteR.
Veteran Member
Join Date: Dec 2008
Location: λ
Old 03-09-2011 , 15:51   Re: [ZP] Extra Item : No Recoil
Reply With Quote #10

Bug bug bug.

Player would still have no-recoil when round-ends with that code. Hook round-end. server_frame() sucks.
AfteR. 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 10:24.


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