Raised This Month: $ Target: $400
 0% 

semiclip toggle script help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
gsjaggar
Junior Member
Join Date: Nov 2004
Old 12-06-2004 , 05:27   semiclip toggle script help
Reply With Quote #1

okay im trying to write this script for my server because i couldnt find one here that did what i wanted it to do. problem is i have no idea how to script. ive been looking at other peoples scripts and trying to figure it out that way and this is what ive come up with. feel free to make fun of me. im sure its a mess. what im trying to get it to do is allow a player to say /semiclip and that will turn semiclip off that player for 3 seconds then turn back on. any help please?

Code:
#include <amxmodx> #include <amxmisc> #include <fun> #include <engine> new cp_pluginname[] = "Semiclip Toggle" public plugin_init() {     register_plugin(cp_pluginname,"1.0","Hadoken")     register_cvar("cp_semiclip","0")     register_clcmd("semiclip","cp_semiclip",0)     register_clcmd("say /semiclip","cp_semiclip",0) } public cp_semiclip(id) {     if(get_cvar_num("cp_semiclip") == 0)     return PLUGIN_CONTINUE     new name[33]     get_user_name(id,name,32)     entity_set_int(id, EV_INT_solid, SOLID_NOT)     client_print(id,print_chat,"[%s] Your SemiClip Is Now Off",cp_pluginname)     set_task(3.0,"stop_clip",0,id,1)     return PLUGIN_HANDLED } public stop_clip(id) {      new name[33]     get_user_name(id,name,32)     entity_set_int(id, EV_INT_solid, SOLID_BBOX)     client_print(id,print_chat,"[%s] Your Semiclip Is Now On",cp_pluginname)     return PLUGIN_HANDLED }
gsjaggar is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 12-06-2004 , 20:14  
Reply With Quote #2

Change
Code:
set_task(3.0,"stop_clip",0,id,1)
to
Code:
set_task(3.0,"stop_clip",id)
.

Also, you don't need to get the user's name, as it seems you don't use it anywhere.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
|2y@n
New Member
Join Date: Dec 2004
Old 12-06-2004 , 20:21  
Reply With Quote #3

What is SemiClip? is it like noclip?
__________________
|2y@n is offline
Send a message via AIM to |2y@n
gsjaggar
Junior Member
Join Date: Nov 2004
Old 12-06-2004 , 21:11  
Reply With Quote #4

kind of like noclip except you only go through other players. not walls. and all other normal physics still apply gravity and such..
gsjaggar is offline
gsjaggar
Junior Member
Join Date: Nov 2004
Old 12-06-2004 , 21:31  
Reply With Quote #5

omg it works. ty!! i love you so much man. <3 <3 <3
gsjaggar is offline
scottyk87
Junior Member
Join Date: Jun 2004
Old 01-18-2005 , 21:16  
Reply With Quote #6

I tried to get this to work on my server but it wouldent work. Compiled fine but when I typed /semiclip it dident do anything. I am running the kz_multiplugin could this be the problem?
scottyk87 is offline
Send a message via MSN to scottyk87
Sn!per101
Junior Member
Join Date: Apr 2004
Old 01-20-2005 , 20:38  
Reply With Quote #7

Quote:
Originally Posted by scottyk87
I tried to get this to work on my server but it wouldent work. Compiled fine but when I typed /semiclip it dident do anything. I am running the kz_multiplugin could this be the problem?

Thats because you forgot to set the damn CVAR!!! (lol sorry but I had to post this)
Sn!per101 is offline
Raz
Senior Member
Join Date: Jan 2005
Old 01-21-2005 , 18:23  
Reply With Quote #8

sorry for "reviving" this old post, but what is the cvar command, i dont know this stuff so flame me or what not i dont care just tell me it and where it goes exaclty, thanks
Raz is offline
Send a message via AIM to Raz
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 01-21-2005 , 23:55  
Reply With Quote #9

cp_semiclip is the cvar, just like mp_friendlyfire and sv_alltalk. Set it to 1 to enable the plugin.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
scottyk87
Junior Member
Join Date: Jun 2004
Old 01-22-2005 , 21:05  
Reply With Quote #10

Ok well when people type /semiclip it says it changes them back to semicliped but they accually are still solid. I have had some people modify but it still doesn't work right. Sn!per101 took out the cvars for me and tried to fix the problem but it doesn't work.



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

new cp_pluginname[] = "Semiclip Toggle" 

public plugin_init() { 
    register_plugin(cp_pluginname,"1.0","Hadoken") 
    register_clcmd("semiclip","cp_semiclip",0) 
    register_clcmd("say /semiclip","clip_start",0) 
} 

public stop_clip(id) {      
    entity_set_int(id, EV_INT_solid, SOLID_NOT) 
    client_print(id,print_chat,"[%s] Your SemiClip Is Now Off",cp_pluginname) 
    return PLUGIN_HANDLED 
} 
public start_clip(id) {
	entity_set_int(id, EV_INT_solid, SOLID_BBOX)
	client_print(id,print_chat,"[%s] Your Semiclip Is Now On",cp_pluginname)
        set_task(3.0,"stop_clip",id) 
	return PLUGIN_HANDLED
}
scottyk87 is offline
Send a message via MSN to scottyk87
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 10:10.


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