MQTT light dimmer with nodeMCU

Hi

I want to make a dimmer that diiming a lamp via MQTT messages.

I have successfully send and recieve messages via MQTT but I dont have any idea that what should I do with messages to dim with messages?

I mean after giving message if message was "1" set the light at 50% and etc
how can i say this??

if (message == "1") setLightLevel(50);

where your setLightLevel() function sets it to the level indicated, in this case 50%.

Yes I know.

But I dont know what should I write into setlightleve function

Me neither, for lack of information on how your LEDs are to be driven and dimmed.
So you best start by posting your existing code, a circuit diagram (no Fritzing wire diagram, they're useless), and describe in more detail what it's doing and what it should do.