function Onplayer chat

Started by Shovon^, Sep 15, 2016, 09:05 AM

Previous topic - Next topic

Shovon^

Hello i want a very simple script thats : when admins will chat then then i want it to be written "Admin+player.name: +text+"
Iam the best and i only believe in Allah

Conatact me here on IRC:  #shovon^ @LUnet

PunkNoodle

You basically already did it yourself.

Thijn

1. That
2. onPlayerChat
3. return false;

MatheuS

function onPlayerChat( player, message ) {
if( status[ player.ID ].Level == 1 /* here is your admin level */ ) Message( "[#FFFFFF][ADMIN]" + player.Name +": [#FCFCFC]" + message );
else {
Message( "[#FFFFFF]" + player.Name +": [#FCFCFC]" + message );
}
return 0;
}

NOT TESTED
if( !sucess ) tryAgain();
Thanks to the VCMP community. It was the happiest period of my life.

Shovon^

Iam the best and i only believe in Allah

Conatact me here on IRC:  #shovon^ @LUnet

Kewun

because you dont have arrays

Shovon^

Iam the best and i only believe in Allah

Conatact me here on IRC:  #shovon^ @LUnet

Kewun

i dont know. i dont use anything like status [ player.ID ]