NPC Code:
if (actionserverside) {
if (strequals(#p(0),addstrings)) {
setstring clientr.nocurse_r1,pls,plz,brb,;
setstring clientr.nocurse_r2,please,please,"Be right back",;
setstring clientr.nocurse_p1,PUT,YOUR,CURSE,WORDS,HERE;
}
}
//#CLIENTSIDE
if (created) {
triggeraction 0,0,serverside,-Anticurse,addstrings;
}
if (playerchats) {
repeatcheck();
profanitycheck();
function repeatcheck() {
for (i=0; i<sarraylen(clientr.nocurse_r1); i++) {
this.i_r1 = indexof(#I(clientr.nocurse_r1,i),#c);
if (this.i_r1 > -1) {
setstring client.nocurse_ts,#e(0,strtofloat(#v(this.i_r1)),# c)#I(clientr.nocurse_r2,i)#e(strtofloat(#v(this.i_ r1))+strlen(#I(clientr.nocurse_r2,i))-3,-1,#c);
setplayerprop #c,#s(client.nocurse_ts);
}
}
if (this.i_rl < strlen(#c)) repeatcheck();
}
function profanitycheck() {
for (u=0; u<sarraylen(clientr.nocurse_p1); u++) {
this.i_p1 = indexof(#I(clientr.nocurse_p1,u),#c);
if (this.i_p1 > -1) {
setstring client.nocurse_st,;
for (o=0; o<strlen(#I(clientr.nocurse_p1,u)); o++) setstring client.nocurse_st,#s(client.nocurse_st)*;
setstring client.nocurse_ts,#e(0,strtofloat(#v(this.i_p1)),# c)#s(client.nocurse_st)#e(strtofloat(#v(this.i_p1) )+strlen(#s(client.nocurse_st)),-1,#c);
setplayerprop #c,#s(client.nocurse_ts);
}
}
if (this.i_p1 < strlen(#c)) profanitycheck();
}
client.nocurse_r1 and r2 are replacement strings
The "tokens" correspond to each other