SA-MP Forums Archive
is there an..... - 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: is there an..... (/showthread.php?tid=86347)



is there an..... - SantarioLeone - 13.07.2009

advanced coord getter, i searched and the ones i found arent thekind im looking for, ive seen one like i goto cjs house and type a cmd like /getcoords and itll sho like

Interior id: 5
Coordinates:.........................,............ ....,...................
Angle:....



Re: is there an..... - arnutisz - 13.07.2009

This should work:
pawn Код:
if(strcmp(cmdtext, "/getcoords", true) == 0)
{
  new Float:X, Float:Y, Float:Z, Float:A;
  new string[60];
  new int = GetPlayerInterior(playerid)
  GetPlayerPos(playerid, X, Y, Z);
  GetPlayerFacingAngle(playerid, A);
  format(string, sizeof(string), "Interior id: %d", int);
  SendClientMessage(playerid, 0x00ff0000, string);
  format(string, sizeof(string), "Coordinates: X: %f, Y: %f, Z: %f", X, Y, Z);
  SendClientMessage(playerid, 0x00ff0000, string);
  format(string, sizeof(string), "Angle: %f", A);
  SendClientMessage(playerid, 0x00ff0000, string);
  return 1;
}



Re: is there an..... - SantarioLeone - 13.07.2009

Exactly Thanks