Sorry,
never done a script in this. Actualy, I need to read parameters for a function and because it is for public use, it should be flexible for variants (switching languages for teamspeak).
Like anything of "FR, fr, Fr, fra, fre, french, francais" means the same.
I would like to check, if argument used by players matches as a substring with my language strings.
decl String:ch_arg1[256];
decl String:ch_arg2[256];
ch_arg1 = "FR, fr, Fr, fra, fre, french, francais"
ch_arg2 = "DE, de, De, Ger, deu, Deutsch, german"
decl String:kanal[64];
GetCmdArg(1, kanal, sizeof(kanal));
and then something like (IN is used in eventscripts for this)
if (kanal IN ch_arg1) { .....
if (kanal IN ch_arg2) { .....
-------
Is this what I need?
Syntax: native bool:GetRegexSubString(Handle:regex, str_id, String:buffer[], maxlen);
If yes, how to use it for my problem?
THX a lot
m4x
|