Monthly Target: $400 Donations: $37
 9% 

server_cmd message without "


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tcPane
Senior Member
Join Date: Sep 2010
Old 04-27-2012 , 17:00   server_cmd message without "
Reply With Quote #1

how to remove " in server_cmd

i use this code, but it put " in front of and behind message

server_cmd("kick #%d ^"You were kicked for being AFK longer than 45 seconds^"")

i want normal message in cmd ( without "" )
tcPane is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 04-27-2012 , 17:09   Re: server_cmd message without "
Reply With Quote #2

Can you explain more?
__________________
<VeCo> is offline
Send a message via Skype™ to <VeCo>
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Location: Where am i ?
Old 04-27-2012 , 17:15   Re: server_cmd message without "
Reply With Quote #3

That is how pawn language system works, you can not change it.
.Dare Devil. is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: At home FFS
Old 04-27-2012 , 19:08   Re: server_cmd message without "
Reply With Quote #4

Quote:
Originally Posted by tcPane View Post
how to remove " in server_cmd

i use this code, but it put " in front of and behind message

server_cmd("kick #%d ^"You were kicked for being AFK longer than 45 seconds^"")

i want normal message in cmd ( without "" )
PHP Code:
server_cmd"kick #%d  You've been kicked out!"get_user_useridiPlayer ) ); 
__________________
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
tcPane
Senior Member
Join Date: Sep 2010
Old 04-28-2012 , 04:53   Re: server_cmd message without "
Reply With Quote #5

Quote:
Originally Posted by claudiuhks View Post
PHP Code:
server_cmd"kick #%d  You've been kicked out!"get_user_useridiPlayer ) ); 
Works, Thanks.
I want to make some changes. There is some bugs in this code. Can someone fix this code?

PHP Code:
#include <amxmodx>

const TASK_CHECK 2707

#define WARNING_TIME 30
#define MIN_AFK_TIME 35
#define CHECK_MESSAGE 5

new g_jointime[33]

public 
plugin_init() 
{
    
register_clcmd("joinclass""cmdJoinClass")
    
register_cvar("mp_jointime""120")
    
    
set_task(float(CHECK_MESSAGE),"Task_Check",_,_,_,"b")
}

public 
client_putinserver(id)
{
    new 
start get_cvar_num("mp_jointime")
    
set_task(start"Task_Check"id+TASK_CHECK)
}

public 
cmdJoinClass(id)
    
remove_task(id+TASK_CHECK)
    
public 
Task_Check(taskid)
{
    new 
maxjointime get_cvar_num("mp_jointime")
    
    if(
maxjointime MIN_AFK_TIME
    {
        
log_amx("cvar mp_jointime %i is too low. Minimum value is %i."maxjointimeMIN_AFK_TIME)
        
maxjointime MIN_AFK_TIME
        set_cvar_num
("mp_jointime"MIN_AFK_TIME)
    }
        
    if(
maxjointime-WARNING_TIME <= g_jointime[taskid] < maxjointime
    {
        new 
timeleft maxjointime g_jointime[taskid]
        
client_print(taskidprint_chat"You have %i seconds to join a team or you will be kicked."timeleft)
    } 
    else if (
g_jointime[taskid] > maxjointime
    {
        
//new name[32]
        //get_user_name(id, name, 31)
        //client_print(0, print_chat, "%s was kicked for failure to join a team within 2 minutes.", name)
        //log_amx("%s was kicked for failure to join a team within 2 minutes.", name)
        
server_cmd("kick #%d  Failure to join a team within 2 minutes."get_user_userid(taskid-TASK_CHECK))
    } 


Last edited by tcPane; 04-28-2012 at 04:53.
tcPane is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-28-2012 , 12:26   Re: server_cmd message without "
Reply With Quote #6

Quote:
Originally Posted by tcPane View Post
There is some bugs in this code. Can someone fix this code?
You have to tell us what the "bugs" are, otherwise we can't help you.
__________________
fysiks is offline
tcPane
Senior Member
Join Date: Sep 2010
Old 04-29-2012 , 13:12   Re: server_cmd message without "
Reply With Quote #7

It doesn't work. After 2 minutes don't disconnect/kick player.

Last edited by tcPane; 04-29-2012 at 13:12.
tcPane 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 13:49.


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