-
Notifications
You must be signed in to change notification settings - Fork 0
Home
dounai2333 edited this page Dec 30, 2024
·
8 revisions
This is the wiki page of dounai_lib! This is where you can check, or learn anything about dounai_lib!
The usage of dounai_lib is not like other third-party libs, after require("dounai-lib"), it will only return true.
Instead, a global dounai_lib variable is set, with everything in it, when calling a function from dounai_lib, you should use it like this:
-- Directly use the function.
local entities = dounai_lib.ents.GetAll()
local newEntity = dounai_lib.ents.Create("weapon_ak47")OR
-- Create another variable for easier coding.
local ents = dounai_lib.ents
local entities = ents.GetAll()
local newEntity = ents.Create("weapon_ak47")When player throw a grenade, there will be a trail following the grenade projectile.
By default, the he grenade come with red color, and the flashbang is white, smoke grenade is green.
This feature can be disabled by a global switch: dounai_lib.feature.GrenadeTrails.enable = false.
-
EventManager:RegisterTimer()delay parameter now support decimal point, you can now use 0.5 or 2.9 seconds as delay without issue. Only 1 timer can be triggered per tick is fixed. - The "grenade_bounce" event will no longer use "userid" as argument, instead, it has been replaced to "pointer", which is the pointer address of the grenade projectile itself, by giving the pointer to
dounai_lib.c.GetEntityIndexByPointer(), you can get the entity index without unnecessary code. As a additional changes, "x" "y" "z" arguments has been restored, they are the origin of the entity. - Override bulit-in
print()function, now usingprint("Hello World!")will print the message to your console.printf("Hello %s!", "World")is also available. - Block the chat message ("say" and "say_team" commands) that will send to the other players. They are useless for normal players, but useful for programmer.
- Game events can now be created and fired even there is no listener attach to it, this is mainly for debugging (net_showevents 2).