Actor disapperars. -
Code:
PetData[i][petActor] = CreateActor(PetData[i][petSkin], PetData[i][petPos][0], PetData[i][petPos][1], PetData[i][petPos][2], PetData[i][petPos][3]);
SetActorVirtualWorld(PetData[i][petActor], PetData[i][petExteriorVW]);
Re: Actor disapperars. -
Re: Actor disapperars. -
Re: Actor disapperars. -
Code:
Pet_Refresh(petid)
{
if (petid != -1 && PetData[petid][petExists])
{
if (IsValidDynamic3DTextLabel(PetData[petid][petText3D]))
DestroyDynamic3DTextLabel(PetData[petid][petText3D]);
if (IsValidActor(PetData[petid][petActor]))
DestroyActor(PetData[petid][petActor]);
PetTur_Guncelle(petid);
new string[1024];
format(string, sizeof(string), "%s %s (#%d)\n%s\nSaglik: %.4f\nAclik: %.4f", PetData[petid][petAdi], petdurum(petid), petid, PetData[petid][petTurAdi], PetData[petid][petSaglik], PetData[petid][petAclik]);
PetData[petid][petText3D] = CreateDynamic3DTextLabel(string, 0x33AA33FF, PetData[petid][petPos][0], PetData[petid][petPos][1], PetData[petid][petPos][2], 5.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, PetData[petid][petExteriorVW], PetData[petid][petExterior]);
PetData[petid][petActor] = CreateActor(PetData[petid][petSkin], PetData[petid][petPos][0], PetData[petid][petPos][1], PetData[petid][petPos][2], PetData[petid][petPos][3]);
SetActorVirtualWorld(PetData[petid][petActor], PetData[petid][petExteriorVW]);
}
return 1;
}