Created
January 3, 2015 05:10
-
-
Save codeliger/147f5f2210018202e6a1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- get map constraints | |
-- set global variables | |
-- register configurable variables | |
-- register gui | |
TOOL.Category = "Precision" | |
TOOL.Name = "Nudger" | |
TOOL.ClientConVar[ "nudge_val" ] = "1" | |
TOOL.ClientConVar[ "nudge_min" ] = "1" | |
TOOL.ClientConVar[ "nudge_max" ] = "100" | |
function TOOL:Deploy() | |
print(table.ToString(self, "Self", true)) | |
end | |
function TOOL.Nudge(t) | |
-- Validate Map Constraints | |
-- Nudge (Push or Pull) | |
end | |
function TOOL.isPropOwner(ent) | |
return not ent:IsWorld() && ent:GetOwner() == LocalPlayer() | |
end | |
function TOOL:LeftClick(t) | |
print(LocalPlayer():isPropOwner(t.Entity)) | |
-- Push Entity | |
self:Nudge(t) | |
end | |
function TOOL:RightClick(t) | |
-- Pull Entity | |
self:Nudge(t) | |
end | |
function TOOL.Reload() | |
-- Undo Nudge History | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment