Try this:
function givePermission ( thePlayer, command, target )
if ( target ) and ( getPlayerFromName ( target ) ) then
target = getPlayerFromName ( target )
end
local playeraccount = getPlayerAccount ( target )
if ( not isGuestAccount ( playeraccount ) ) then
local viplevel = "1"
setAccountData ( playeraccount, "viplevel", viplevel )
outputChatBox("[VIP-Management] VIP annettu pelaajalle " .. getPlayerName ( target ) .. " onnistuneesti.", thePlayer, 0, 255, 0)
else
outputChatBox ( "[VIP-Management] Error.", thePlayer, 255, 0, 0 )
end
end
addCommandHandler ( "viplevel-1", givePermission )
edit:
Glad to hear that.
(P.S. you can take the above code anytime you want)