Jump to content

Attempt to concatenate an userdata value...


rusztamas

Recommended Posts

Script:

function gmtpjatekos(admin, parancs, jatekos)
if not getElementData(admin, "gm", true) then
outputChatBox ("Nincs jogod a parancs használatához.", admin, 255, 0, 0, true)
end
if not jatekos then
outputChatBox ("Hibás szintaxis. Helyes: /"..parancs.." [játékosnév]", admin, 255, 0, 0, true)
end
if jatekos then
local jatekos = getPlayerFromName(jatekos)
local jatekosPosX, jatekosPosY, jatekosPosZ = getElementPosition(jatekos)
setElementPosition (admin, jatekosPosX+2, jatekosPosY+2, jatekosPosZ)
outputChatBox ("Teleportáltál: "..jatekos..".", admin, 255, 0, 0, true)
outputChatBox ("Teleportált hozzád: "..admin..".", jatekos, 255, 0, 0, true)
end
end
addCommandHandler ("goto", gmtpjatekos)

Simple goto script, but not working, it teleports me to the player, but it wont write the 2 outputs in the chatbox. Help pls?

Edited by rusztamas
Link to comment
1 minute ago, NeXuS™ said:

outputChatBox ("Teleportáltál: "..getPlayerName(jatekos)..".", admin, 255, 0, 0, true)
outputChatBox ("Teleportált hozzád: "..getPlayerName(admin)..".", jatekos, 255, 0, 0, true)

 

Works, thank you so much for you help! For the 3d time! :) Stay awesome.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...