1
0
Fork 0
forked from Simnation/Main
This commit is contained in:
Max 2025-06-13 21:12:14 +02:00
parent a2d2efafc3
commit f906f25485
4 changed files with 61 additions and 0 deletions

View file

@ -0,0 +1,33 @@
RegisterNetEvent("troll:verwandelnZurRatte", function()
local ratModel = GetHashKey("a_c_rat")
local defaultModel = GetHashKey("mp_m_freemode_01")
-- Rattenmodell laden
RequestModel(ratModel)
while not HasModelLoaded(ratModel) do Wait(50) end
SetPlayerModel(PlayerId(), ratModel)
SetModelAsNoLongerNeeded(ratModel)
lib.notify({
title = 'Troll aktiv',
description = 'Du bist jetzt eine Ratte 🐀 für 60 Sekunden!',
type = 'inform'
})
-- 60 Sekunden warten
Wait(60000)
-- Zurückverwandeln
RequestModel(defaultModel)
while not HasModelLoaded(defaultModel) do Wait(50) end
SetPlayerModel(PlayerId(), defaultModel)
SetModelAsNoLongerNeeded(defaultModel)
lib.notify({
title = 'Zurückverwandelt',
description = 'Du bist wieder normal.',
type = 'success'
})
end)