22.08.2014, 23:44
Estou com um problema, e que a loop sу comeзa a contagem do 1 e nгo do 0 como deveria. Essa e o cod
pawn Код:
stock LoadAttacheplayer(playerid)
{
new aname[MAX_PLAYER_NAME]; new file[100];new strText[15];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_ACESSORIOS, aname);
if(DOF2::FileExists(file))
{
for(new i = 0; i < MAX_PLAYER_ATTACHED_OBJECTS; i++)
{
format(strText, 15, "%d_Index",i);
if(DOF2::GetInt(file,strText))
{
format(strText, 15, "%d_Index", i);
new index = DOF2::GetInt(file, strText);
format(strText, 15, "%d_Modelo", i);
new modelid = DOF2::GetInt(file, strText);
format(strText, 15, "%d_Boneid", i);
new boneid = DOF2::GetInt(file, strText);
format(strText, 15, "%d_pX", i);
new Float:fOffsetX = DOF2::GetFloat(file, strText);
format(strText, 15, "%d_pY", i);
new Float:fOffsetY = DOF2::GetFloat(file, strText);
format(strText, 15, "%d_pZ", i);
new Float:fOffsetZ = DOF2::GetFloat(file, strText);
format(strText, 15, "%d_rX", i);
new Float:fRotX = DOF2::GetFloat(file, strText);
format(strText, 15, "%d_rY", i);
new Float:fRotY = DOF2::GetFloat(file, strText);
format(strText, 15, "%d_rZ", i);
new Float:fRotZ = DOF2::GetFloat(file, strText);
format(strText, 15, "%d_eX", i);
new Float:fScaleX = DOF2::GetFloat(file, strText);
format(strText, 15, "%d_eY", i);
new Float:fScaleY = DOF2::GetFloat(file, strText);
format(strText, 15, "%d_eZ", i);
new Float:fScaleZ = DOF2::GetFloat(file, strText);
return SetPlayerAttachedObject(playerid,index,modelid,boneid,fOffsetX,fOffsetY,fOffsetZ,fRotX,fRotY,fRotZ,fScaleX,fScaleY,fScaleZ);
}
}
}
return 1;
}