Raised This Month: $ Target: $400
 0% 

omg i don't undersand this


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nightfall1
Senior Member
Join Date: Aug 2008
Old 06-10-2010 , 05:21   omg i don't undersand this
Reply With Quote #1

frist code
PHP Code:
public fw_TakeDamage(victiminflictorattackerFloat:damagedamagebits)
{

    new 
attacker
    
new weapon get_user_weapon(attacker)
    if (
weapon == CSW_DEAGLE)
    {
        
SetHamParamFloat(4damage get_pcvar_num(toggle_dmg))
    }
        
    return 
HAM_IGNORED;

Next try....
PHP Code:
public fw_TakeDamage(victiminflictorattackerFloat:damagedamagebits)
{  
    if (
get_user_weapon(attacker) == CSW_DEAGLE)
    {
        
SetHamParamFloat(4damage get_pcvar_float(toggle_dmg))
        return 
HAM_IGNORED;
    }
    return 
HAM_IGNORED;

Friend Code
PHP Code:
public fw_TakeDamage(victiminflictorattackerFloat:damagedamagebits)
{  
    if (
get_user_weapon(attacker) == CSW_DEAGLE)
    {
        
SetHamParamFloat(4, ( damage *= get_pcvar_floattoggle_dmg ) ) )
        return 
HAM_IGNORED;
    }
    return 
HAM_IGNORED;


DMG NOT WORK
HELP MY

__________________
SIGNATURE

Last edited by Nightfall1; 06-10-2010 at 05:38.
Nightfall1 is offline
Brreaker
Senior Member
Join Date: Oct 2009
Location: Constanta, Romania
Old 06-10-2010 , 05:29   Re: omg i don't undersand this
Reply With Quote #2

PHP Code:
public fw_TakeDamage(victiminflictorattackerFloat:damagedamagebits)
{  
    if (
get_user_weapon(attacker) == CSW_DEAGLE)
    {
        
SetHamParamFloat(4, ( damage *= get_pcvar_floattoggle_dmg ) ) )
        return 
HAM_IGNORED;
    }
    return 
HAM_IGNORED;

This works because damage*=get_pcvar_float means
PHP Code:
damage damage get_pcvar_floattoggle_dmg 
You are just setting the value for the "damage" variable, but you don't assign it
__________________
There are 10 kinds of people.Those who understand binary, and those who don't.
Also, for those who understand binary, there is a donation tab too!
No steam || PM support!
Brreaker is offline
Send a message via MSN to Brreaker Send a message via Yahoo to Brreaker
Nightfall1
Senior Member
Join Date: Aug 2008
Old 06-10-2010 , 05:30   Re: omg i don't undersand this
Reply With Quote #3

si in romana ca nu inteleg ce am facut
PS: IT NOT WORK
wash spelling mistake
__________________
SIGNATURE

Last edited by Nightfall1; 06-10-2010 at 05:40.
Nightfall1 is offline
Brreaker
Senior Member
Join Date: Oct 2009
Location: Constanta, Romania
Old 06-10-2010 , 05:53   Re: omg i don't undersand this
Reply With Quote #4

[ro]

Deci forwardul ala are declarata variabila damage, care tine damage-ul facut de acea arma.Pentru a modifica damage de ex poti scrie
PHP Code:
damage 100 
si astfel, arma va face 100 damage.
In codul tau, doar ai calculat cat damage sa faca, dar nu i-ai spus programului sa puna valoarea obtinuta la variabila DAMAGE.
De aceea cand prietenul tau a pus damage *= get_pcvar_Float
i-a spus programului ca
PHP Code:
damage damage get_pcvar_float etc 
unde:
PHP Code:
//variabila = valoarea variabilei * valoarea cvarului
damage damage get_pcvar_float etc 
sper ca ai inteles
__________________
There are 10 kinds of people.Those who understand binary, and those who don't.
Also, for those who understand binary, there is a donation tab too!
No steam || PM support!
Brreaker is offline
Send a message via MSN to Brreaker Send a message via Yahoo to Brreaker
unnyquee
Senior Member
Join Date: Jun 2009
Location: Constanta, Romania
Old 06-10-2010 , 05:56   Re: omg i don't undersand this
Reply With Quote #5

[ro]
@ Brreaker: damage-ul e Float, nu Int.
Şi treaba cu damage-ul din damage = damage * get_pcvar_float( etc ) nu prea are treabă.

@ Nightfall1: mai bine postează īn forumul multi-lingvistic, decāt să te chinui atāt cu engleza.

[en]
Nothing important .

PHP Code:
public fw_TakeDamagevictiminflictorattackerFloat:damagedamagebits )
{
      if( 
get_user_weaponattacker ) == CSW_DEAGLE )
      {
            
SetHamParamFloat4damage get_pcvar_floattoggle_dmg ) );

            return 
HAM_HANDLED;
      }

      return 
HAM_IGNORED;

__________________

Last edited by unnyquee; 06-10-2010 at 06:00.
unnyquee is offline
Nightfall1
Senior Member
Join Date: Aug 2008
Old 06-10-2010 , 06:00   Re: omg i don't undersand this
Reply With Quote #6

NICI UNU NU MERGE
am pus dmg de 9999, se imulteste dmg deagalului cu 9999 tot acelsi dmg, nu se scimba
__________________
SIGNATURE
Nightfall1 is offline
unnyquee
Senior Member
Join Date: Jun 2009
Location: Constanta, Romania
Old 06-10-2010 , 06:04   Re: omg i don't undersand this
Reply With Quote #7

PHP Code:
#include <cstrike>
#include <hamsandwich> 
[ro]
Sper că sunt incluse deja şi că ai īnregistrat forward-ul.

[en]
Nothing important.. again.
__________________

Last edited by unnyquee; 06-10-2010 at 06:07.
unnyquee is offline
Nightfall1
Senior Member
Join Date: Aug 2008
Old 06-10-2010 , 06:13   Re: omg i don't undersand this
Reply With Quote #8

nu cred ca necesita cstrike
oricum vreu acesta plugin cu dmg sa mearga si copilat
Attached Files
File Type: sma Get Plugin or Get Source (tiger_deagle.sma - 106 views - 2.2 KB)
__________________
SIGNATURE
Nightfall1 is offline
Brreaker
Senior Member
Join Date: Oct 2009
Location: Constanta, Romania
Old 06-10-2010 , 06:40   Re: omg i don't undersand this
Reply With Quote #9

pai merge compilat...
__________________
There are 10 kinds of people.Those who understand binary, and those who don't.
Also, for those who understand binary, there is a donation tab too!
No steam || PM support!
Brreaker is offline
Send a message via MSN to Brreaker Send a message via Yahoo to Brreaker
Nightfall1
Senior Member
Join Date: Aug 2008
Old 06-10-2010 , 06:41   Re: omg i don't undersand this
Reply With Quote #10

Plugin failed to compile! Please try contacting the author.Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

/home/groups/alliedmodders/forums/files/4/1/3/7/2/67451.attach(8 : error 010: invalid function or declaration

1 Error.
Could not locate output file /home/groups/amxmodx/public_html/compiled3/67451.amx (compile failed).
__________________
SIGNATURE
Nightfall1 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 11:13.


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