-
Mike Tkhor started following Lambda
-
AdmiralRusty started following Lambda
-
- .
-
markboulder started following Lambda
- .
- .
- Using scenarios with objects
- .
-
- .
-
Prompts - ScriptHookDotNet
You are still trying to pass a string when SET_TEXT is expecting a char pointer strings and char pointers are vastly different types, you might need to add it as an Input argument yourself unless you can marshal / use stringbuilder but without knowing the underlaying functions it's mostly guesswork.. string promptString = Function.Call<string>(Hash._CREATE_VAR_STRING, 10, "LITERAL_STRING", new string(promptText));
-
Prompts - ScriptHookDotNet
So what type is the Native.InputArgument?
-
Prompts - ScriptHookDotNet
It needs to be literal dont pass the promptText straight to the SET_TEXT you need to use CREATE_VAR_STRING and pass the return form that into your SET_TEXT
-
Prompts - ScriptHookDotNet
No, the difference is most likely in the types. The create string both wants a char pointer in and returns a char pointer back. C# is a managed language so the support for pointers is limited thats why i suspect you would need to use unmanaged/unsafe to make it work...
-
Prompts - ScriptHookDotNet
It's like magic, almost like if used them before right? I even create them at runtime and the magic still works...
-
Prompts - ScriptHookDotNet
Even tho you can use labels theres no issues using your own custom strings using that native like so: UI::_UIPROMPT_SET_TEXT(promptid, GAMEPLAY::CREATE_STRING(10, "LITERAL_STRING", t_text)); Been a while since i played around with C# but you might need unmanaged code to get a char pointer to work.
- Making prompt groups
-
Loading MP textures
Read my post again, there is no magic involved its all basic stuff check if the dictionary is loaded if not request it, if it is loaded draw the sprite. Had a quick look again and i see your issue..check the image. //Example if (TEXTURE::HAS_STREAMED_TEXTURE_DICT_LOADED("inventory_items_mp")) { GRAPHICS::DRAW_SPRITE("inventory_items_mp", "kit_camp_wilderness", 0.5f, 0.5f, 0.1f, 0.2f, 0.0f, 255, 255, 255, 255, 0); } else { TEXTURE::REQUEST_STREAMED_TEXTURE_DICT("inventory_items_mp", 0); }
- Loading MP textures