function createVehicleForPlayer(thePlayer, command, vehicleModel)
local playerName = getPlayerName ( thePlayer )
-- Does he have access to Admin functions?
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Admin" ) ) then
local x,y,z = getElementPosition(thePlayer)
x = x + 5
local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z)
if (createdVehicle == false) then
outputChatBox("Failed to create vehicle.",thePlayer)
end
else
outputChatBox("Du bist nicht berechtigt!",thePlayer)
end
end
[01:48:31] ERROR: ...A/mods/deathmatch/resources/reallifemod/Reallife.lua:52: attempt to call
global 'getPlayerName' (a nil value)
what must i do to remove this error????
(the script whit getPlayerName is from wiki)