Raised This Month: $ Target: $400
 0% 

ammopack problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mr.Noobie
BANNED
Join Date: Apr 2009
Old 08-30-2009 , 03:12   ammopack problem
Reply With Quote #1

I have a problem with this plugin. I want nemesis to earn ammo pack for 1 kill same goes to survivor.

PHP Code:
#include <amxmodx>
#include <zombieplague>
 
public plugin_init( )
{
    
register_plugin"Survivor, Nemesis Kill Rewards | End Round Reward""1.0""asd" )
    
register_event"DeathMsg""event_death""a" )
}
public 
event_death( )
{
    static 
attacker
    attacker 
read_data)
 
    if ( !
zp_get_user_survivorattacker ) )
        return;
    if ( !
zp_get_user_nemesisattacker ) )
        return;
 
    
zp_set_user_ammo_packsattackerzp_get_user_ammo_packsattacker ) + )

I know it won't work because both attacker is the same but i try this also didn't work.

PHP Code:
#include <amxmodx>
#include <zombieplague>
public plugin_init( )
{
    
register_plugin"Survivor, Nemesis Kill Rewards | End Round Reward""1.0""asd" )
    
register_event"DeathMsg""event_death""a" )
}
 
public 
event_death( )
{
    static 
attacker
    
static attacker2
    attacker 
read_data)
    
attacker2 read_data)
 
    if ( !
zp_get_user_survivorattacker ) )
        return;
    if ( !
zp_get_user_nemesisattacker2 ) )
        return;
 
    
zp_set_user_ammo_packsattackerzp_get_user_ammo_packsattacker ) + )
    
zp_set_user_ammo_packsattacker2zp_get_user_ammo_packsattacker2 ) + )

Mr.Noobie is offline
Mr.Noobie
BANNED
Join Date: Apr 2009
Old 09-03-2009 , 12:07   Re: ammopack problem
Reply With Quote #2

Help please
Mr.Noobie is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 09-03-2009 , 12:13   Re: ammopack problem
Reply With Quote #3

Don't bump until 2 weeks have passed since last post.

PHP Code:
#include <amxmodx>
#include <zombieplague>
 
public plugin_init( )
{
    
register_plugin"Survivor, Nemesis Kill Rewards | End Round Reward""1.0""asd" )
    
register_event"DeathMsg""event_death""a" )
}
public 
event_death( )
{
    static 
attacker
    attacker 
read_data)
 
    if ( !
zp_get_user_survivorattacker ) && !zp_get_user_nemesisattacker ) )
        return;
 
    
zp_set_user_ammo_packsattackerzp_get_user_ammo_packsattacker ) + )

__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 09-03-2009 , 12:53   Re: ammopack problem
Reply With Quote #4

PHP Code:
if ( !zp_get_user_survivorattacker ) && !zp_get_user_nemesisread_data) ) ) 
__________________
xPaw is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 09-03-2009 , 12:58   Re: ammopack problem
Reply With Quote #5

Quote:
Originally Posted by xPaw View Post
...
I don't know zombie plague scripting enough to know the difference between a nemesis and a survivor.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Old 09-03-2009, 13:07
Exolent[jNr]
This message has been deleted by Exolent[jNr]. Reason: Slow site -.-
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 09-03-2009 , 13:14   Re: ammopack problem
Reply With Quote #7

PHP Code:
#include <amxmodx>
#include <zombieplague>
 
public plugin_init( )
{
    
register_plugin"Survivor, Nemesis Kill Rewards | End Round Reward""1.0""asd" )
    
register_event"DeathMsg""event_death""a" )
}
public 
event_death( )
{
     static 
attacker
     
if ( zp_get_user_survivor( ( attacker read_data) ) ) || zp_get_user_nemesisattacker ) )
          
zp_set_user_ammo_packsattackerzp_get_user_ammo_packsattacker ) + )

SnoW is offline
Send a message via MSN to SnoW
Mr.Noobie
BANNED
Join Date: Apr 2009
Old 09-04-2009 , 06:16   Re: ammopack problem
Reply With Quote #8

Second Problem.

PHP Code:
#include <amxmodx>
#include <zombieplague>
 
new g_pCvarAmmo]
new 
g_iMaxPlayers
 
public plugin_init( )
{
    
register_plugin"End Round Reward""1.0""asd" )
    
g_pCvarAmmo] = register_cvar"humans_ammopack""5" )
    
g_pCvarAmmo] = register_cvar"zombies_ammopack""5" )
 
    
g_iMaxPlayers get_maxplayers( )
}
 
public 
zp_round_endedteam )
{
 for ( new 
1<= g_iMaxPlayersi++ )
 {
  if ( !
is_user_alive) )
   continue
 
  switch ( 
team )
  {
   case 
WIN_HUMANSzp_set_user_ammo_packsizp_get_user_ammo_packs) +get_pcvar_numg_pCvarAmmo] ) )
   case 
WIN_ZOMBIESzp_set_user_ammo_packsizp_get_user_ammo_packs) +get_pcvar_numg_pCvarAmmo] ) )
  }
 }

Sometime it doesn't work.

I want it like if human win at the end round it give them ammo pack
Mr.Noobie is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 09-04-2009 , 07:13   Re: ammopack problem
Reply With Quote #9

Try this
PHP Code:
#include <amxmodx>
#include <zombieplague>
 
new g_pCvarAmmo];
 
public 
plugin_init( ) {
    
register_plugin"End Round Reward""1.0""asd" );
    
    
g_pCvarAmmoWIN_HUMANS ] = register_cvar"humans_ammopack""5" );
    
g_pCvarAmmoWIN_ZOMBIES ] = register_cvar"zombies_ammopack""5" );
}

public 
zp_round_endediTeam ) {
    if( 
iTeam == WIN_NO_ONE )
        return;
    
    new 
idiPlayers32 ], iNumiPacks get_pcvar_numg_pCvarAmmoiTeam ] );
    
get_playersiPlayersiNum"ac" );
    
    for( new 
iiNumi++ ) {
        
zp_set_user_ammo_packs( ( id iPlayers] ),
        
zp_get_user_ammo_packsid ) + iPacks );
    }

__________________

Last edited by xPaw; 09-04-2009 at 08:42.
xPaw is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 09-04-2009 , 08:42   Re: ammopack problem
Reply With Quote #10

Thats wrong snow.. I mean with player
__________________
xPaw 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 15:07.


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