what id the diffrent between strtok and stock - 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: what id the diffrent between strtok and stock (
/showthread.php?tid=91183)
what id the diffrent between strtok and stock -
nuriel8833 - 13.08.2009
title^^
and if i put they both in the end of the mod is it right
Re: what id the diffrent between strtok and stock -
ruarai - 13.08.2009
strtok is used for making commands with extra parameters like /heal [id].
stock is used for making functions like "PlayerToPoint" e.g:
Код:
stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
return 0;
}
Re: what id the diffrent between strtok and stock -
nuriel8833 - 13.08.2009
But to put them both in the end of the mod

?
and what is the extra parameters,like many variables O____o