Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- enum attached_object_data
- {
- ao_model,
- ao_bone,
- Float:ao_x,
- Float:ao_y,
- Float:ao_z,
- Float:ao_rx,
- Float:ao_ry,
- Float:ao_rz
- }
- new ao[MAX_PLAYERS][MAX_PLAYER_ATTACHED_OBJECTS][attached_object_data];
- .
- .
- .
- .
- .
- public OnPlayerSpawn(playerid)
- {
- for(new i; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
- {
- SetPlayerAttachedObject(playerid,0, ao[playerid][i][ao_model],ao[playerid][i][ao_bone],ao[playerid][i][ao_x],ao[playerid][i][ao_y],ao[playerid][i][ao_z],ao[playerid][i][ao_rx],ao[playerid][i][ao_ry],ao[playerid][i][ao_rz]);
- }
- return 1;
- }
- .
- .
- .
- .
- .
- 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)
- {
- ao[playerid][index][ao_x] = fOffsetX;
- ao[playerid][index][ao_y] = fOffsetY;
- ao[playerid][index][ao_z] = fOffsetZ;
- ao[playerid][index][ao_rx] = fRotX;
- ao[playerid][index][ao_ry] = fRotY;
- ao[playerid][index][ao_rz] = fRotZ;
- ao[playerid][index][ao_sx] = fScaleX;
- ao[playerid][index][ao_sy] = fScaleY;
- ao[playerid][index][ao_sz] = fScaleZ;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement