Actor disapperars.
#4

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;
}
I made pet_save, pet_load and pet_refresh. These are working successfully. Pet_load is at gamemodeinit.
Reply


Messages In This Thread
Actor disapperars. - by darkwing - 07.04.2019, 09:21
Re: Actor disapperars. - by GeorgeLimit - 07.04.2019, 09:23
Re: Actor disapperars. - by darkwing - 07.04.2019, 09:24
Re: Actor disapperars. - by darkwing - 07.04.2019, 09:26

Forum Jump:


Users browsing this thread: 1 Guest(s)