Quote:
Originally Posted by AIped
I see i was a bit confused becaues i see alot of filterscripts made just for glasses..or just for hats
and i wondered why they didnt just made one FS for all at the same time and let the player figure the position out themselves with that interface.
Thanks
|
The answer is what MP2 said, it's because the Hat or Glasses are meant to be IT (Hat or Glasses), Using this Edit function might allow the player to get the stuff of the hat/glasses limitless Such as Hat placed -1m from Head might be placed below your legs, so it's not called a Hat anymore, also Glasses that would be resized to large size, larger than the player's character body, so it's not called Glasses anymore, but Giant Glasses Custom.
Quote:
Originally Posted by MP2
You should impose limits, otherwise people could scale their objects to be massive, regardless of what Robo said.
|
Quote:
Originally Posted by AIped
you mean like narrowing down the choice and ammount of objects players may use ?
|
Yes, so what he mean, you can still use this, but make sure limit the positions, rotation, or sizes.
For example: Glasses or other object shouldn't be two times larger, and shouldn't use negative value as it will looks like upside down object:
pawn Код:
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)
{
if(response)
{
if(0.0 > ScaleX >= 2.0 || 0.0 > ScaleY >= 2.0 || 0.0 > ScaleZ >= 2.0)
{
SendClientMessage(playerid, 0xFF0000FF, "* The attached object size can't be too small or to large!"); // Give warn
SetPlayerAttachedObject(playerid, index, //.... Your code, use the variables to restore the last saved attached object, so the current edit will be rolled back
EditAttachedObject(playerid, index); // Edit again
}
// Your code
}
// Your code
return 1;
}