Segítek elindulni. Nem teszteltem.
public OnPlayerText(playerid, text[])
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 0.0, 0.0, 0.0))
{
new idx;
new tmp[256];
tmp = strtok(text, idx);
if ((strcmp(\"kóla\", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen(\"kóla\")))
{
SendClientMessage(playerid, 0xAFAFAFAA, \"Tessék, válaszolok, itt a kóla!\");
}
}
return 1;
}
strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= \' \'))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > \' \') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}