27.01.2016, 02:58
pawn Код:
stock RemoveSlotAttached(playerid, index)
{
new aname[MAX_PLAYER_NAME],file[40],strText[15];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_ACESSORIOS, aname);
if(DOF2::FileExists(file))
{
format(strText, 15, "%d_Used", index);
DOF2::SetInt(file, strText, false);
AttaCheP[playerid][Used] = false;
AttaCheP[playerid][ModeloID] = 0;
AttaCheP[playerid][BoneID] = 0;
AttaCheP[playerid][ApX] = 0;
AttaCheP[playerid][ApY] = 0;
AttaCheP[playerid][ApZ] = 0;
AttaCheP[playerid][ArX] = 0;
AttaCheP[playerid][ArY] = 0;
AttaCheP[playerid][ArZ] = 0;
AttaCheP[playerid][AeX] = 0;
AttaCheP[playerid][AeY] = 0;
AttaCheP[playerid][AeZ] = 0;
DOF2::SaveFile();
}
return 1;
}
pawn Код:
stock RemoveSlotAttached(playerid, index)
{
AttaCheP[playerid][index][Used] = false;
AttaCheP[playerid][index][ModeloID] = 0;
AttaCheP[playerid][index][BoneID] = 0;
AttaCheP[playerid][index][ApX] = 0;
AttaCheP[playerid][index][ApY] = 0;
AttaCheP[playerid][index][ApZ] = 0;
AttaCheP[playerid][index][ArX] = 0;
AttaCheP[playerid][index][ArY] = 0;
AttaCheP[playerid][index][ArZ] = 0;
AttaCheP[playerid][index][AeX] = 0;
AttaCheP[playerid][index][AeY] = 0;
AttaCheP[playerid][index][AeZ] = 0;
RemovePlayerAttachedObject(playerid, index);
}
return 1;
}