explode? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: explode? (
/showthread.php?tid=158027)
explode? -
FoxtrotZulu - 08.07.2010
Is there an explode(); function for Pawn like in PHP?
I'm sure I saw one before.
Re: explode? -
CAR - 08.07.2010
CreateExplosion
Re: explode? -
Jeffry - 08.07.2010
CreateExplosion ?
EDIT: CAR was faster. ^^
Re: explode? -
FoxtrotZulu - 08.07.2010
http://www.php.net/explode
x3
Re: explode? -
Jeffry - 08.07.2010
Oh. That's something else. For what do you need it?
Re: explode? -
MadeMan - 08.07.2010
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;
}
Taken from Godfather
Re: explode? -
Pghpunkid - 11.02.2011
lol i just made an actual explode function. Differs a bit from split.