This commit is contained in:
guava
2016-12-15 13:40:07 +01:00
commit ee4dd89693
95 changed files with 7368 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
CreateThread(function()
local bit = function()
return math.random()
end
local function freezePlayer(id, freeze)
local player = ConvertIntToPlayerindex(id)
SetPlayerControlForNetwork(player, not freeze, false)
local ped = GetPlayerChar(player, _i)
if not freeze then
if not IsCharVisible(ped) then
SetCharVisible(ped, true)
end
if not IsCharInAnyCar(ped) then
SetCharCollision(ped, true)
end
FreezeCharPosition(ped, false)
SetCharNeverTargetted(ped, false)
SetPlayerInvincible(player, false)
else
FreezeCharPosition(ped, true)
SetCharNeverTargetted(ped, true)
SetPlayerInvincible(player, true)
if not IsCharFatallyInjured(ped) then
--ClearCharTasksImmediately(ped)
end
end
end
local player = CreatePlayer(0, -2000.5 + bit(), -2000.5 + bit(), 240.5 + bit(), _i)
freezePlayer(GetPlayerId(), true)
SetLoadingText("this is too lovely")
TriggerEvent('playerInfoCreated')
end)