11.12.2010, 14:48
try this:
when you use it, its goes like this : split(TEXT,WHERE TO SAVE,WHERE TO SPLIT)
Exaple:
The Script:
when you use it, its goes like this : split(TEXT,WHERE TO SAVE,WHERE TO SPLIT)
Exaple:
pawn Код:
new tmp[2][128];
split("Hello Dude!",tmp,' '); // tmp[0]=Hello tmp[1]=Dude!
pawn Код:
stock split(const strsrc[], strdest[][], delimiter)
{
new i, li;
new aNum;
new len;
while(i <= strlen(strsrc))
{
if(strsrc[i] == delimiter || i == strlen(strsrc))
{
len = strmid(strdest[aNum], strsrc, li, i, 128);
strdest[aNum][len] = 0;
li = i+1;
aNum++;
}
i++;
}
return 1;
}