Browsing StarfallEx's section
← Back to ACE
🔁

Mirrored article

This page is synced automatically from the thegrb93/StarfallEx GitHub wiki (last synced 2 hours ago). Edits made here will be overwritten on the next sync — contribute on the source wiki instead.

Hook Tutorial Solution

📄 WikiUpdated 1 month ago•1 views
--@name Hook Tutorial Solution --@server local i = 0 hook.add("PlayerEnteredVehicle", "print", function(ply, vehicle) print(tostring(ply) .. " entered " .. tostring(vehicle)) i = i + 1 if i == 5 then

--@name Hook Tutorial Solution
--@server
local i = 0
hook.add("PlayerEnteredVehicle", "print", function(ply, vehicle)
print(tostring(ply) .. " entered " .. tostring(vehicle))

i = i + 1
if i == 5 then
hook.remove("PlayerEnteredVehicle", "print")
end
end)

Was this article helpful?

See More

Discussion(0)

No comments yet. Be the first to ask a question!

Have a question? Sign in to join the discussion.