mirror of
https://github.com/Michatec/wk_wars2x.git
synced 2026-04-01 00:16:27 +02:00
Block key binds from being registered if the resource name is not wk_wars2x
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
---------------------------------------------------------------------------------------]]--
|
||||
|
||||
UTIL = {}
|
||||
UTIL.resourceName = ""
|
||||
|
||||
-- Returns a number to a set number of decimal places
|
||||
function UTIL:Round( num, numDecimalPlaces )
|
||||
@@ -136,6 +137,11 @@ function UTIL:DrawDebugText( x, y, scale, centre, text )
|
||||
DrawText( x, y )
|
||||
end
|
||||
|
||||
Citizen.CreateThread( function() UTIL.resourceName = GetCurrentResourceName() end )
|
||||
function UTIL:IsResourceNameValid()
|
||||
return self.resourceName == "wk_wars2x"
|
||||
end
|
||||
|
||||
--[[The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017 IllidanS4
|
||||
|
||||
Reference in New Issue
Block a user