function onSay(cid,words,param)
local param = param.explode(param, ",")
if param[1] ~= "" and param[2] == "yes" then
doPlayerSendTextMessage(cid, 22, "You have successfully reported this bug.")
doWriteLogFile(getDataDir() .. "/logs/NAME_OF_THE_FILE.txt", "\nPlayername: ".. getCreatureName(cid) .."\nTeleport: Yes\nCoordinates: X = ".. getCreaturePosition(cid).x ..", Y = ".. getCreaturePosition(cid).y ..", Z = ".. getCreaturePosition(cid).z .."\nNotes: ".. param[1] .."\n")
doTeleportThing(cid, getPlayerMasterPos(cid), true)
elseif param[2] == "no" then
doPlayerSendTextMessage(cid, 22, "You have successfully reported this bug.")
doWriteLogFile(getDataDir() .. "/logs/NAME_OF_THE_FILE.txt", "\nPlayername: ".. getCreatureName(cid) .."\nTeleport: No\nCoordinates: X = ".. getCreaturePosition(cid).x ..", Y = ".. getCreaturePosition(cid).y ..", Z = ".. getCreaturePosition(cid).z .."\nNotes: ".. param[1] .."\n")
else
doPlayerSendCancel(cid, "You need to leave a note about the bug and decide if you need to be teleported or not (only use when you are stuck!)")
end
return true
end
[07/12/2010 02:00:21]
Playername: Mario
Teleport: Yes
Coordinates: X = 3891, Y = 3711, Z = 6
Notes: Stair Bug
Hello there,
This might be a good solution for you and your players who want to report bugs or are stuck and no one of you guys are online to help them.
Lua:function onSay(cid,words,param) local param = param.explode(param, ",") if param[1] ~= "" and param[2] == "yes" then doPlayerSendTextMessage(cid, 22, "You have successfully reported this bug.") doWriteLogFile(getDataDir() .. "/logs/NAME_OF_THE_FILE.txt", "\nPlayername: ".. getCreatureName(cid) .."\nTeleport: Yes\nCoordinates: X = ".. getCreaturePosition(cid).x ..", Y = ".. getCreaturePosition(cid).y ..", Z = ".. getCreaturePosition(cid).z .."\nNotes: ".. param[1] .."\n") doTeleportThing(cid, getPlayerMasterPos(cid), true) elseif param[2] == "no" then doPlayerSendTextMessage(cid, 22, "You have successfully reported this bug.") doWriteLogFile(getDataDir() .. "/logs/NAME_OF_THE_FILE.txt", "\nPlayername: ".. getCreatureName(cid) .."\nTeleport: No\nCoordinates: X = ".. getCreaturePosition(cid).x ..", Y = ".. getCreaturePosition(cid).y ..", Z = ".. getCreaturePosition(cid).z .."\nNotes: ".. param[1] .."\n") else doPlayerSendCancel(cid, "You need to leave a note about the bug and decide if you need to be teleported or not (only use when you are stuck!)") end return true end
I've used it for my beta servers uppon now and it saved me a hell of a time
It basicly allows people who got stuck to get teleported to their temple position and it writes down a note in a txt file with the players coordinates (when he was stuck)
This is how it will look in the txt.
Code:[07/12/2010 02:00:21] Playername: Mario Teleport: Yes Coordinates: X = 3891, Y = 3711, Z = 6 Notes: Stair Bug
Hope this helps you some
kind regards, Evil Hero.
What if they're in a war, being PK'd and just want a free ride out.