25.07.2014, 17:22
There is a stock of "split" in wiki.
check this out for usage:
https://sampwiki.blast.hk/wiki/Code_Snippets
pawn Code:
// Author unknown. It was probably someone smart like [[User:DracoBlue|DracoBlue]] or [[User:Y_Less|Y_Less]].
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;
}
https://sampwiki.blast.hk/wiki/Code_Snippets