• Need help with binary module.
    5 replies, posted
Hey, lately i've been testing around with binary modules, but i do have some problems / questions sorry if this is in the wrong section but there isent really any forums dedicated to binary modules so im trying to make a hook so when a player connects it prints a message to console, ive done this successfully but then i tried doing it with PlayerDisconnected but that only have 1 argument which is Player, How would you use that in c++, for example with the PlayerConnect i used LUA->CheckType(1, GarrysMod::Lua::Type::STRING); For each argument, in normal lua you would just ply:Name() But how do you do that in a binary module
It works the same way as it does in lua, you just have to do the steps explicitly. LUA->GetField to get the "Name" function on the player object. LUA->Push to push the self reference for the player. LUA->PCall to perform the call. LUA->GetString to get the string returned from the call.
What program is that, it looks beautiful
It's just an image I made in Paint.NET :V I didn't do anything special, just used the paint bucket tool for the background and wrote the text manually, using different colors.
I'm trying this but i cant seem to get it to work, could you give me a working example?
Sorry, you need to Log In to post a reply to this thread.