Raised This Month: $ Target: $400
 0% 

nO clip.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zirualas
Senior Member
Join Date: Jun 2010
Location: Lithuania
Old 07-30-2010 , 04:23   nO clip.
Reply With Quote #1

How i can do no clip for 5 seconds etc. I write
PHP Code:
    case 4:
    {
        if( 
is_user_aliveid ) )
        {
        
set_user_noclipid);
        }
    } 
What i need add to no clip end after 5 seconds
zirualas is offline
Send a message via Skype™ to zirualas
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 07-30-2010 , 05:13   Re: nO clip.
Reply With Quote #2

set_task
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
zirualas
Senior Member
Join Date: Jun 2010
Location: Lithuania
Old 07-30-2010 , 06:06   Re: nO clip.
Reply With Quote #3

Can give me example?
I need type like this?
case 4:
{
if( is_user_alive( id ) )
{
set_user_noclip( id, 1 );
set_task(5, set_user_noclip(id, 0));
}
}
zirualas is offline
Send a message via Skype™ to zirualas
zirualas
Senior Member
Join Date: Jun 2010
Location: Lithuania
Old 07-30-2010 , 06:06   Re: nO clip.
Reply With Quote #4

Can give me example?
I need type like this?
PHP Code:
    case 4:
    {
        if( 
is_user_aliveid ) )
        {
        
set_user_noclipid);
        
set_task(5set_user_noclip(id0));
        }
    } 
Sorry for 2 post
zirualas is offline
Send a message via Skype™ to zirualas
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 07-30-2010 , 07:43   Re: nO clip.
Reply With Quote #5

PHP Code:
case 4:
{
    if(
is_user_alive(id))
    {
        
set_user_noclip(id1);
        
set_task(5.0"reset_noclip"id);
    }
}

public 
reset_noclip(id)
{
    if(
is_user_alive(id))
        
set_user_noclip(id0);

__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
zirualas
Senior Member
Join Date: Jun 2010
Location: Lithuania
Old 07-30-2010 , 07:55   Re: nO clip.
Reply With Quote #6

And i have this error.
PHP Code:

//// prikolas.sma
// C:\Program Files\Counter-strike\cstrike\addons\amxmodx\scripting\prikolas.sma
(61) : warning 217loose indentation
// C:\Program Files\Counter-strike\cstrike\addons\amxmodx\scripting\prikolas.sma
(61) : error 014invalid statementnot in switch
// C:\Program Files\Counter-strike\cstrike\addons\amxmodx\scripting\prikolas.sma
(61) : warning 215expression has no effect
// C:\Program Files\Counter-strike\cstrike\addons\amxmodx\scripting\prikolas.sma
(61) : error 001expected token";"but found ":"
// C:\Program Files\Counter-strike\cstrike\addons\amxmodx\scripting\prikolas.sma
(61) : error 029invalid expressionassumed zero
// C:\Program Files\Counter-strike\cstrike\addons\amxmodx\scripting\prikolas.sma
(61) : fatal error 107too many error messages on one line
//
// Compilation aborted.
// 4 Errors.
// Could not locate output file C:\Program Files\Counter-strike\cstrike\addons\a
mxmodx\scripting\compiled\prikolas.amx (compile failed). 
zirualas is offline
Send a message via Skype™ to zirualas
Vechta
Veteran Member
Join Date: Jun 2010
Old 07-30-2010 , 08:13   Re: nO clip.
Reply With Quote #7

show whole code
Vechta is offline
zirualas
Senior Member
Join Date: Jun 2010
Location: Lithuania
Old 07-30-2010 , 08:30   Re: nO clip.
Reply With Quote #8

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

public plugin_init()
{
    
register_clcmd"say /vipmenu""VIPMenu" );
    
register_clcmd"say_team /vipmenu""VIPMenu" );
}

public 
VIPMenuid )
{
    new 
vip_menu menu_create"\rVip meniu:""menu_handler" );
    
menu_additemvip_menu"\wMax health and Ap""1");
    
menu_additemvip_menu"\wGive USP""2");
    
menu_additemvip_menu"\wLow gravity""3"0);
    
menu_additemvip_menu"\rNo clip!""4"0);
    
menu_additemvip_menu"\g+2500 money!""5"0)
    
    
menu_setpropvip_menuMPROP_EXITMEXIT_ALL );
    
menu_displayidvip_menu);
}

public 
menu_handleridmenuitem )
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroymenu );
        return 
PLUGIN_HANDLED;
    }
    new 
data[6], iName[64];
    new 
accesscallback;
    
    
menu_item_getinfomenuitemaccessdata,5iName63callback );
    new 
key str_to_numdata );
    switch( 
key )
    {
        case 
1:
        {
            if( 
is_user_aliveid ) )
            {
                
set_user_healthid255 ); //Sets health of id to 150
                
set_user_armorid255 ); //Sets armor of id to 200
            
}
        }
        case 
2:
        {
            if( 
is_user_aliveid ) )
            {
                
give_itemid"weapon_usp" ); //Gives id a USP
                
give_itemid"ammo_45acp" ); //Gives id USP ammo
            
}
        }
    case 
3:
    {
        if( 
is_user_aliveid ) )
        {
            
set_user_gravityid0.6 );
        }
    case 
4:
    {
            if(
is_user_alive(id))
            {
            
set_user_noclip(id1);
            
set_task(5.0"reset_noclip"id);
            }    
    }

    public 
reset_noclip(id)
    {
            if(
is_user_alive(id))
            
set_user_noclip(id0);
    }  
    case 
5:
    {
        if( 
is_user_aliveid ) )
        {
        
cs_set_user_money(idcs_get_user_money(id) + 2500);
        }
    }    
    }
    
    
menu_destroymenu );
    return 
PLUGIN_HANDLED;

zirualas is offline
Send a message via Skype™ to zirualas
Vechta
Veteran Member
Join Date: Jun 2010
Old 07-30-2010 , 08:47   Re: nO clip.
Reply With Quote #9

Code:
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <engine>

public plugin_init()
{
    	register_clcmd( "say /vipmenu", "VIPMenu" );
    	register_clcmd( "say_team /vipmenu", "VIPMenu" );
}

public VIPMenu( id )
{
    new vip_menu = menu_create( "\rVip meniu:", "menu_handler" );
    menu_additem( vip_menu, "\wMax health and Ap", "1", 0 );
    menu_additem( vip_menu, "\wGive USP", "2", 0 );
    menu_additem( vip_menu, "\wLow gravity", "3", 0);
    menu_additem( vip_menu, "\rNo clip!", "4", 0);
    menu_additem( vip_menu, "\g+2500 money!", "5", 0)
    
    menu_setprop( vip_menu, MPROP_EXIT, MEXIT_ALL );
    menu_display( id, vip_menu, 0 );
}

public menu_handler( id, menu, item )
{
    	if( item == MENU_EXIT )
    	{
        	menu_destroy( menu );
        	return PLUGIN_HANDLED;
    	}
    	new data[6], iName[64];
    	new access, callback;
    
    	menu_item_getinfo( menu, item, access, data,5, iName, 63, callback );
    	new key = str_to_num( data );
    	switch( key )
    	{
        	case 1:
        	{
            		if( is_user_alive( id ) )
            		{
                		set_user_health( id, 255 ); //Sets health of id to 150
                		set_user_armor( id, 255 ); //Sets armor of id to 200
            		}
        	}
        	case 2:
        	{
            		if( is_user_alive( id ) )
            		{
                		give_item( id, "weapon_usp" ); //Gives id a USP
                		give_item( id, "ammo_45acp" ); //Gives id USP ammo
            		}
        	}
    		case 3:
    		{
        		if( is_user_alive( id ) )
        		{
            			set_user_gravity( id, 0.6 );
			}
        	}
    		case 4:
    		{
            		if(is_user_alive(id))
            		{
            			set_user_noclip(id, 1);
            			set_task(5.0, "reset_noclip", id);
            		}    
    		}  
    		case 5:
    		{
        		if( is_user_alive( id ) )
        		{
        			cs_set_user_money(id, cs_get_user_money(id) + 2500);
        		}
    		}    
    	}  
   	menu_destroy( menu );
    	return PLUGIN_HANDLED;
}

public reset_noclip(id)
{
	if(is_user_alive(id))
	set_user_noclip(id, 0);
}
Vechta is offline
zirualas
Senior Member
Join Date: Jun 2010
Location: Lithuania
Old 07-30-2010 , 08:52   Re: nO clip.
Reply With Quote #10

Thx.
One more question. How i can show how much time he's left in colip mode? Like Superhero mod "NightCrawrler"
zirualas is offline
Send a message via Skype™ to zirualas
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 00:18.


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