forked from Simnation/Main
Update
This commit is contained in:
parent
a2d2efafc3
commit
f906f25485
4 changed files with 61 additions and 0 deletions
33
resources/[Developer]/[Max]/Duck_Troll/client.lua
Normal file
33
resources/[Developer]/[Max]/Duck_Troll/client.lua
Normal 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)
|
Loading…
Add table
Add a link
Reference in a new issue