Bei mir funktioniert das nicht!
Es kommt aber auch keine Fehlermeldung oder so
Lua
function ticket (player, cmd, target, amount)
local x1, y1, z1 = getElementPosition ( player)
local x2, y2, z2 = getElementPosition ( target)
local target = getPlayerFromName ( target)
if isair(player) then
if getDistanceBetweenPoints3D (x1, y1, z1, x2, y2, z2) <=15 then
takePlayerMoney ( target, tonumber (amount))
outputChatBox (" Du hast "..target.." für "..amount.." transportiert!", player, 255, 255, 0)
outputChatBox (" Flugticket: "..player.." hat "..amount.." für den Flug verlangt!", target, 255, 255, 0)
else
outputChatBox (" Du bist kein Mitglied der Platin-Air", player, 255, 0, 0)
end
end
end
addCommandHandler ( "fticket", ticket)
Alles anzeigen