Raised This Month: $ Target: $400
 0% 

Level


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 11-20-2009 , 22:22   Re: Level
Reply With Quote #1

PHP Code:
#include <amxmodx> 
#include <fun>

#define GRENADE_INTERVAL 1
#define AK47_INTERVAL 2
#define M4A1_INTERVAL 3

new MyGlobalVar33 ]

public 
plugin_init( ) 
{
        
register_plugin"kills level""1.0""ASD" )
        
register_event"DeathMsg""Event_PlayerKilled""a" )
}

public 
Event_PlayerKilled( )
{
     new 
Killer read_data)
     
MyGlobalVarKiller ]++;

     if ( 
MyGlobalVarKiller ] % == // not necessary for an if statement since this will always be true since ANYTHING % 1 always equals 0
     
{
          
give_itemKiller"weapon_hegrenade" )
     }

     if ( 
MyGlobalVarKiller ] % == )
     {
          
give_itemKiller"weapon_ak47" )
     }

     if ( 
MyGlobalVarKiller ] % == )
     {
          
give_itemKiller"weapon_m4a1" )
     } 

__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
zombieplague
Veteran Member
Join Date: Apr 2009
Old 11-20-2009 , 22:57   Re: Level
Reply With Quote #2

Quote:
Originally Posted by Exolent[jNr] View Post
PHP Code:
#include <amxmodx> 
#include <fun>
 
#define GRENADE_INTERVAL 1
#define AK47_INTERVAL 2
#define M4A1_INTERVAL 3
 
new MyGlobalVar33 ]
 
public 
plugin_init( ) 
{
        
register_plugin"kills level""1.0""ASD" )
        
register_event"DeathMsg""Event_PlayerKilled""a" )
}
 
public 
Event_PlayerKilled( )
{
     new 
Killer read_data)
     
MyGlobalVarKiller ]++;
 
     if ( 
MyGlobalVarKiller ] % == // not necessary for an if statement since this will always be true since ANYTHING % 1 always equals 0
     
{
          
give_itemKiller"weapon_hegrenade" )
     }
 
     if ( 
MyGlobalVarKiller ] % == )
     {
          
give_itemKiller"weapon_ak47" )
     }
 
     if ( 
MyGlobalVarKiller ] % == )
     {
          
give_itemKiller"weapon_m4a1" )
     } 

I was trying to do a skill. But how do i make it stop functioning when it reach to 3 kills ?
zombieplague 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 13:38.


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