06/02/2021 22:33
Alguém sabe como adicionar outro DynamicObject? sistema de plantação de drogas
Código:
Plant_Refresh(plantid)
{
if (plantid != -1 && PlantData[plantid][plantExists])
{
static
string[128];
if (IsValidDynamicObject(PlantData[plantid][plantObject]))
DestroyDynamicObject(PlantData[plantid][plantObject]);
if (IsValidDynamic3DTextLabel(PlantData[plantid][plantText3D]))
DestroyDynamic3DTextLabel(PlantData[plantid][plantText3D]);
PlantData[plantid][plantObject] = CreateDynamicObject(3409, PlantData[plantid][plantPos][0], PlantData[plantid][plantPos][1], PlantData[plantid][plantPos][2] - 1.80, 0.0, 0.0, PlantData[plantid][plantPos][3], PlantData[plantid][plantWorld], PlantData[plantid][plantInterior]);
format(string, sizeof(string), "[Planta %d]\n{FFFFFF}%s - %d/%d Gramas", plantid, Plant_GetType(PlantData[plantid][plantType]), PlantData[plantid][plantDrugs], Plant_MaxGrams(PlantData[plantid][plantType]));
PlantData[plantid][plantText3D] = CreateDynamic3DTextLabel(string, COLOR_LIGHTGREEN, PlantData[plantid][plantPos][0], PlantData[plantid][plantPos][1], PlantData[plantid][plantPos][2], 10.0, INVALID_VEHICLE_ID, INVALID_PLAYER_ID, 0, PlantData[plantid][plantWorld], PlantData[plantid][plantInterior]);
}
return 1;
}