What's new

Poprawa skryptu.

Status
Not open for further replies.
Joined
Jul 14, 2010
Messages
37
Reaction score
5
Silnik - Aries 0.4.0 [8.1]

B??d wyskakuj?cy w konsoli:

Skrypt:
Code:
local pos = getPlayerPosition(cid)
local tppos = {x=1000, y=1000, z=5}
function onStepIn(cid, item, pos)
            if getPlayerStorageValue(cid, 1435) == 1 then
               doTeleportThing(cid,tppos)
    else
    doPlayerSendTextMessage(cid,22,'Pierdu, pierdu.')
end
return 1
end

Opis: Mia?o to polega? mniej wi?cej na tym, ?e je?li ma storagevalue= 1435 to po wej?ciu na kratk? go teleportuje. Poprawicie? Z malutkim opisem b??du kt?ry pope?ni?em je?li m?g?bym prosi? (pierwszy eksperymentalny skrypcik). Dzi?ki.
 

Help3R

Forum friend
Joined
Nov 5, 2010
Messages
1,356
Reaction score
265
Odp: Poprawa skryptu.

Spr?buj zrobi? na podstawie tego :
Data/movements/script tworzymy: ground.lua:
Code:
--edit by Banco dla tnp --
function onStepIn(cid, item, pos)
if item.actionid == 9977 then
local pos = getPlayerPosition(cid)
local tppos = {x=1000, y=1000, z=5}
doTeleportThing(cid,tppos)
doPlayerSendTextMessage(cid, 19, "Pierdu, pierdu")
end
return 1
end
Nast?pnie do movements.xml:
Code:
<movevent event="StepIn" actionid="9977" script="ground.lua" />
A jak nie b?dzie dzia?a? to jeszcze spr?buj ground , kt?ry ma teleportowa? w Map Edytorze wybierasz t? kratk? <--- Properties i w ActionID wpisujesz 9977.
 
Last edited:

Oskar

Forum friend
Joined
Jan 24, 2009
Messages
2,256
Reaction score
331
Odp: Poprawa skryptu.

PHP:
local tppos = {x=1000, y=1000, z=5}

function onStepIn(cid, item, pos)
if getPlayerStorageValue(cid, 1435) == 1 then
	doTeleportThing(cid, tppos)
else
	doPlayerSendTextMessage(cid, 22, 'Pierdu, pierdu.')
end
return true
end
B??d polega? na tym, ?e u?ywa?e? poza funkcj? cid.
 
Status
Not open for further replies.
Top