Skip to content
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

Add several natives for managing with class #13

Merged
merged 2 commits into from
Oct 20, 2024
Merged

Add several natives for managing with class #13

merged 2 commits into from
Oct 20, 2024

Conversation

FortyTwoFortyTwo
Copy link
Owner

@FortyTwoFortyTwo FortyTwoFortyTwo commented Oct 18, 2024

Several natives added:

  • VScriptClass.SetScriptName
  • VScriptClass.GetClassName
  • VScriptClass.SetClassName
  • VScriptClass.GetDescription
  • VScriptClass.SetDescription
  • VScriptClass.RegisterInstance
  • VScript_CreateClass

"ScriptName" and "ClassName" are usually the same, but some can be different from eachother (e.g. CEntities as script and CScriptEntityIterator, as class, while Entities is actually used as a name in script).

vscript_test.sp have an example on how to create an instance to make use of it. string param in VScript_CreateClass can be anything, probably...... while string param in VScriptClass.RegisterInstance are actually used in script files to call functions, aka InstanceName.InstanceFunction(322).

No support yet for creating non-instance class for an actual entity class. That'll take more work and effort, so just instance will do for now.

@FortyTwoFortyTwo FortyTwoFortyTwo merged commit d6c8ce6 into main Oct 20, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant