can i have small help

Started by kokia, Jul 19, 2015, 11:43 AM

Previous topic - Next topic

kokia

hello all today i downloaded the console plugin from ysc and added a chat command that command works fine but i wanted the player chat to also show in the console then onplayerchat i wrote this
print("** " + player.Name + " : " + text + " . " **);
and it is giving error that expression expected is my code not working or this is not the way to do it if it is not the way then please tell me the right way
thanks for help

KingOfVC

change to
print("** " + player.Name + " : " + text + " . " );

kokia

thank you and another thing please tell me how can i make a function in whenever a player types a command it shows in console?

Mashreq

Quote from: kokia on Jul 19, 2015, 11:57 AMthank you and another thing please tell me how can i make a function in whenever a player types a command it shows in console?
Thats what you have posted in the starting of your post which is print, using print if you type any text it will get printed to your server console for example.
print( "i'm kokia." );

KingOfVC

Quote from: kokia on Jul 19, 2015, 11:57 AMthank you and another thing please tell me how can i make a function in whenever a player types a command it shows in console?


function onPlayerCommand(player,cmd,text)
{
print("CMD ["+player.Name+"] "+ cmd + " " +text)
}

Alterito

Quote from: kokia on Jul 19, 2015, 11:43 AMhello all today i downloaded the console plugin from ysc and added a chat command that command works fine but i wanted the player chat to also show in the console then onplayerchat i wrote this
print("** " + player.Name + " : " + text + " . " **);
and it is giving error that expression expected is my code not working or this is not the way to do it if it is not the way then please tell me the right way
thanks for help
do you want to steal a password by doing this

kokia

Quote from: subhamrocks on Jul 19, 2015, 02:15 PM
Quote from: kokia on Jul 19, 2015, 11:43 AMhello all today i downloaded the console plugin from ysc and added a chat command that command works fine but i wanted the player chat to also show in the console then onplayerchat i wrote this
print("** " + player.Name + " : " + text + " . " **);
and it is giving error that expression expected is my code not working or this is not the way to do it if it is not the way then please tell me the right way
thanks for help
do you want to steal a password by doing this
no i just want it because in my server people spam commands and i wanna see from console and ban them