Script for put and remove mask or hat vRP or ESX

Hello this is my first script.
I developed it because I looked for someone to remove or put on masks according to a number.
This script will be enhanced by adding emotes and other functions like hats.

You can use typing /mask or /hat on chat

Example:
For remove mask
/mask

Put pig mask
/mask 1

masks list https://wiki.■■■■■■■■■■■/index.php?title=Masks
hats list https://wiki.■■■■■■■■■■■/index.php?title=Hats_Male or https://wiki.■■■■■■■■■■■/index.php?title=Hats_Female

1 Like

Nice first contribution; I’ve just made a quick pull request though.

https://github.com/galoocego/esc_cmds/pull/1

Cleans up some unneeded code (namely your use of raw).

In future updates I’d love to see you add emotes for taking on and off, some extra checking of what is passed in the command, etc. :mascot:

1 Like

Ty @ChristopherM

Nice release i was looking for a /mask resource :money_mouth_face:

I don’t know bro… This script only execute on client.

Sorry :frowning:

Can you do that you can only run 1 mask with the command?

Yes, if you remove the argument from the command.

I just want to use mask 51 which I try but I don’t let myself … if I delete the argument as aria to only use mask number 51?

– Mask command
RegisterCommand(“mask”, function(source, args)
– If argument 1 provided
–if args[1] then
– Initialise color variable
local color = 0
– If color number provided in argument 2
if args[2] then
– Set color to provided argument
color = tonumber(args[2])
end

    -- Update ped
    SetPedComponentVariation(PlayerPedId(), 1, tonumber(args[1]), color, 1)
else
    SetPedComponentVariation(PlayerPedId(), 1, 0, 0, 1)
end

end, false)

SetPedComponentVariation(PlayerPedId(), 1, 51, color, 1)

else
SetPedComponentVariation(PlayerPedId(), 1, 0, 0, 1)
end

Is this u want?

I will try bro

Thank you

I wanted to put an animation on the mask, you know how?