[DiscordArchive] how do I do it :x?
[DiscordArchive] how do I do it :x?
Archived author: Rintaro Tsumugi • Posted: 2024-06-23T20:03:11.933000+00:00
Original source
how do I do it :x?
Archived author: Revision • Posted: 2024-06-23T20:03:59.816000+00:00
Original source
Well, inside the first `for i, v in ipairs(T) do` just add `print(v[1])` and `print(v[2])`, but not inside that if.
Archived author: Revision • Posted: 2024-06-23T20:04:23.221000+00:00
Original source
Could add `print(i)` as well
Archived author: Rintaro Tsumugi • Posted: 2024-06-23T20:06:11.702000+00:00
Original source
wait
Archived author: Rintaro Tsumugi • Posted: 2024-06-23T20:06:49.909000+00:00
Original source
I'm a bit confused as I'm still having trouble coding :x
Archived author: Rintaro Tsumugi • Posted: 2024-06-23T20:08:09.066000+00:00
Original source
i remove for i, v in ipairs(T) do for add only print(v[1]) and print(v[2]) ?
Archived author: Revision • Posted: 2024-06-23T20:08:27.250000+00:00
Original source
No
Archived author: Revision • Posted: 2024-06-23T20:08:28.479000+00:00
Original source
Sec
Archived author: Revision • Posted: 2024-06-23T20:09:43.620000+00:00
Original source
```Lua
function Teleporter_Gossip(event, player, unit)
if (#T <= 10) then
for i, v in ipairs(T) do
if(v[2] == 2 or v[2] == player:GetTeam()) then
player:GossipMenuAddItem(0, v[1], 0, i)
end
end
player:GossipSendMenu(1, unit)
else
print("Ce téléporteur ne prend en charge que 6 menus différents.")
end
end
```
would be
```Lua
function Teleporter_Gossip(event, player, unit)
if (#T <= 10) then
for i, v in ipairs(T) do
print('i: '..i..', v1: '..v[1]..', v2: '..v[2])
if(v[2] == 2 or v[2] == player:GetTeam()) then
player:GossipMenuAddItem(0, v[1], 0, i)
end
end
player:GossipSendMenu(1, unit)
else
print("Ce téléporteur ne prend en charge que 6 menus différents.")
end
end
```
Archived author: Revision • Posted: 2024-06-23T20:09:58.798000+00:00
Original source
It just adds the print there, that's all