-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tweak(gamestate/server): Parse CPickupCreationDataNode #2940
base: master
Are you sure you want to change the base?
tweak(gamestate/server): Parse CPickupCreationDataNode #2940
Conversation
With this data node you could create a server setter no? |
Without verifying: Yeah that should work, though this node has a lot more serialization stuff going on, so completing this isn't super easy. |
This bug made it possible to easily block the creation of pickups by canceling any entity with a model hash of 0 in the entityCreating event. |
The modelhash will still be 0 if no custom model is supplied, as the game will then just use the metadata of the pickup type to determine which model to render. This is a limitation that will be hard to overcome as we have no metadata on the server (yet). I can have a look if we can implement something like |
customModelHash = 0; | ||
} | ||
|
||
return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be worth adding a comment that this isn't all of the node data.
(Incomplete) Parsing for CPickupCreationDataNode to return a (custom) model hash for pickups on 'GetModelHash'.
2b648f7
to
cc55e81
Compare
Goal of this PR
Allowing to get the entity model of a pickup object on the server-side.
How is this PR achieving the goal
Parse
CPickupCreationDataNode
partially and return the custom model hash (if set) onGET_ENTITY_MODEL
.This PR applies to the following area(s)
FiveM, Server
Successfully tested on
Game builds: 2060, 2699, 3258
Platforms: Windows (Client)
Checklist
Fixes issues
resolves #2924