AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   EXOLENT HELP LEASE (https://forums.alliedmods.net/showthread.php?t=86160)

AlejandroSk 02-21-2009 17:34

EXOLENT HELP LEASE
 
PHP Code:

#include <amxmodx>
#include <zombieplague>

public init(id)

    
        new 
damage read_data(2)
        new 
points[33]
        new 
g_haspoints[33]
        
        if (
damage)
        {
            
set_task(15.0"TaskPoint"id)
            
        }
        
        if (
damage == 500 || damage 500)
        {
            
points[id] = 30
            g_haspoints
[id] = true
            remove_task
(id,1)
            
set_task(15.0"TaskPoint"id)
        }
        
        if ( 
points[id] == 90)
        {
            
zp_set_user_ammo_packs(id,2)
        
        
            
set_hudmessage(0100200, -1.00.5520.14.00.020.027)
            
show_hudmessage(id,"Combo! %i Damage! ,You get 2 Ammo Packs As Reward!  "damage)            
    }
}

public 
plugin_init() {  
   
register_plugin("[ZP] Server Addon: Combo Rewards","0.1","AlejandroSk")  
   
register_event("Damage""init""b""2!0""3=0""4!0"
        } 

Need add a task ( TaskPoint ) that set point of the player to 0 can anyone help e?

Starsailor 02-21-2009 18:03

Re: Can help me please?
 
first put this in the top of the file not in damage event

PHP Code:

new points[33
new 
g_haspoints[33

then add this

PHP Code:

public TaskPoint(id){
        
    
points[id]=0
    g_haspoints
[id]=0



AlejandroSk 02-21-2009 18:23

Re: Can help me please?
 
where i add public TaskPoint ? =(

edit: done thank u +k!

YamiKaitou 02-21-2009 20:23

Re: EXOLENT HELP LEASE
 
As per the Global Forum Rules, you need to have a descriptive topic title. If you wish for this topic to stay open, please correct the topic title before you post again.


All times are GMT -4. The time now is 17:08.

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