Könnte mir bitte jemand sagen was ich falsch gemacht habe.
Errors: :12: attempt to concatenate local 'sPlayerElement' (a userdata value)
Lua
function joinpd (source, command, thePlayer )
if getElementType (source) == "player" then
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(source)), aclGetGroup ( "Admin" ) )
or isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(source)), aclGetGroup ( "Console" ) )
or isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(source)), aclGetGroup ( "Moderator" ) )
or isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(source)), aclGetGroup ( "SuperModerator" ) ) then
local sPlayerElement = getPlayerFromName ( thePlayer )
if ( sPlayerElement ) then
if getElementType ( sPlayerElement ) == "player" then
setPlayerTeam (sPlayerElement,police)
local Loadfile = xmlLoadFile('User/'..sPlayerElement..'.xml')
xmlNodeSetAttribute (Team, "Team", "1")
xmlNodeSetAttribute (Team, "Rang", "0")
outputChatBox ("Du gehörst nun dem SF-Policedepartemant an,\n dein aktueller Rang in dieser Fraktion ist "..xmlNodeGetAttribute (Loadfile, "Rang").."",sPlayerElement)
end
end
end
end
end
addCommandHandler ("joinpd",joinpd)
Alles anzeigen