A Position Command?
#1

Can you help me, can you provide me with a code that shows your current position (X,Y,Z) like maybe a /pos command, i've seen it on some servers, cause i'm kind of new to GTA Server Development.
Reply
#2

http://forum.sa-mp.com/index.php?topic=113839.0
or just search
Reply
#3

pawn Код:
if (strcmp("/pos", cmdtext, true, 10) == 0)
{
new Float:X;
new Float:Y;
new Float:Z;
new string[128];

format(string, sizeof(string), "You're current position is %f %f %f", Float:X, Float:Y, Float:Z);
SendClientMessage(playerid, color ,string); // change "color" to the color you want
return 1;
}
Untested.
Reply
#4

Quote:
Originally Posted by Klutty
pawn Код:
format(string, sizeof(string), "You're current position is %d %d %d", Float:X, Float:Y, Float:Z);
Untested.
%d should be %f, since you're putting float in your string.
Reply
#5

Quote:
Originally Posted by SpiderPork
Quote:
Originally Posted by Klutty
pawn Код:
format(string, sizeof(string), "You're current position is %d %d %d", Float:X, Float:Y, Float:Z);
Untested.
%d should be %f, since you're putting float in your string.
Thank you, edited my post.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)