wo man f2 drückt und voten kann, und dazu noch einen report system, das wenn ein spieler scheiße baut und die leute ihn dann reporten so das ich das mitbekommen kann.
MfG.
Scripts
vote lua
vote lua
1

j0kER aR: wieso? bei california jail gibt es sowas^^
Bowlinghead: ah endlich mal jemand der mich kapiert hat danke lieber Gott...
Cebra: das wenn andere spieler jemanden reporten,yourUsgn = 129720
function stringSplit(inputstr, sep)
	if sep == nil then
		sep = "%s"
	end
	local t={} ; i=1
	for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
		t[i] = str
		i = i + 1
	end
	return t
end
addhook("say","_say")
function _say(id,txt)
	newTxt = stringSplit(txt) -- newTxt ist ein Array, mit den einzelnen Komponenten, also z.B. = {"!pun","1"}
	if newTxt ~= null and #newTxt == 2 then
			if newTxt[1] == "!report" and player(newTxt[2],"exists") then -- wenn befehl gefunden
				local file=io.open("sys/lua/report.txt","a+")
				file:write(os.time()..": "..player(newTxt[2],"name").." with USGN-ID "..player(newTxt[2],"usgn").."\n")
				file:close()
				return 1
			end
	end
end
Cebra: Danke für die Codes, aber wie füge ich das jetzt ein? Also muss ich mir jetzt einen eigenen Text dokument erstellen und es als lua bearbeiten oder wie?
Cebra: so das problem ist, hab das so wie du gesagt hast gemacht aber ging ned. kann das sein das das mit meinem hc admin script was zu tun hat?
Happy Camper has writtenhc.add_say_command("kick", hc.moderation.kick_say_command, hc.MODERATOR1, "<id>", "Kick a player.")
function hc.moderation.kick_say_command(p, id) hc.exec(p, "kick " .. id) end
hc.add_say_command("report", hc.moderation.report_say_command, hc.USER, "<id>", "Report a player")
function hc.moderation.report_say_command(p, id)
	local file=io.open("sys/lua/report.txt","a+")
	file:write(os.time()..": "..player(id,"name").." with USGN-ID "..player(id,"usgn").."\n")
	file:close()
end
1
