جرب
local skinID = 0 -- رقم الشخصيه
function spawn(player)
if (getElementData (source, "Group") ~= "Name Group") then
setElementPosition (source, x, y, z)
outputChatBox ("مرحباً بك في البدايه", source, 255, 255, 255, true)
setElementModel (source, skinID)
repeat until setElementModel(player,skinID)
end
end
function spawnW(player)
if (getElementData (source, "Group") ~= "Name Group") then
setElementPosition (source, x, y, z)
outputChatBox ("تم نقلك إلى البدايه بسبب موتك", source, 255, 255, 255, true)
repeat until setElementModel(player,skinID)
end
end
addEventHandler("onPlayerSpawn", root, function()
setTimer(spawn, 1800, 1, source)
end)
addEventHandler("onPlayerWasted", root, function()
setTimer(spawnW, 1800, 1, source)
end)