AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   saying /noclip on - to enable noclip (https://forums.alliedmods.net/showthread.php?t=54440)

EliteSoldier 04-25-2007 19:47

saying /noclip on - to enable noclip
 
how do I make a person say noclip on then it enables noclip? because when i try

Quote:

}
public saynoclip(id)
{
new said[192]
read_args(said,191)
if(containi(said,"thirdperson") != -1 && containi(said,"on") != -1)
{
client_cmd(id, "entmod_noclip 1")
}
}
that wont work ethier.. sooo.. can anybody help?/

ty very much

Defillbert 04-25-2007 20:11

Re: saying /noclip on - to enable noclip
 
Bleh.
I use the say_handle way through things like this.

PHP Code:

public plugin_init() {
 
register_plugin(PLUGINVERSIONAUTHOR)
 
register_clcmd("say","say_handle")
}
public 
say_handle(id)
{
 new 
buffer[256], buffer1[33], buffer2[33]
 
read_argv(1,buffer,255)
 
parse(bufferbuffer132buffer232)
 if(
equali(buffer1,"/noclip"))
 {
  
do_noclip(id,buffer2)
  return 
PLUGIN_HANDLED
 
}
 return 
PLUGIN_HANDLED
}
public 
do_noclip(id,buffer2)
{
 if(
equali(buffer2,"on"))
 {
  
client_cmd(id,"entmod_noclip 1")
  return 
PLUGIN_HANDLED
 
}
 if(
equali(buffer2,"off"))
 {
  
client_cmd(id,"entmod_noclip 0")
  return 
PLUGIN_HANDLED
 
}
 return 
PLUGIN_HANDLED



EliteSoldier 04-25-2007 22:33

Re: saying /noclip on - to enable noclip
 
thanks, i gave you some karma, lol

Defillbert 04-25-2007 23:50

Re: saying /noclip on - to enable noclip
 
No problem.

Howdy! 04-26-2007 12:36

Re: saying /noclip on - to enable noclip
 
PHP Code:

set_user_noclip id
set_user_noclip id

That entmod_noclip command is for entmod user, but use this if u want noclip without using entmod.


All times are GMT -4. The time now is 06:35.

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