Raised This Month: $ Target: $400
 0% 

Print chat..


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 10-29-2011 , 22:36   Print chat..
Reply With Quote #1

Hi, the print chat not works... Look:

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Record POV"
#define VERSION "1.0.2"
#define AUTHOR "Krames"

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_cvar("amx_recordpov""0"FCVAR_SERVER/* Grava POV quando o Jogador conecta ao Server */
    
    
register_concmd("amx_record""CmdRecordPov"ADMIN_CVAR"Grava a POV no LO3")    
}

public 
client_putinserver(id)
{
    if(
get_cvar_num("amx_recordpov") <= 0)
    return
    
    
set_task(5.1"CmdRecordPov"id)
}

public 
CmdRecordPov(id)
{
    new 
date[32], name[31], map[30]
    
    
get_time("%d.%m.%Y"date31)
    
get_user_name(idname30)
    
get_mapname(map29)
    
    
client_print(idprint_chat"Iniciando uma Pov Demo com o nome de:")
    
client_print(idprint_chat"sb_%s_%s_%s.dem"namemapdate)
    
    
client_cmd(id"stop;record sb_%s_%s_%s.dem"namemapdate)
    
}

public 
client_disconnect(id)
{
    
client_cmd(id"stop")

__________________

Last edited by kramesa; 10-29-2011 at 22:37.
kramesa is offline
Evaldas.Grigas
Senior Member
Join Date: Sep 2011
Location: Lithuania
Old 10-30-2011 , 03:44   Re: Print chat..
Reply With Quote #2

I use this:
PHP Code:
    new date[32]
    new 
map[33]
    new 
szName[33]
    
    
get_user_name(idszNamecharsmax(szName)) 
    
get_mapname (map32
    
get_time("%d.%m.%Y"date31)
    
    
client_print(idprint_chat"Your name: %s. Map: %s. Date: %s"szNamemapdate
And it works perfectly.
__________________
Please enter this website everyday: http://forums.alliedmods.net/showthread.php?t=169067
Evaldas.Grigas is offline
Send a message via Skype™ to Evaldas.Grigas
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 10-30-2011 , 06:30   Re: Print chat..
Reply With Quote #3

It won't print if you are unassigned, however there is nothing wrong on that code that would stop the messages from being shown.

1) this is useless:
Code:
public client_disconnect(id) {     client_cmd(id, "stop") }

You cannot call client_cmd() on already disconnected player

2) player nick length can be max of 32 (33), not 30 (31)

Last edited by Backstabnoob; 10-30-2011 at 06:30.
Backstabnoob is offline
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 10-30-2011 , 09:12   Re: Print chat..
Reply With Quote #4

OK, thx all
__________________
kramesa 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 14:27.


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