Raised This Month: $ Target: $400
 0% 

Print everything?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DahVid
Senior Member
Join Date: Jun 2005
Old 08-24-2005 , 20:17   Print everything?
Reply With Quote #1

This is only suppose to print commands with alias and exec in them, it prints anything typed into the console.

Code:
public client_command(id) {     new command[50]     read_argv(0,command,49)         get_user_name(id,name,33)         if(containi(command,"exec")) {         client_print(0,print_chat,"[FuPlug]:%s performed exec %s.",name,command)     } }
DahVid is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 08-24-2005 , 20:43  
Reply With Quote #2

ok and the point of this post being...
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
DahVid
Senior Member
Join Date: Jun 2005
Old 08-24-2005 , 20:58  
Reply With Quote #3

and scrap the aliases, they are client-side now.
DahVid is offline
Sp4rt4n
Senior Member
Join Date: Dec 2004
Old 08-24-2005 , 21:38  
Reply With Quote #4

Quote:
Originally Posted by Zenith77
ok and the point of this post being...
he wants to know why that prints everything to the console, instead of just alias's and exec's
Sp4rt4n is offline
Send a message via MSN to Sp4rt4n
Zenith77
Veteran Member
Join Date: Aug 2005
Old 08-24-2005 , 21:42  
Reply With Quote #5

lol because all commands have aliass prcatialy or execs..somewhere in there function..


istean of client command

just do like

register_clcmd("exec", bla bla)
and same ting for alias..
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 08-24-2005 , 23:30  
Reply With Quote #6

Let's start off by saying anything equal to 0 is false, and anything else is equal to true. So, if(statement) will return true if statement is not equal to 0. The function containi returns -1 when the string is not found, since 0 would be the start of the string, and since -1 is not zero the statement goes through. Change your line to this:

Code:
if(containi(variable,"string") != -1){

> -1 would work also.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Reply


Thread Tools
Display Modes

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 14:30.


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