helló lassan össze sikerült hoznom a magasság mérõt csak az a baj hogy nem méri
#include <a_samp>
#define SLOTS 200
enum SavePlayerPosEnum {
Float:LastX,
Float:LastY,
Float:LastZ
}
new SavePlayerPos[sLOTS][savePlayerPosEnum];
new Text:Speedo[sLOTS];
new UpdateSeconds;
forward UpdateSpeed();
public OnFilterScriptInit()
{
SetTimer(\"UpdateSpeed\",1000, 1);
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
main()
{
}
public UpdateSpeed()
{
new Float:x,Float:y,Float:z;
new Float:distance,value,string[256];
for(new i=0; i<SLOTS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerPos(i, x, y, z);
distance = floatsqroot(floatpower(x,SavePlayerPos[LastX]))+(floatpower(y,SavePlayerPos[LastY]))+(floatpower(z,SavePlayerPos[LastZ]));
value = floatround(distance * 5000);
if(UpdateSeconds > 1)
{
value = floatround(value / UpdateSeconds);
}
format(string,sizeof(string),\"~w~Altitude: %.1f\",z);
Speedo = TextDrawCreate(320.00, 380.00, string);
TextDrawSetOutline(Speedo, 1);
TextDrawFont(Speedo, 2);
TextDrawSetProportional(Speedo, 1);
TextDrawAlignment(Speedo, 1);
}
SavePlayerPos[LastX] = x;
SavePlayerPos[LastY] = y;
SavePlayerPos[LastZ] = z;
}
}
public OnPlayerSpawn(playerid)
{
TextDrawShowForPlayer(playerid, Speedo[playerid]);
return 1;
}
ha valaki tudja írja meg kösz elõre is!