Raised This Month: $ Target: $400
 0% 

Nothing happens!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nur56
Member
Join Date: Apr 2007
Old 03-02-2009 , 10:05   Nothing happens!
Reply With Quote #1

PHP Code:
/*
This plugin was made by CoLa^ also known as Nur5,Nur56 and T-Bag, this plugin was made with help from Reality Paintball
for the Flash Light effect, I thank the maker of R Paintball for it.

CVars:

amx_home 1/0  Triggers the plugin, effect is on next round, Defaults 1

I would also like to thank the maker of ColorChat include.

Have Fun!!
*/


#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <colorchat>
#include <engine>

#define PLUGIN "HomeFree"
#define VERSION "1.0"
#define AUTHOR "CoLa"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_cvar("amx_home","1")
    
register_logevent("RoundStart",2,"0=World triggered""1=Round_Start")
}



public 
RoundStart(id) {
    
    new 
CsTeams:teams cs_get_user_team(id)
    if(
get_cvar_num("amx_home") > 0) {
        
HomeFree(id)
        
        
strip_user_weapons(0)
        switch(
teams) {
            case 
1:
            {
                
                
give_item(id,"weapon_knife")
                
ColorChat(id,BLUE,"[HomeFree]^x03YOU CAN SPRINT BY RIGHT CLICKING KNIFE!")
                
ColorChat(id,RED,"[HomeFree]^x03YOU CAN SLOW FALL IN THE AIR BY PRESSING AND HOLDING E!!!")
            }
            
            case 
2:
            {
                
ColorChat(id,BLUE,"^x03Kill all the T's in 5 minutes, they have advantages so beware!")
                
give_item(id,"weapon_knife")
                
give_item(id,"weapon_hegrenade")
            }
        }
        
        
ColorChat(0,RED,"[HomeFree!!!]^x04Get ^x03Ready ^x01To ^x03PLAAAAAAAAAAAAAAAAY!")
        
    }
    
    if(
get_cvar_num("amx_home") <= 0) {
        return 
PLUGIN_HANDLED
    
}
    
    return 
PLUGIN_CONTINUE
}


public 
HomeFree(id) {
    
    new 
weapon get_user_weapon(id)
    new 
CsTeams:teams cs_get_user_team(id)
    switch(
teams) {
        case 
1: {
            if(
weapon == CSW_KNIFE) {
                while(
get_user_button(id) & IN_ATTACK2) {
                    
message_begin(MSG_ONE,get_user_msgid("FlashBat"),{0,0,0},id)
                    
write_byte(100)
                    
message_end()
                    
set_user_maxspeed(id,-5)
                }
                
            }
            
set_user_health(id,200)
            while(
get_user_button(id) & IN_USE) {
                
set_user_gravity(id,-2.66666667)
            }
            
        }
        
        case 
2: {
            
            
set_user_health(id,120)
            
        }
        
    }
    
    return 
PLUGIN_CONTINUE


no matter how hard i try NOTHING happens, I even tried replacing round start with a say /go command, still nothing

Please help.
Nur56 is offline
padilha007
Senior Member
Join Date: Jul 2008
Old 03-02-2009 , 10:14   Re: Nothing happens!
Reply With Quote #2

PHP Code:
/*
This plugin was made by CoLa^ also known as Nur5,Nur56 and T-Bag, this plugin was made with help from Reality Paintball
for the Flash Light effect, I thank the maker of R Paintball for it.

CVars:

amx_home 1/0  Triggers the plugin, effect is on next round, Defaults 1

I would also like to thank the maker of //ColorChat include.

Have Fun!!
*/


#include <amxmodx>
#include <cstrike>
#include <fun>
#include <colorchat>
#include <engine>

#define PLUGIN "HomeFree"
#define VERSION "1.0"
#define AUTHOR "CoLa"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_cvar("amx_home","1")
    
register_logevent("RoundStart",2,"0=World triggered""1=Round_Start")
}

public 
RoundStart() {

    for(new 
id=0;id <= get_maxplayers();id++)
    {
        if(
is_user_connected(id) && is_user_alive(id))
        {
            new 
CsTeams:teams cs_get_user_team(id)
            if(
get_cvar_num("amx_home") == 1) {
                
HomeFree(id)
                
                
strip_user_weapons(0)
                switch(
teams) {
                    case 
1:
                    {
                        
                        
give_item(id,"weapon_knife")
                        
ColorChat(id,BLUE,"[HomeFree]^x03YOU CAN SPRINT BY RIGHT CLICKING KNIFE!")
                        
ColorChat(id,RED,"[HomeFree]^x03YOU CAN SLOW FALL IN THE AIR BY PRESSING AND HOLDING E!!!")
                    }
                    
                    case 
2:
                    {
                        
ColorChat(id,BLUE,"^x03Kill all the T's in 5 minutes, they have advantages so beware!")
                        
give_item(id,"weapon_knife")
                        
give_item(id,"weapon_hegrenade")
                    }
                }
                
                
ColorChat(0,RED,"[HomeFree!!!]^x04Get ^x03Ready ^x01To ^x03PLAAAAAAAAAAAAAAAAY!")
            }
        }
    }
}

public 
HomeFree(id) {
    
    new 
weapon get_user_weapon(id)
    new 
CsTeams:teams cs_get_user_team(id)
    switch(
teams) {
        case 
1: {
            if(
weapon == CSW_KNIFE) {
                while(
get_user_button(id) & IN_ATTACK2) {
                    
message_begin(MSG_ONE,get_user_msgid("FlashBat"),{0,0,0},id)
                    
write_byte(100)
                    
message_end()
                    
set_user_maxspeed(id, -5.0)
                }
                
            }
            
set_user_health(id,200)
            while(
get_user_button(id) & IN_USE) {
                
set_user_gravity(id,-2.66666667)
            }
            
        }
        
        case 
2: {
            
            
set_user_health(id,120)
            
        }
        
    }
    
    return 
PLUGIN_CONTINUE

__________________


Last edited by padilha007; 03-02-2009 at 10:21.
padilha007 is offline
Nur56
Member
Join Date: Apr 2007
Old 03-02-2009 , 11:19   Re: Nothing happens!
Reply With Quote #3

Still won't work god damit!

PHP Code:

L 03
/02/2009 18:17:09: [FUNPlayer out of range (0)
L 03/02/2009 18:17:09: [AMXXRun time error 10 (plugin "HomeFree.amxx") (native "strip_user_weapons") - debug not enabled!
L 03/02/2009 18:17:09: [AMXXTo enable debug modeadd "debug" after the plugin name in plugins.ini (without quotes). 

This is currently the error i get in server console , maybe it's because im playing alone?
Nur56 is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 03-02-2009 , 13:08   Re: Nothing happens!
Reply With Quote #4

That can't work, though I have no idea how it should work.
Code:
strip_user_weapons(0)
SnoW is offline
Send a message via MSN to SnoW
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 03-02-2009 , 18:17   Re: Nothing happens!
Reply With Quote #5

For future reference, make your thread titles more descriptive and relative to the problem. In this case, it is relative, but you know what I mean.
BOYSplayCS is offline
padilha007
Senior Member
Join Date: Jul 2008
Old 03-02-2009 , 19:11   Re: Nothing happens!
Reply With Quote #6

strip_user_weapons(0)

to:

strip_user_weapons(id)
__________________

padilha007 is offline
Nur56
Member
Join Date: Apr 2007
Old 03-03-2009 , 08:03   Re: Nothing happens!
Reply With Quote #7

IT WORKS! i love you padil, +karma.
Nur56 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 16:51.


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