14.01.2013, 15:18
Hey, I haven't scripted in pawn for awhile now...
I'm having trouble trying to get this little snippet to work, what I want it to do is limit the characters you are allowed to use with the /me command and I can't quite get it to work. Also how would I be able to tell them their message is too long? Thanks for your help
I know the RegEx is correct I just can't get it to work the way I want (It doesn't return anything)
I'm having trouble trying to get this little snippet to work, what I want it to do is limit the characters you are allowed to use with the /me command and I can't quite get it to work. Also how would I be able to tell them their message is too long? Thanks for your help
Код:
#define MeOutput(%1) \
regex_search(%1, "^(.{1,72})")
Код:
if(!strcmp(cmdtext, "/me", true, 3))
{
if(!cmdtext[3])return SendClientMessage(playerid, 0xFFFF00AA, "USAGE: /me [action]");
new str[128];
GetPlayerName(playerid, str, sizeof(str));
format(str, sizeof(str), "%s %s", str, ReturnText(cmdtext[4]));
SendClientMessageToAll(0x400080FF, str);
return 1;
}



