SA-MP Forums Archive
OnPlayerEditAttachedObject - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerEditAttachedObject (/showthread.php?tid=343482)



OnPlayerEditAttachedObject - milanosie - 17.05.2012

Hi, simple question.

This will display the coordinates of the object right?

Код:
public OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ)
{
	new string[128];
	format(string, sizeof(string), "x:%f, y:%f, z:%f, rx:%f, ry:%f, rz:%f",fOffsetX,fOffsetY,fOffsetZ,fRotX,fRotY,fRotZ);
	SendClientMessage(playerid, COLOR_GREY, string);
	return 1;
}



Re: OnPlayerEditAttachedObject - ViniBorn - 17.05.2012

Yes.


Re: OnPlayerEditAttachedObject - milanosie - 17.05.2012

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
Yes.
Alright, not sure about floats but will this cut the coordinates off at 3 number?

Код:
	new string[128];
	format(string, sizeof(string), "x:%3mf, y:%3mf, z:%3mf, rx:%3mf, ry:%3mf, rz:%3mf",fOffsetX,fOffsetY,fOffsetZ,fRotX,fRotY,fRotZ);
	SendClientMessage(playerid, COLOR_GREY, string);
	return 1;



Re: OnPlayerEditAttachedObject - ViniBorn - 17.05.2012

pawn Код:
%f // 5.123456789
%.2f // 5.12
%.4f // 5.1234



Re: OnPlayerEditAttachedObject - milanosie - 17.05.2012

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
pawn Код:
%f // 5.123456789
%.2f // 5.12
%.4f // 5.1234
danke