Raised This Month: $ Target: $400
 0% 

My code doens't work :(


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Apokalipsisa
Member
Join Date: May 2012
Old 09-04-2012 , 06:53   My code doens't work :(
Reply With Quote #1

Pls some one give me help.When i plant the bomb i want to slap terrorist after 10 seconds if he is camping.This is my noob code i've made but doesn't work.

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#include <csx>


public plugin_init()
{
    
register_plugin("Plant/Defuse The BOMB","1.0","Apokalipsisa")
}

public 
bomb_planted(id)
{
    
set_task(1.0,"check_defuse_camper")
}

public 
CheckMoving()
{
    static 
iStillCounter[33]
    static 
FloatfVelocity[3]
    
    new 
players[32],numi,id
    get_players
(players,num)
    
    for(
i=0;i<num;i++)
    {
        
id players[i]
        
        if(!
is_user_alive(id)) 
        {
            
pev(id,pev_velocity,fVelocity)
    
            if(
fVelocity[0] || fVelocity[1] || fVelocity[2])
            {
                
iStillCounter[id] = 0
            
}
            else
            {
                if (++
iStillCounter[id] >= 10)
                {
                    
user_slap(id,0)
                }
            }
        }
    }
}

public 
check_defuse_camper()
{
    new 
players[32],numi,id
    get_players
(players,num)
    
    for(
i=0;i<num;i++)
    {
        
id players[i]
        
        if(!
is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_T)
        {
            
set_task(1.0,"CheckMoving"1029 __"b")
        }
    }

Apokalipsisa is offline
 



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 08:10.


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