Author Topic: Were to put it?  (Read 1045 times)

Kungfu-Ninja

  • Guest
Ive been raiding different tutorials on server scripts and such, but how do i make seperate files aside from Inservcmds, like i would like to use the change text script "Lag=Mycompisslow" <You know what i mean, but im pretty sure i don't put it in servcmds? So were do i put it? and or where to i make/move file?

what are you asking?
to make it so when somone says
"lag"
it says
"my computer is slow"

yea thats stupid and not fare...i get lag in crappy servers..everyone lags once in awhile man...but anyways
Quote
function serverCmdMessageSent(%client, %text){
%text = strreplace(%text,"lag","THIS SERVER SUCKS, ITS LAGGING MY CRAPPY COMPUTER.");
%text = strreplace(%text,"LAG","THIS SERVER SUCKS, ITS LAGGING MY CRAPPY COMPUTER.");
chatmessageall(%client,'\c7%2\c3%3\c7%4\c6: %1',%text,%client.clanprefix,%client.name,%client.clansuffix);
}



in other words, no dont servercmd it, make it edit  the sent command :P

This is what I use on my sever:

Code: [Select]
package lagFilter {
function serverCmdMessageSent(%client, %text, %wrd)
{
%wrd = "lag";
if(%text $= %wrd){
messageAll("","\c7" @ %client.clanPrefix @ "\c3" @ %client.name @ "\c7" @ %client.clanSuffix @ "\c6: my computer is slow");
return;
}
   messageAll("","\c7" @ %client.clanPrefix @ "\c3" @ %client.name @ "\c7" @ %client.clanSuffix @ "\c6: " @ %text);
}
};
ActivatePackage(lagFilter);

Oh and to make it work, put it in a text file, hit save as, under file type choose all, and when you name it, put .cs at the end, then select it in the add-ons thing at the start server menu.
« Last Edit: October 20, 2007, 07:42:36 PM by VerticalHorizon »