This is the serverside script, it is not tested 
addEvent('onPlayerPayfine', true) 
addEventHandler('onPlayerPayfine', root, 
function(thePlayer) 
    if( getPlayerWantedLevel( thePlayer ) > 0) then 
         setPlayerWantedLevel( thePlayer, 0) 
         outputChatBox( 'you have done the fine !!', thePlayer, 255, 255, 0, false ); 
    else 
         outputChatBox( 'An error occurred while fining !', source, 255, 0, 0, false ); 
    end 
end) 
  
 
Let me know if it works