Clipper_

Santa Hat [BUGS]

Recommended Posts

Big thanks to people that gave me ideas for creating this resource. 

Developped a mode where you can set/remove the hat, but in the real test, I've found this bug when aiming specific weapons that change your camera. 

Nnm3sFP.png

Is there any event that can be called when player aims the weapon, in order to make the hat dissapear from screen?  (serverside)

Edited by Clipper_

Share this post


Link to post

there is no way doing it through server, and you don't want that either, because if you would hide hat through server when player aims then everyone would see it disappear from his head when he aims with sniper rifle. What you want to do is trigger a custom event on client which sends model to client and stores it into a variable when hat is created for that player and when is removed hat then send again to client that hat was removed so it doesn't throw warnings out also there's an easier version, just set player data "santahat" the model of hat, then check if weapon is aiming with getPedTask() on onClientRender event so it's instantenous and if player is aiming set models alpha to 0 like @aka Blue said or just set element position to 0,0,0, boneattach later will reposition to bone when play won't aim anymore. Also don't forget to remove hat when player disconnects or gets banned, otherwise it's gonna stay in air.

Edited by Fist

Share this post


Link to post

Can you tell me how can I send the hat to client? In this way I can fix other bugs that are related to local player only. 

Share this post


Link to post
5 hours ago, Clipper_ said:

Can you tell me how can I send the hat to client? In this way I can fix other bugs that are related to local player only. 

with triggerClientEvent and triggerServerEvent on other way around, but i recommend you just setting hat model to an element data so it's easier for you to make it. Element datas are synced between server and client on change, from both sides.

Edited by Fist

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.