eSelection & Strtok includes...
#1

Hi SAMP Community,

I'm looking for both the "eSelection" and "strtok" includes and I am having troubble finding them, just wondering if you would be able to shed any light.

Regards: Louwwieee42
Reply
#2

for strtok:

Код:
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;
}
https://sampwiki.blast.hk/wiki/Strtok
Reply
#3

Quote:
Originally Posted by Gforcez1337
Посмотреть сообщение
for strtok:

Код:
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;
}
https://sampwiki.blast.hk/wiki/Strtok
Thankyou, so that just goes into a .inc file? Correct?
Reply
#4

Delete the includr line and just add that to your script.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)