NeoGM Posted August 1, 2019 Share Posted August 1, 2019 Rapaziada como fasco pra editar o local de Spawn do player após ele fazer o Login? Recentemente coloquei um Script de Hospital em Meu sv... Que apos a rapaziada morrer ele entra dentro de um Interior que o Player tem que esperar 1-minuto pra sair, mas só que percebi que o player quando loga em meu server ele vai direto pra esse interior, Que não era pra tá acontecendo isso! Espero quem Alguém entenda. Obrigado pela Colaboração. Link to comment
DNL291 Posted August 1, 2019 Share Posted August 1, 2019 Movido para Portuguese / Português > Programação em Lua Lembre-se de postar no local correto @NeoGM 1 Link to comment
NeoGM Posted August 1, 2019 Author Share Posted August 1, 2019 22 minutes ago, DNL291 said: Movido para Portuguese / Português > Programação em Lua Lembre-se de postar no local correto @NeoGM Voce pode mim ajudar ? Link to comment
Other Languages Moderators Lord Henry Posted August 1, 2019 Other Languages Moderators Share Posted August 1, 2019 Mostre o script do hospital. 1 Link to comment
NeoGM Posted August 1, 2019 Author Share Posted August 1, 2019 local sx, sy = guiGetScreenSize ( ) local shadowTable = { {1,-1}, {1,0}, {1,1}, {0,1}, {0,-1}, {-1,-1}, {-1,0}, {-1,1} }; local size = 0.8; local spaceY = 0.4*sy; local sTick; local state; local timer = 60; --- время в больнице в сек addEvent( "showTime", true ) addEventHandler( "showTime", localPlayer, function ( ) if ( source == localPlayer ) then state = true; sTick = getTickCount ( ); addEventHandler( "onClientRender", root, showTime ); end end ) function showTime ( ) local cTick = getTickCount ( ); local remT = math.ceil ( ( cTick - sTick )/1000 ) local time = timer - remT; if ( remT > timer ) then state = false; removeEventHandler( "onClientRender", root, showTime ); outputChatBox ("#ff7a66*#00ff00Você recebeu alta e agora pode sair do hospital.", 255, 255, 255, true ); end local shadows = { }; local texts = { }; local length = dxGetTextWidth( "Você será liberado em "..time ); table.insert ( texts, {"#00ff00Você será liberado em "..time, (sx-length)/2, sy/2-spaceY, 100, 100, tocolor( 255,255,255,255 ), size, "bankgothic", "left", "top", false, false, false, true} ); table.insert ( shadows, {"Você será liberado em "..time, (sx-length)/2, sy/2-spaceY, 100, 100, 255, size, "bankgothic", "left", "top", 1} ); for i, t in pairs ( shadowTable ) do local oX, oY = t[1], t[2]; for j, textTable in pairs ( shadows ) do local text, x, y, x2, y2, a, scale, font, alignX, alignY, thickness = unpack(textTable); oX, oY = oX*thickness, oY*thickness; dxDrawText ( text, x+oX, y+oY, x2+oX, y2+oY, tocolor(0,0,0,a), scale, font, alignX, alignY ); end end for i, t in pairs ( texts ) do dxDrawText ( unpack(t) ); end end local theMarker = createMarker ( 441.39999389648, 168.80000305176, 1199, "cylinder", 1.5, 0, 255, 0, 170 ); setElementDimension ( theMarker, 1 ); addEventHandler( "onClientMarkerHit", theMarker, function ( hitElement ) if ( hitElement ~= localPlayer ) then return end if ( state == false ) then triggerServerEvent ( "onExitHost", hitElement ); else outputChatBox ("#ff7a66*#ff0000Você receberá alta em Breve, Aguarde!", 255, 255, 255, true ); end end ) addEventHandler( "onResourceStart", resourceRoot, function ( ) for i,v in ipairs({ {14597,401,169.3,1201,0,0,0}, {14593,427.9924,176,1201.329,0,0,270}, {941,391,171.2,1199.5,0,0,0}, {2066,393.39999,171.60001,1199,0,0,0}, {2066,392.79999,171.60001,1199,0,0,0}, {2200,388,169.8,1199,0,0,90}, {2200,388,167.39999,1199,0,0,90}, {2334,390.89999,167,1199,0,0,180}, {2532,392.10001,166.89999,1199,0,0,180}, {2576,401.29999,182.5,1199,0,0,0}, {2610,394,171.8,1199.8,0,0,0}, {1569,441.89999,168.10001,1199,0,0,90}, {1950,392.20001,171.60001,1200.2,0,0,290}, {1951,392,171.60001,1200.2,0,0,284}, {1778,390,166.89999,1199,0,0,0}, {1808,415.60001,171.8,1199,0,0,0}, {2299,408.29999,174.60001,1199,0,0,90}, {2299,408.29999,178.2,1199,0,0,90}, {2299,408.29999,181.60001,1199,0,0,90}, {2299,410.79999,179.3,1199,0,0,0}, {2576,411.60001,175.8,1199,0,0,270}, {14532,411.60001,176.5,1200,0,0,40}, {2299,408.29999,163.5,1199,0,0,90}, {2299,408.29999,159.89999,1199,0,0,90}, {2299,408.29999,156.2,1199,0,0,90}, {2299,411.70001,159.2,1199,0,0,180}, {2576,411.79999,165.8,1199,0,0,270}, {14532,411.70001,162.10001,1200,0,0,133.996}, {2299,397.5,179.39999,1199,0,0,0}, {2299,400.89999,174.3,1199,0,0,270}, {2299,400.89999,177.60001,1199,0,0,270}, {2299,400.89999,181.10001,1199,0,0,270}, {14532,397.89999,173.7,1200,0,0,315.996}, {2299,400.89999,164.8,1199,0,0,270}, {2299,400.89999,161.3,1199,0,0,270}, {2299,400.89999,158,1199,0,0,270}, {2576,397.60001,162.7,1199,0,0,90}, {14532,397.70001,162.2,1200,0,0,219.994}, {2299,398.60001,159.3,1199,0,0,180}, {1723,434.39999,181.89999,1199,0,0,0}, {1723,424.89999,181.8,1199,0,0,0}, {1724,428.10001,181.8,1199,0,0,0}, {1723,438,180,1199,0,0,270}, {1723,438,176.89999,1199,0,0,270}, {1999,424.89999,173.60001,1199,0,0,270}, {2309,425.89999,172.39999,1199,0,0,0}, {1724,429,171.60001,1199,0,0,180}, {1723,423.79999,176.2,1199,0,0,90}, {2356,423.70001,172.3,1199,0,0,314}, {2636,390.70001,170.3,1199.6,0,0,210}, }) do local obj = createObject(v[1], v[2], v[3], v[4], v[5], v[6], v[7]) setObjectScale(obj, 1) setElementDimension(obj, 1) setElementInterior(obj, 0) end end ) addEventHandler( "onPlayerWasted", root, function ( ) triggerClientEvent ( source, "showTime", source ); spawnPlayer ( source, 436.39999389648, 169, 1201, 87, getElementModel ( source ) ); setElementDimension ( source, 1 ); setElementData ( source, "hospital", 1 ); end ) addEvent( "onExitHost", true ) addEventHandler( "onExitHost", root, function ( ) spawnPlayer ( source, 1183.4034423828,-1323.685546875,13.577024459839, -90, getElementModel ( source ) ); setElementDimension ( source, 0 ); setElementData ( source, "hospital", 0 ); end ) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now