Postado Abril 9, 2017 8 anos >> Esse script funciona assim -----(Vip)----- >> o player morre e sera teleportado em x lugar como é um hospital ele ira nascer em 5 lugares diferentes ----(Free)---- >> o Player Free vai para outro Hospital tambem com 5 lugares diferentes,mas sera teleportado em outro lugar O rei de seu proprio destino é aquele que luta pela gloria do amanhã! Discord : ZoR#9373
Postado Abril 9, 2017 8 anos 19 horas atrás, ZikaLord disse: >> Esse script funciona assim -----(Vip)----- >> o player morre e sera teleportado em x lugar como é um hospital ele ira nascer em 5 lugares diferentes ----(Free)---- >> o Player Free vai para outro Hospital tambem com 5 lugares diferentes,mas sera teleportado em outro lugar Data/creaturescripts/ Hospital.lua function onLogin(cid) if getPlayerStorageValue(cid, 122000) == 1 and getPlayerPremiumDays(cid) >= 1 then location = { --Posição do hospital vip {x=2580, y=1815, z=7}, {x=2580, y=1811, z=7}, {x=2570, y=1818, z=7}, {x=2580, y=1807, z=7}, {x=2571, y=1821, z=7}, {x=2571, y=1825, z=7}, {x=2571, y=1829, z=7}, {x=2571, y=1833, z=7}, {x=2579, y=1830, z=7}, {x=2580, y=1833, z=7}, {x=2567, y=1818, z=7}, {x=2564, y=1818, z=7}, {x=2564, y=1807, z=7}, } setPlayerStorageValue(cid, 122000, 0) doTeleportThing(cid, location[math.random(#location)]) else location = { --Posição do hospital free {x=2580, y=1815, z=7}, {x=2580, y=1811, z=7}, {x=2570, y=1818, z=7}, } setPlayerStorageValue(cid, 122000, 0) doTeleportThing(cid, location[math.random(#location)]) end end hospitaldeath.lua function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) if isPlayer(cid) == true then setPlayerStorageValue(cid, 122000, 1) return true end return true end creaturescripts.xml <event type="preparedeath" name="hospitaldeath" event="script" value="hospitaldeath.lua"/> <event type="login" name="Hospital" event="script" value="hospital.lua"/> @ZikaLord testa! Editado Abril 9, 2017 8 anos por Gustavo BRX (veja o histórico de edições)
Postado Abril 9, 2017 8 anos Autor 54 minutos atrás, Gustavo BRX disse: Data/creaturescripts/ Hospital.lua function onLogin(cid) if getPlayerStorageValue(cid, 122000) == 1 and getPlayerPremiumDays(cid) >= 1 then location = { --Posição do hospital vip {x=2580, y=1815, z=7}, {x=2580, y=1811, z=7}, {x=2570, y=1818, z=7}, {x=2580, y=1807, z=7}, {x=2571, y=1821, z=7}, {x=2571, y=1825, z=7}, {x=2571, y=1829, z=7}, {x=2571, y=1833, z=7}, {x=2579, y=1830, z=7}, {x=2580, y=1833, z=7}, {x=2567, y=1818, z=7}, {x=2564, y=1818, z=7}, {x=2564, y=1807, z=7}, } setPlayerStorageValue(cid, 122000, 0) doTeleportThing(cid, location[math.random(#location)]) else location = { --Posição do hospital free {x=2580, y=1815, z=7}, {x=2580, y=1811, z=7}, {x=2570, y=1818, z=7}, } setPlayerStorageValue(cid, 122000, 0) doTeleportThing(cid, location[math.random(#location)]) end end hospitaldeath.lua function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) if isPlayer(cid) == true then setPlayerStorageValue(cid, 122000, 1) return true end return true end creaturescripts.xml <event type="preparedeath" name="Death" event="script" value="death.lua"/> <event type="login" name="Hospital" event="script" value="hospital.lua"/> @ZikaLord testa! function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) if isPlayer(cid) == true then setPlayerStorageValue(cid, 122000, 1) return true end return true end naonde coloca isso? quando eu coloco isso no creature os chares nao logam se eu tirar as tags do creature volta ao normal,dando para logar dnv O rei de seu proprio destino é aquele que luta pela gloria do amanhã! Discord : ZoR#9373
Postado Abril 9, 2017 8 anos 57 minutos atrás, ZikaLord disse: function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) if isPlayer(cid) == true then setPlayerStorageValue(cid, 122000, 1) return true end return true end naonde coloca isso? quando eu coloco isso no creature os chares nao logam se eu tirar as tags do creature volta ao normal,dando para logar dnv Qual erro? irei testar e corrigir agora.
Postado Abril 9, 2017 8 anos Autor Agora, Gustavo BRX disse: Qual erro? irei testar e corrigir agora. nao apareçe o erro mas nao carrega pra entrar no server so fica carregando carregando etc e nao entra se eu tirar as tags ele volta ao normal meu tfs e 0.4 O rei de seu proprio destino é aquele que luta pela gloria do amanhã! Discord : ZoR#9373
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.