23.06.2016, 16:29
Well i think the problem is here
pawn Code:
if((dialogid == TOYS) && response)
{
if(PlayerToyInfo[playerid][listitem][ptModelID] == 0)
{
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Toy Menu: Attach/Deattach", "Woops! You don't have anything to put on from that slot", "OK", "");
}
else
{
if(IsPlayerAttachedObjectSlotUsed(playerid, listitem))
{
new name[24];
format(name, sizeof(name), "None");
for(new i;i<sizeof(HoldingObjectsToys1);i++)
{
if(HoldingObjectsToys1[i][holdingmodelid] == PlayerToyInfo[playerid][listitem][ptModelID])
{
format(name, sizeof(name), "%s", HoldingObjectsToys1[i][holdingmodelname]);
}
}
new string[400];
format(string, sizeof(string), "Successfully unequipped %s (Bone: %s) (Slot: %d)", name, HoldingBones[PlayerToyInfo[playerid][listitem][ptBone]], listitem);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
RemovePlayerAttachedObject(playerid, listitem);
}
else
{
SetPlayerAttachedObject(playerid, listitem, PlayerToyInfo[playerid][listitem][ptModelID], PlayerToyInfo[playerid][listitem][ptBone], PlayerToyInfo[playerid][listitem][ptPosX], PlayerToyInfo[playerid][listitem][ptPosY], PlayerToyInfo[playerid][listitem][ptPosZ], PlayerToyInfo[playerid][listitem][ptRotX],
PlayerToyInfo[playerid][listitem][ptRotY], PlayerToyInfo[playerid][listitem][ptRotZ], PlayerToyInfo[playerid][listitem][ptScaleX], PlayerToyInfo[playerid][listitem][ptScaleY], PlayerToyInfo[playerid][listitem][ptScaleZ]);
new name[24];
format(name, sizeof(name), "None");
for(new i;i<sizeof(HoldingObjectsToys1);i++)
{
if(HoldingObjectsToys1[i][holdingmodelid] == PlayerToyInfo[playerid][listitem][ptModelID])
{
format(name, sizeof(name), "%s", HoldingObjectsToys1[i][holdingmodelname]);
}
}
new string[400];
format(string, sizeof(string), "Successfully equipped %s (Bone: %s) (Slot: %d)", name, HoldingBones[PlayerToyInfo[playerid][listitem][ptBone]], listitem);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
}
}