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

Subplugin Submission [ZP] Extra Item: Golden Ak - 47 v1.1 Fix


Post New Thread Reply   
 
Thread Tools Display Modes
AlejandroSk
BANNED
Join Date: Nov 2008
Location: Aqui, en mi casa. Karma:
Old 05-04-2009 , 19:24   Re: [ZP] Extra Item: Golden Ak - 47 v0.02
Reply With Quote #21

Thank you alan

Its correct?

Code:
public fw_TakeDamage(victim, inflictor, attacker, Float:damage) {     new Float:dmg = get_pcvar_float(cvar_dmgmultiplier)     if(is_valid_player[attacker])      {         f (get_user_weapon(attacker) == CSW_AK47 && g_HasAk[attacker])         {             SetHamParamFloat(4, damage * dmg)         }     } }
AlejandroSk is offline
Send a message via MSN to AlejandroSk
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-04-2009 , 19:31   Re: [ZP] Extra Item: Golden Ak - 47 v0.02
Reply With Quote #22

Code:
public fw_TakeDamage(victim, inflictor, attacker, Float:damage) {     if ( is_valid_player( attacker ) && get_user_weapon(attacker) == CSW_AK47 && g_HasAk[attacker] )     {         SetHamParamFloat(4, damage * get_pcvar_float( cvar_dmgmultiplier ) )     } }

In checkModel() you should use read_data(1) instead of get_user_weapon()

Last edited by Arkshine; 05-04-2009 at 19:36.
Arkshine is offline
AlejandroSk
BANNED
Join Date: Nov 2008
Location: Aqui, en mi casa. Karma:
Old 05-04-2009 , 19:34   Re: [ZP] Extra Item: Golden Ak - 47 v0.02
Reply With Quote #23

i dont use get_user_attacker() in checkModel , as you can see...

Code:
public checkModel(id) {     if ( zp_get_user_zombie(id) )         return PLUGIN_HANDLED         new szClip, szAmmo     new szWeapID = get_user_weapon( id, szClip, szAmmo )         if ( szWeapID == CSW_AK47 && g_HasAk[id] == true && get_pcvar_num(cvar_custommodel) )     {         set_pev(id, pev_viewmodel2, AK_V_MODEL)         set_pev(id, pev_weaponmodel2, AK_P_MODEL)     }     return PLUGIN_HANDLED }
AlejandroSk is offline
Send a message via MSN to AlejandroSk
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-04-2009 , 19:36   Re: [ZP] Extra Item: Golden Ak - 47 v0.02
Reply With Quote #24

It's a typo. I was meant you use get_user_weapon to retrieve the weaponid, but you can use directly the arg 1 passed with the event. ( see my link ).
Arkshine is offline
Starsailor
horrible hahah
Join Date: Aug 2008
Location: Buenos Aires
Old 05-04-2009 , 20:09   Re: [ZP] Extra Item: Golden Ak - 47 v0.03
Reply With Quote #25

PHP Code:
public checkWeapon(id)
{
    new 
plrClipplrAmmoplrWeap[32]
    new 
plrWeapId
    
    plrWeapId 
get_user_weapon(idplrClipplrAmmo
--->
PHP Code:
    plrWeapId read_data(2
also in public make_tracer


and

PHP Code:
public checkModel(id)
{
    if ( 
zp_get_user_zombie(id) )
        return 
PLUGIN_HANDLED
    
    
new szClipszAmmo
    
new szWeapID get_user_weaponidszClipszAmmo 
--->

PHP Code:
    szWeapId read_data(1
like arkshine's said
__________________
Find my plugins here..

Ex - Spanish Moderator.
Starsailor is offline
AlejandroSk
BANNED
Join Date: Nov 2008
Location: Aqui, en mi casa. Karma:
Old 05-04-2009 , 20:22   Re: [ZP] Extra Item: Golden Ak - 47 v0.03
Reply With Quote #26

Done.
AlejandroSk is offline
Send a message via MSN to AlejandroSk
Starsailor
horrible hahah
Join Date: Aug 2008
Location: Buenos Aires
Old 05-04-2009 , 20:28   Re: [ZP] Extra Item: Golden Ak - 47 v0.03
Reply With Quote #27

in checkmodel you didnt change it
__________________
Find my plugins here..

Ex - Spanish Moderator.
Starsailor is offline
AlejandroSk
BANNED
Join Date: Nov 2008
Location: Aqui, en mi casa. Karma:
Old 05-04-2009 , 20:34   Re: [ZP] Extra Item: Golden Ak - 47 v0.03
Reply With Quote #28

Done.
AlejandroSk is offline
Send a message via MSN to AlejandroSk
Anggara_nothing
Veteran Member
Join Date: Jan 2009
Location: Indonesia
Old 05-05-2009 , 03:48   Re: [ZP] Extra Item: Golden Ak - 47 v0.04
Reply With Quote #29

nice plug-in. good job.
Anggara_nothing is offline
Pach
Senior Member
Join Date: Feb 2009
Location: Russian Federation
Old 05-05-2009 , 08:25   Re: [ZP] Extra Item: Golden Ak - 47 v0.03
Reply With Quote #30

AlejandroSk,
PHP Code:
Plugin failed to compilePlease try contacting the author.
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c1997-2006 ITB CompuPhaseAMX Mod X Team

/home/groups/alliedmodders/forums/files/4/3/8/2/0/41731.attach(35) : fatal error 100cannot read from file"zombieplague"

Compilation aborted.
1 Error
PHP Code:
//// zp_extra_goldenak.sma
// C:\Temp\Server\cstrike\addons\amxmodx\scripting\zp_extra_goldenak.sma(126) :
 
warning 203symbol is never used"szAmmo"
// C:\Temp\Server\cstrike\addons\amxmodx\scripting\zp_extra_goldenak.sma(126) :
 
warning 203symbol is never used"szClip"
// C:\Temp\Server\cstrike\addons\amxmodx\scripting\zp_extra_goldenak.sma(155) :
 
warning 203symbol is never used"plrAmmo"
// C:\Temp\Server\cstrike\addons\amxmodx\scripting\zp_extra_goldenak.sma(203) :
 
error 017undefined symbol "clip"
// C:\Temp\Server\cstrike\addons\amxmodx\scripting\zp_extra_goldenak.sma(235) :
 
error 017undefined symbol "clip"
//
// 2 Errors.
// Could not locate output file compiled\zp_extra_goldenak.amx (compile failed)

__________________
Sorry for my bad English.
Pach is offline
Send a message via ICQ to Pach Send a message via Skype™ to Pach
Reply


Thread Tools
Display Modes

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 07:05.


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