Object no showing X cords
#1

Quote:

stock CreateATM(playerid, Float, Float:y, Float:z, Float:a)
{
for( new i = 0; i != MAX_ATMS; i++ )
{
if( ATMInfo[i][aCreated] == 0 )
{
new szName[24];
GetPlayerName( playerid, szName, 24 );

ATMInfo[i][aObject] = CreateObject( ATMS_OBJECT, x, y, z, 0, 0, a );
format( ATMInfo[i][aPlasedBy], 24, "%s", szName );
ATMInfo[i][aCreated] = 1;
ATMInfo[i][aX] = x;
ATMInfo[i][aY] = y;
ATMInfo[i][aZ] = z;//+1.5; // comment the +1.5 if you're not using object 980.
ATMInfo[i][aA] = a;
//SetPlayerPos( playerid, x+1, y+1, z );
new file[64];
format( file, 64, "Gates/gate_%d.ini", i );
if( !fexist( file ) )
{
dini_Create( file );
dini_IntSet( file, "Object", ATMInfo[i][aObject] );
dini_FloatSet( file, "X", ATMInfo[i][aX] );
dini_FloatSet( file, "Y", ATMInfo[i][aY] );
dini_FloatSet( file, "Z", ATMInfo[i][aZ] );
dini_FloatSet( file, "A", ATMInfo[i][aA] );
dini_Set( file, "PlacedBy", ATMInfo[i][aPlasedBy] );
}
break;
}
}
}

yeah when i try to make it, the object isn't there, and when I look at my scriptfiles gates/gates.ini

It shows everything

but

Object=744
X=0.000000
Y=1043.995361
Z=-1029.973022
A=32.089866
PlacedBy=Jason_Turkey

Instead of X it shows y, instead of Y it shows Z instead of Z it shows A.

PLease help
Reply
#2

make sure you're passing the right arguments by adding printf("x: %0.2f y: %0.2f z: %0.2f a: %0.2f",x,y,z,a);
on the first line of that stock

also might as well link you to this
https://sampforum.blast.hk/showthread.php?tid=476968
Reply
#3

Quote:
Originally Posted by cessil
Посмотреть сообщение
make sure you're passing the right arguments by adding printf("x: %0.2f y: %0.2f z: %0.2f a: %0.2f",x,y,z,a);
on the first line of that stock

also might as well link you to this
https://sampforum.blast.hk/showthread.php?tid=476968
Well I used the printf at my console window it still showed 0 for x

it shows the right cords just messed up one

instead of x it's y instead of y it's z.

at x = it's 0.00000
Reply
#4

well now you know that its not the function but whats calling the function
Reply
#5

Quote:
Originally Posted by cessil
Посмотреть сообщение
well now you know that its not the function but whats calling the function
i sort of not get what u mean, can u explain me clearly please.
Reply
#6

you're passing the wrong values when you call it
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)