Raised This Month: $51 Target: $400
 12% 

need some help :|


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
snc
New Member
Join Date: Oct 2007
Old 10-02-2007 , 14:35   need some help :|
Reply With Quote #1

Hi im a newbie (as you might see) please help!
what is wrong with this?
Code:
public Action:Command_rtime(cilent, args)
{ 
     new String:name[255];
     GetClientName(client, name, sizeof(name));
    PrintToChatAll(" %s changed roundtime", name);
    decl String:rtime[255];
    GetCmdArgString(rtime, sizeof(rtime));
        ServerCommand("mp_roundtime %s", rtime);
}
as long as I got your attension how can Find out how many players are online (not sourcetv) ?

Thanks!
snc
snc is offline
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 10-02-2007 , 15:56   Re: need some help :|
Reply With Quote #2

I can nothing wrong with that...

It may be giving you warnings because you are using different spaces before each expression, try:
PHP Code:
public Action:Command_rtime(cilentargs)

    
//Player names can not be longer than 64 chars
    
decl String:name[64], String:rtime[255];
    
GetClientName(clientnamesizeof(name));
    
GetCmdArgString(rtimesizeof(rtime));
    
    
PrintToChatAll("%s changed roundtime"name);
    
ServerCommand("mp_roundtime %s"rtime);


There is a function called GetClientCount, but i am not sure if it detects sourcetv people


I am not sure if this works, but according to http://wiki.alliedmods.net/Format_Cl...d_Scripting%29 you can try using %N to get player name, exemple:
PrintToChatAll("%N changed roundtime", client);
__________________
http://www.nican132.com
I require reputation!

Last edited by Nican; 10-02-2007 at 16:00.
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
snc
New Member
Join Date: Oct 2007
Old 10-03-2007 , 09:34   Re: need some help :|
Reply With Quote #3

thx, but when i try to complie it says error: 017 undefined symbol "client"
seems to be connected to this
GetClientName(client, name, sizeof(name));
snc is offline
ferret
SourceMod Developer
Join Date: Dec 2004
Location: Atlanta, GA
Old 10-03-2007 , 10:45   Re: need some help :|
Reply With Quote #4

Typo:

public Action:Command_rtime(cilent, args)

cilent?
__________________
I'm a blast from the past!
ferret is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 10-04-2007 , 02:41   Re: need some help :|
Reply With Quote #5

He copied the code from the OP and didn't double check for spelling errors.
bl4nk is offline
snc
New Member
Join Date: Oct 2007
Old 10-04-2007 , 08:32   Re: need some help :|
Reply With Quote #6

haha, thx!
snc 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 13:18.


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