SetPlayerAttachedObject
#4

Quote:
Originally Posted by Aleksabre
Посмотреть сообщение
So, like this:
Код:
SetPlayerAttachedObject(playerid, 1, 18637, 5));
EditAttachedObject(playerid, 1);
public OnPlayerEditedAttachedObject(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ)
{
    SetPlayerAttachedObject(playerid, 1, 18637, 5));
}
Could you help me somewhere if I'm wrong.
You would use this in a command somewhere

Код:
SetPlayerAttachedObject(playerid, 1, 18637, 5);
EditAttachedObject(playerid, 1);
Then when you click the save icon, you would have this somewhere amongst your other SAMP callbacks
Код:
public OnPlayerEditedAttachedObject(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ)
{
   // Do something with Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ
// Save the information by using print() for example to find out how you like it

}
Then once you've got the co-ordinates you like, use them in the next time you have the cmd like /swatshield would give you
Код:
SetPlayerAttachedObject(playerid, 1, 18637, 5, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ)
Remember though because its important - when using the values passed from the parameters you need to remove the "Float:" part - except from the actual callback public OnPlayerEditedAttachedObject(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY) - don't remove them there
Reply


Messages In This Thread
SetPlayerAttachedObject - by Aleksabre - 14.08.2015, 15:30
Re: SetPlayerAttachedObject - by HarrisonC - 14.08.2015, 15:33
Re: SetPlayerAttachedObject - by Aleksabre - 14.08.2015, 15:39
Re: SetPlayerAttachedObject - by HarrisonC - 14.08.2015, 15:47
Re: SetPlayerAttachedObject - by Aleksabre - 14.08.2015, 16:04
Re: SetPlayerAttachedObject - by HarrisonC - 14.08.2015, 16:25

Forum Jump:


Users browsing this thread: 2 Guest(s)