[FIX] NPCs loading from saves (Thanks, @GamingStudios1029).

This fixes https://github.com/TeamUlysses/ulx/issues/31
This commit is contained in:
Nayruden 2016-02-16 20:15:15 -05:00
parent 9f4846437c
commit 939250a73d
3 changed files with 9 additions and 1 deletions

View File

@ -1,5 +1,8 @@
# ULib Changelog
## v2.61 - *(00/00/00)*
* [FIX] NPCs loading from saves (Thanks, GamingStudios1029).
## v2.60 - *(02/15/16)*
* [ADD] ULib.ucl.getUserInfoFromID for getting user info from an ID.
* [ADD] CAMI support.

View File

@ -33,6 +33,8 @@ function meta:DisallowVehicles( bool )
end
local function tool( ply, tr, toolmode )
if not ply or not ply:IsValid() then return end
if ply.NoSpawning then
if not table.HasValue( ULib.spawnWhitelist, toolmode ) then
return false
@ -42,11 +44,13 @@ end
hook.Add( "CanTool", "ULibPlayerToolCheck", tool, HOOK_HIGH )
local function noclip( ply )
if not ply or not ply:IsValid() then return end
if ply.NoNoclip then return false end
end
hook.Add( "PlayerNoClip", "ULibNoclipCheck", noclip, HOOK_HIGH )
local function spawnblock( ply )
if not ply or not ply:IsValid() then return end
if ply.NoSpawning then return false end
end
hook.Add( "PlayerSpawnObject", "ULibSpawnBlock", spawnblock )
@ -59,6 +63,7 @@ hook.Add( "PlayerSpawnSENT", "ULibSpawnBlock", spawnblock )
hook.Add( "PlayerGiveSWEP", "ULibSpawnBlock", spawnblock )
local function vehicleblock( ply, ent )
if not ply or not ply:IsValid() then return end
if ply.NoVehicles then
return false
end

View File

@ -1 +1 @@
1455671671
1455671715