Consultar coordenadas
#1

Buenas, їse podrнa hacer una especie de comando como por ejemplo /vcoor para que al usarlo te aparezca en un mensaje las coordenadas X, Y, Z en la que uno estб parado?
Reply
#2

Si es posible, podrias realizarlo utilizando entre otras funciones esta: Create3DTextLabel.
Reply
#3

pawn Код:
if(!strcmp(cmdtext, "/comando", true))
{
    new Float[4];
    GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
    GetPlayerAngle(playerid, Pos[3]);
    new string[50];
    format(string, 50, "Tus coordenadas, X: %f Y: %f Z: %f Angulo: %f", Pos[0], Pos[1], Pos[2], Pos[3]);
    SendClientMessage(playerid, -1, string);
    return 1;
}
O puedes usar el /save si lo que quieres es obtenerlas.
Reply
#4

Quote:
Originally Posted by Bu11Sh0t
Посмотреть сообщение
pawn Код:
if(!strcmp(cmdtext, "/comando", true))
{
    new Float[4];
    GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
    GetPlayerAngle(playerid, Pos[3]);
    new string[50];
    format(string, 50, "Tus coordenadas, X: %f Y: %f Z: %f Angulo: %f", Pos[0], Pos[1], Pos[2], Pos[3]);
    SendClientMessage(playerid, -1, string);
    return 1;
}
O puedes usar el /save si lo que quieres es obtenerlas.
Lo puse, y me dieron errores:

pawn Код:
CMD:vc(playerid, params[])//Lнnea 31167
{
    new Float[4];
    GetPlayerPos(playerid, fX, fY, fZ);
    GetPlayerAngle(playerid, fZ);
    new string[50];
    format(string, 50, "Tus coordenadas, X: %f Y: %f Z: %f Angulo: %f", Pos[0], Pos[1], Pos[2], Pos[3]);
    SendClientMessageEx(playerid, -1, string);
    return 1;
}//Lнnea 31176
Код:
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\ZenonCity.pwn(31170) : error 017: undefined symbol "fX"
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\ZenonCity.pwn(31171) : error 017: undefined symbol "GetPlayerAngle"
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\ZenonCity.pwn(31173) : error 017: undefined symbol "Pos"
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\ZenonCity.pwn(31173) : warning 215: expression has no effect
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\ZenonCity.pwn(31173) : error 001: expected token: ";", but found "]"
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\ZenonCity.pwn(31173) : error 029: invalid expression, assumed zero
Reply
#5

pawn Код:
CMD:vc(playerid, params[])//Lнnea 31167
{
    new Float:Pos[4];
    GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
    GetPlayerAngle(playerid, Pos[3]);
    new string[50];
    format(string, 50, "Tus coordenadas, X: %f Y: %f Z: %f Angulo: %f", Pos[0], Pos[1], Pos[2], Pos[3]);
    SendClientMessageEx(playerid, -1, string);
    return 1;
}//Lнnea 31176
Lo modificaste, aunque me falto en la tercera linea un valor.
Reply
#6

Ahora me dб sуlo un error:

Код:
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\ZenonCity.pwn(31171) : error 017: undefined symbol "GetPlayerAngle"
їSerб que debo usar GetPlayerFacingAngle?

Otra cosa, probй con GetPlayerFacingAngle y copilу correctamente, pero al usarlo IG sуlo da los valores de X e Y y ahн se queda, їserб que debo aumentar los string? si es asн, їquй valor numйrico le asigno al string?
Reply
#7

Si, aumйntalo a 128.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)