What's new

Skrypty & Kody Multi message

Status
Not open for further replies.

Spellejk

Active User
Joined
Apr 3, 2016
Messages
83
Reaction score
2
Siemacie, nie ogarniam wog?le jak t? p?tl? unieszkodliwi?, gdzie postawi? "break" czy co?:
[LUA]local config = {
positions = {

[4633] = { x = 1021, y = 957, z = 7},
[4637] = { x = 1021, y = 958, z = 7},
[4636] = { x = 1022, y = 958, z = 7},
[4640] = { x = 1022, y = 957, z = 7},
[4641] = { x = 1023, y = 957, z = 7},
[4637] = { x = 1023, y = 958, z = 7},
[4636] = { x = 1024, y = 958, z = 7},
[4635] = { x = 1024, y = 957, z = 7},
[4640] = { x = 1024, y = 956, z = 7},
[4636] = { x = 1025, y = 956, z = 7},
[4638] = { x = 1025, y = 955, z = 7},
[4632] = { x = 1024, y = 955, z = 7},
[4642] = { x = 1023, y = 955, z = 7},
[4638] = { x = 1023, y = 954, z = 7},
[4639] = { x = 1022, y = 954, z = 7},
[4633] = { x = 1022, y = 955, z = 7},
[4643] = { x = 1022, y = 956, z = 7},
[4639] = { x = 1021, y = 956, z = 7},
[231] = { x = 1023, y = 956, z = 7}
}
}

function onUse(cid, item, fromPosition, toPosition, itemEx)
for item, pos in pairs(config.positions) do
doTransformItem(getThingfromPos(pos).uid, math.random(4616, 4625))
doBroadcastMessage("blalal...")

end
return true
end [/LUA]
Itemy mi zamienia, ale problem taki, ?e wy?wietla tyle wiadomo?ci broadcast ile jest tych pozycji w tablicy... Jak to zniwelowa???

2. Jeszcze zapytam co oznacza ten znak "~=" czy jest co? r??ne?
 

Placek

Blue Waffle
Joined
Sep 30, 2008
Messages
6,793
Reaction score
672
Age
9
Odp: Multi message

local config = {
positions = {

[4633] = { x = 1021, y = 957, z = 7},
[4637] = { x = 1021, y = 958, z = 7},
[4636] = { x = 1022, y = 958, z = 7},
[4640] = { x = 1022, y = 957, z = 7},
[4641] = { x = 1023, y = 957, z = 7},
[4637] = { x = 1023, y = 958, z = 7},
[4636] = { x = 1024, y = 958, z = 7},
[4635] = { x = 1024, y = 957, z = 7},
[4640] = { x = 1024, y = 956, z = 7},
[4636] = { x = 1025, y = 956, z = 7},
[4638] = { x = 1025, y = 955, z = 7},
[4632] = { x = 1024, y = 955, z = 7},
[4642] = { x = 1023, y = 955, z = 7},
[4638] = { x = 1023, y = 954, z = 7},
[4639] = { x = 1022, y = 954, z = 7},
[4633] = { x = 1022, y = 955, z = 7},
[4643] = { x = 1022, y = 956, z = 7},
[4639] = { x = 1021, y = 956, z = 7},
[231] = { x = 1023, y = 956, z = 7}
}
}

function onUse(cid, item, fromPosition, toPosition, itemEx)
for item, pos in pairs(config.positions) do
doTransformItem(getThingfromPos(pos).uid, math.random(4616, 4625))
end
doBroadcastMessage("blalal...")

return true
end
123
 

Spellejk

Active User
Joined
Apr 3, 2016
Messages
83
Reaction score
2
Odp: Multi message

No i teraz wszystko jasneee. Nie moge co? dac repa

---------- Tre?? dodana o 19:07 ----------
[MENTION=42316]Placek[/MENTION] a powiedz mi jeszcze jedno jak zrobi? aby pobiera?o id itemu z nawiasu [ ], bo takie co? nie trybi:
[LUA]doCreateItem(config.positions[item.itemid], 1, pos)[/LUA]
 
Last edited:
Status
Not open for further replies.
Top