Danke Dafür das weiß ich jetzt schonmal jetzt kommt allerdings der Error:
ERROR: [la]\la_reallife\fraktionen\medic\medic_server.lua:5: attempt to perform arithmetic on global 'getPlayerFromName' (a function value)
Hier der Eintrag in dem Script: der Error kommt aus Zeile 5!
function setemergencypermission_func ( player, cmd, target, perm)
local target = getPlayerFromName ( target )
if target then
if isEmergency ( player ) then
if perm then
if (perm == "medic") or (perm == "mechaniker") then
if laGetElementData ( player, "rang" ) == 6 then
if perm == "medic" then
laSetElementData ( target, "permission", "medic")
elseif perm == "mechaniker" then
laSetElementData ( target, "permission", "mechaniker")
end
outputChatBox ( ""..getPlayerName ( player ).." hat dich zum "..perm.." gemacht.", target, 0, 0, 100 )
outputChatBox ( "Du hast "..getPlayerName ( target ).." zum "..perm.." gemacht.", player, 0, 0, 100 )
elseif laGetElementData ( player, "rang" ) == 5 then
if isMedic ( player ) then
if perm == "medic" then
if not isMechaniker ( player ) then
laSetElementData ( target, "permission", "medic")
outputChatBox ( ""..getPlayerName ( player ).." hat dich zum "..perm.." gemacht.", target, 0, 0, 100 )
outputChatBox ( "Du hast "..getPlayerName ( target ).." zum "..perm.." gemacht.", player, 0, 0, 100 )
else
outputChatBox ( "Der Spieler ist bereits Notarzt!", player, 150, 0, 0 )
end
Danke im vorraus