Checking if position is already stored
#1

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
Reply
#2

if(!X1[playerid] && Y1[playerid] && Z1[playerid] > 0))
Isn't a Float.
Reply
#3

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.
Reply
#4

Because i want to do it this way.
Reply
#5

That won't work, my try works.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)