Erstmal Moin an alle die diesen Beitrag lesen. Ich habe auf meinen Server im Moment ein Ultimate Edit mit einem Marry Script wo es die Funktion mit dem Nachnamen gibt und möchte gerne das der Nachname hinter meinen normalen Username angezeigt wird. Villeicht könnt ihr mir sagen wie ich das anstellen soll danke im voraus.
Lua: Marry-Func.
function marry_func ( player, cmd, pl1, pl2, nachname )
if MtxGetElementData(player, "adminlvl") >= 2 then
if pl1 and pl2 then
local pl1 = getPlayerFromName ( pl1 )
local pl2 = getPlayerFromName ( pl2 )
if pl1 and pl2 and nachname then
local x, y, z = getElementPosition ( player )
local x1, y1, z1 = getElementPosition ( pl1 )
local x2, y2, z2 = getElementPosition ( pl2 )
if getDistanceBetweenPoints3D ( xa, ya, za, x, y, z ) <= 10 and getDistanceBetweenPoints3D ( xa, ya, za, x1, y1, z1 ) <= 10 and getDistanceBetweenPoints3D ( xa, ya, za, x2, y2, z2 ) <= 10 then
if MtxGetElementData ( pl1, "playingtime" ) >= 59 and MtxGetElementData ( pl2, "playingtime" ) >= 59 then
if MtxGetElementData ( pl1, "married" ) == 0 and MtxGetElementData ( pl2, "married" ) == 0 then
if pl1 == pl2 or pl1 == player or pl2 == player then
outputChatBox("Der Braeutigam / die Braut und du muessen 3 verschiedene Spieler sein!.", player, 255, 150, 0)
else
dbExec(handler,"INSERT INTO marry (pl1,pl2,nachname) VALUES ('"..getPlayerName(pl1).."', '"..getPlayerName(pl2).."', '"..nachname.."')")
outputChatBox(""..getPlayerName(pl1).." und "..getPlayerName(pl2).." wurden erfolgreich Verheiratet!", player, 255, 150, 0)
giveWeapon ( pl1, 14, 1 )
giveWeapon ( pl2, 14, 1 )
MtxSetElementData(pl1, "married", 1)
MtxSetElementData(pl1, "marwith", getPlayerName(pl2))
MtxSetElementData(pl2, "married", 1)
MtxSetElementData(pl2, "marwith", getPlayerName(pl1))
end
else
outputChatBox("Der Braeutigam / die Braut sind bereits verheiratet! Tzz... Solche Heiratsschwindler...", player, 255, 150, 0)
end
else
outputChatBox("Der Braeutigam / die Braut müssen min. 1 Spielstunde haben.", player, 255, 150, 0)
end
else
outputChatBox("Ihr seit nicht bei der Kirche.", player, 255, 150, 0)
end
else
outputChatBox("Verwende /marry Spieler1 Spieler2 Nachname | Der Nachname darf keine Leerzeichen enthalten!", player, 255, 150, 0)
end
end
else
outputChatBox("Du bist kein Moderator!", player, 200, 0, 0)
end
end
addCommandHandler ( "marry", marry_func )
Alles anzeigen