09-03-2012, 03:37 AM
Hi.
Because ChestShop can't be done right now, I switched my attention at portals plugin.
Idea is: you create a warp (exit) point, then you select an entrance volume using wooden sword, add some chat command magic and TADA - you got one-way portal, which could be used for both in-world and interworld travels.
If you need two-way portal, you simply create warp points inside two entrances and link them cross-like.
Right now I faced a problem: I can't get player's name inside OnBlockPlace() hook
Simple code like this:
Gave me an error like that:
Whose fault it that and how to fix it?
Because ChestShop can't be done right now, I switched my attention at portals plugin.
Idea is: you create a warp (exit) point, then you select an entrance volume using wooden sword, add some chat command magic and TADA - you got one-way portal, which could be used for both in-world and interworld travels.
If you need two-way portal, you simply create warp points inside two entrances and link them cross-like.
Right now I faced a problem: I can't get player's name inside OnBlockPlace() hook
Simple code like this:
Code:
function OnBlockPlace(PacketData, Player) -- RIGHTCLICK!
LOG("PLAYER NAME IS: "..Player:GetName())
return false
end
Code:
-- Plugins/Portal/portal_main.lua:73: attempt to index local 'Player' (a number value)
Whose fault it that and how to fix it?