Checking if position is already stored - 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: Checking if position is already stored (
/showthread.php?tid=73011)
Checking if position is already stored -
Robbin237 - 12.04.2009
Hey guys, im trying to check if the players position is already stored in the variables, but cant really figure out how..
On top of my script i have:
pawn Код:
new Float:X1[MAX_PLAYERS];
new Float:Y1[MAX_PLAYERS];
new Float:Z1[MAX_PLAYERS];
Then my command:
pawn Код:
dcmd_acsav(playerid, params[])
{
new Choice = strval(params);
if(Choice == 1) {
if(!X1[playerid] && Y1[playerid] && Z1[playerid] > 0)) { // This wont really work lol
GetPlayerPos(playerid, X1[playerid], Y1[playerid], Z1[playerid]);
}
}
return 1;
}
Any1 know how?
Thnx
Re: Checking if position is already stored -
MenaceX^ - 12.04.2009
if(!X1[playerid] && Y1[playerid] && Z1[playerid] > 0))
Isn't a Float.
Re: Checking if position is already stored -
Rks25 - 12.04.2009
If you want to check if he already done it, why not using a small variable which you save when he saves his pos, and load when you want to check it.
Re: Checking if position is already stored -
Robbin237 - 12.04.2009
Because i want to do it this way.
Re: Checking if position is already stored -
Rks25 - 12.04.2009
That won't work, my try works.