Fraktion wird nicht gesetzt.
Keine Fehlermeldungen
Lua
function setMysqlData(player, data, value)
local pname = getPlayerName(player)
local sql = dbQuery(handler, "UPDATE Spieler SET '"..data.."' = '"..value.."' WHERE Username = '"..pname.."'")
if sql then
return true
else
return false
end
end
ich will damit die Fraktion setzen was aber nicht geht
Lua
function fraktion_inv (player, cmd, target, Fraktion)
if getMysqlData(player,"Admin") >= 1 then
local target = getPlayerFromName( target )
if target then
if tonumber(Fraktion) == 0 then
setMysqlData(target, "Fraktion", 0)
outputChatBox("Er ist jetzt wieder ein Zivi", player )
outputChatBox("Du bist jetzt wieder ein Zivi", target)
elseif tonumber(Fraktion) == 1 then
setMysqlData(target, "Fraktion", 1)
outputChatBox("Du hast den Spieler in die Fraktion eingeladen", player )
outputChatBox("Du bist jetzt in einer Fraktion", target)
end
else
outputChatBox("Du bist nicht befugt", player, 255, 0 , 0)
end
end
--outputChatBox("test func on", player, 255, 0 , 0)
end
addCommandHandler("finv", fraktion_inv)
Alles anzeigen