SA-MP Forums Archive
Cordinates - 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: Cordinates (/showthread.php?tid=86178)



Cordinates - olari99 - 12.07.2009

Hi, can someone say me sa-mp script link what will make cordinates as seen.Thanks, i searched but i did not found anything.


Re: Cordinates - dice7 - 12.07.2009

you do /save, when your at the place you want the coords


Re: Cordinates - ledzep - 12.07.2009

Try typing the "/save [optional: comment]" command and looking in your GTA San Andreas folder for 'savedpositions.txt'.

Or try this:

pawn Код:
public OnPlayerUpdate(playerid)
{
  new
    Float:px,
    Float:py,
    Float:pz,
    string[128];

  GetPlayerPos(playerid, px, py, pz);
  format(string, sizeof(string), "%f, %f, %f", px, py, pz);
  SendClientMessage(playerid, 0xAFAFAFAA, string);
  return 1;
}
It is more precise and more annoying


Re: Cordinates - MenaceX^ - 12.07.2009

Quote:
Originally Posted by ledzep
Try typing the "/save [optional: comment]" command and looking in your GTA San Andreas folder for 'savedpositions.txt'.

Or try this:

pawn Код:
public OnPlayerUpdate(playerid)
{
  new
    Float:px,
    Float:py,
    Float:pz,
    string[128];

  GetPlayerPos(playerid, px, py, pz);
  format(string, sizeof(string), "%f, %f, %f", px, py, pz);
  SendClientMessage(playerid, 0xAFAFAFAA, string);
  return 1;
}
It is more precise and more annoying
I'd say this would be kind of spam, because OnPlayerUpdate gets called everytime a pack is being sent. So you should understand it'd send a message on every new coord.


Re: Cordinates - Gergo1352 - 12.07.2009

pawn Код:
if(strcmp(cmd, "/pos", true) == 0)
{
    new Float: X;
    new Float: Y;
    new Float: Z;
    new Float: Angle;
    new Int;
    new World;
    GetPlayerPos(playerid, X, Y, Z);
    GetPlayerFacingAngle(playerid, Angle);
    Int = GetPlayerInterior(playerid);
    World = GetPlayerVirtualWorld(playerid);
    format(string, sizeof(string), "X: %.4f, Y: %.4f, Z: %.4f, Angle: %.4f", X, Y, Z, Angle);
    SendClientMessage(playerid, 0xFFFFFFAA, string);
    format(string, sizeof(string), "Interior: %d, Virtual World: %d",Int, World);
    SendClientMessage(playerid, 0xFFFFFFAA, string);
    return 1;
}



Re: Cordinates - olari99 - 12.07.2009

Thanks, but still, i saw someones post what showed cordinates without command, i moved and cordinates changed.It was left and down i think.


Re: Cordinates - MenaceX^ - 12.07.2009

Quote:
Originally Posted by olari99
Thanks, but still, i saw someones post what showed cordinates without command, i moved and cordinates changed.It was left and down i think.
ledzep's code supposes to work, but it would get you spammed, try it, if you do get spammed and you don't want it to be like that, use a timer.