• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Losowe miejsce po śmierci

On chyba nie chce teleportowania przy zalogowaniu tylko przy śmierci... a wasze skrypty będą tpować graczy przy każdym zalogowaniu.
 
creaturescripts.xml dodaj
Code:
<event type="login" name="Temple" script="temple.lua"/>

Podtem w w scripts dodaj plik temple.lua a w nim:
Code:
function onLogin(cid)
	local swiatynie = {
		{x=,y=,z=},
		{x=,z=,z=},
		{x=,y=,z=}
	}
	doTeleportThing(cid, swiatynie[math.random(1, #swiatynie)])
	return true
end

I na koniec w login.lua dodaj
Code:
	registerCreatureEvent(cid, "Temple")

i powinno działać



Nie działa. Jak to zrobiłem to zalogować sie nie można bylo
 
po co zmieniać niech inni zrobią to za mnie...
i zdaje mi się, że można by to było wrzucić w login.lua :) Ale to tylko moje newbitowskie zdanie
 
Zrób tak:

creaturescripts.xml dodaj
Code:
<event type="login" name="Temple" script="temple.lua"/>

Podtem w w scripts dodaj plik temple.lua a w nim:
Code:
function onLogin(cid)
	local swiatynie = {
		{x=,y=,z=},
		{x=,z=,z=},
		{x=,y=,z=}
	}
	doTeleportThing(cid, swiatynie[math.random(1, #swiatynie)])
	return true
end

I na koniec w login.lua dodaj
Code:
	registerCreatureEvent(cid, "Temple")

i powinno działać

I swój login.lua zamień na:

Lua:
function onLogin(cid)
if(InitShopComunication == 0) then
local eventServ = addEvent(sql_communication, SQL_COMUNICATION_INTERVAL, {})
InitShopComunication = eventServ
end
registerCreatureEvent(cid, "Temple") 
registerCreatureEvent(cid, "PlayerDeath")
registerCreatureEvent(cid, "PlayerKill")
return true
end
 
moj server przez takie pomaganie staje sie coraz mniej wyjatkowy...
 
Back
Top