ben harchit faux
test mon test
#include <a_samp>
new obj;
new Float:x, Float:y, Float:z;
forward test1();
forward test2();
forward test3();
main()
{
print("\n----------------------------------");
print(" test de getobjectpos");
print("----------------------------------\n");
}
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
obj=CreateObject(2587, 2001.195679, 1547.113892, 14.283400, 0, 0, 96);
SetTimer("test1",100, 0);
SetTimer("test2",500, 0);
SetTimer("test3",2500, 0);
return 1;
}
public test1()
{
GetObjectPos(obj, x, y, z);
printf("%f %f %f",x,y,z);
return 1;
}
public test2()
{
MoveObject(obj, 2001.195679+10, 1547.113892+10, 14.283400+10, 2.00);
return 1;
}
public test3()
{
GetObjectPos(obj, x, y, z);
printf("%f %f %f",x,y,z);
return 1;
}
voila le resultat
[22:41:39] 2001.195678 1547.113891 14.283399
[22:41:41] 2003.728027 1549.646240 16.827264