Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*upd37 - start*/
- @__LoadPlayerAttachData(playerid);
- @__LoadPlayerAttachData(playerid)
- {
- if(!cache_num_rows())
- {
- format(global_string, sizeof global_string, "INSERT INTO `user_attach_coords` (`UserID`) VALUES (%d)", p_info[playerid][id]);
- mysql_tquery(sql_connection, global_string);
- return 1;
- }
- new
- field[7],
- slotString[60];
- new
- modelid,
- bone,
- Float:fOffsetX,
- Float:fOffsetY,
- Float:fOffsetZ,
- Float:fRotX,
- Float:fRotY,
- Float:fRotZ;
- for(new index; index < MAX_PLAYER_ATTACHED_OBJECTS; index++)
- {
- format(field, sizeof field, "Slot%d", index);
- cache_get_field_content(0, field, slotString, sql_connection, sizeof slotString);
- sscanf(slotString, "p<,>ddffffff", modelid, bone, fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, fRotZ);
- gPlayerAttachedObjectModel[playerid][index] = modelid;
- gPlayerAttachedObjectBone[playerid][index] = bone;
- gPlayerEditObjectTD[playerid][index][0] =
- gPlayerAttachedObjectPos[playerid][index][0] = fOffsetX;
- gPlayerEditObjectTD[playerid][index][1] =
- gPlayerAttachedObjectPos[playerid][index][1] = fOffsetY;
- gPlayerEditObjectTD[playerid][index][2] =
- gPlayerAttachedObjectPos[playerid][index][2] = fOffsetZ;
- gPlayerEditObjectTD[playerid][index][3] =
- gPlayerAttachedObjectPos[playerid][index][3] = fRotX;
- gPlayerEditObjectTD[playerid][index][4] =
- gPlayerAttachedObjectPos[playerid][index][4] = fRotY;
- gPlayerEditObjectTD[playerid][index][5] =
- gPlayerAttachedObjectPos[playerid][index][5] = fRotZ;
- slotString[0] = '\0';
- }
- return 1;
- }
- /*upd37 - end*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement